+ /* If the file has a header line, process it: */
+ if (pos < eof && *pos == '#') {
+ const char *traits;
+
+ eol = memchr(pos, '\n', eof - pos);
+ if (!eol)
+ die_unterminated_line(refs->path, pos, eof - pos);
+
+ strbuf_add(&line, pos, eol + 1 - pos);
+
+ if (!skip_prefix(line.buf, "# pack-refs with:", &traits))
+ die_invalid_line(refs->path, pos, eof - pos);
+
+ if (strstr(traits, " fully-peeled "))
+ peeled = PEELED_FULLY;
+ else if (strstr(traits, " peeled "))
+ peeled = PEELED_TAGS;
+ /* perhaps other traits later as well */
+
+ /* The "+ 1" is for the LF character. */
+ pos = eol + 1;
+ strbuf_reset(&line);
+ }
+