Skip to content

Commit 9bf37dd

Browse files
committed
refs: include " sorted " in our packed-refs header
This lets git know that we do in fact have written our packed-refs file sorted (which is apparently not necessarily the case) and it can then use the new-ish mmaped access which lets it avoid significant amounts of effort parsing potentially large files to get to a single piece of data.
1 parent f1323d9 commit 9bf37dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/refs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern bool git_reference__enable_symbolic_ref_target_validation;
3030

3131
#define GIT_SYMREF "ref: "
3232
#define GIT_PACKEDREFS_FILE "packed-refs"
33-
#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled "
33+
#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled sorted "
3434
#define GIT_PACKEDREFS_FILE_MODE 0666
3535

3636
#define GIT_HEAD_FILE "HEAD"

0 commit comments

Comments
 (0)