summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2018-01-12 15:17:41 +0000
committerCarlos Martín Nieto <cmn@dwim.me>2018-01-12 15:17:41 +0000
commit9bf37ddd07b8212548c30212c994fe267daa876c (patch)
tree71f09410f465ec575abe1aea59c7289bbabea1f8
parentf1323d9c161aeeada190fd9615a8b5a9fb8a7f3e (diff)
downloadlibgit2-cmn/packed-refs-sorted.tar.gz
refs: include " sorted " in our packed-refs headercmn/packed-refs-sorted
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.
-rw-r--r--src/refs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refs.h b/src/refs.h
index 7a1a9aed1..5149c7547 100644
--- a/src/refs.h
+++ b/src/refs.h
@@ -30,7 +30,7 @@ extern bool git_reference__enable_symbolic_ref_target_validation;
#define GIT_SYMREF "ref: "
#define GIT_PACKEDREFS_FILE "packed-refs"
-#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled "
+#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled sorted "
#define GIT_PACKEDREFS_FILE_MODE 0666
#define GIT_HEAD_FILE "HEAD"