refdb_fs: Traits are always surrounded by spaces

This makes parsing easier! :p
This commit is contained in:
Vicent Marti 2013-05-02 17:42:09 +02:00
parent f69db390fb
commit 1022db2b68
2 changed files with 3 additions and 3 deletions

View File

@ -219,9 +219,9 @@ static int packed_load(refdb_fs_backend *backend)
const char *traits = buffer_start + strlen(traits_header);
const char *traits_end = strchr(traits, '\n');
if (strstr(traits, "fully-peeled") != NULL) {
if (strstr(traits, " fully-peeled ") != NULL) {
backend->peeling_mode = PEELING_FULL;
} else if (strstr(traits, "peeled") != NULL) {
} else if (strstr(traits, " peeled ") != NULL) {
backend->peeling_mode = PEELING_STANDARD;
}

View File

@ -26,7 +26,7 @@
#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 "
#define GIT_PACKEDREFS_FILE_MODE 0666
#define GIT_HEAD_FILE "HEAD"