summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-05-02 12:06:46 -0400
committerJeff King <peff@peff.net>2013-05-02 12:06:46 -0400
commita591ed3ea9e46771510628f1f677f2f3791078d6 (patch)
tree9db191fab946cd4e92f983c6ff07442a54120551
parent822645f6298ae0ff86fa717a79c5b7e105bc4a0d (diff)
downloadlibgit2-jk/peeled-refs.tar.gz
refdb_fs: respect PEELING_STANDARDjk/peeled-refs
We only set our negative flag for PEELING_FULL; we can fall back to the lesser PEELING_STANDARD if our ref is in the refs/tags/ hierarchy.
-rw-r--r--src/refdb_fs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 2c45eabb7..c0a32bae7 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -252,7 +252,9 @@ static int packed_load(refdb_fs_backend *backend)
if (buffer_start[0] == '^') {
if (packed_parse_peel(ref, &buffer_start, buffer_end) < 0)
goto parse_failed;
- } else if (backend->peeling_mode == PEELING_FULL) {
+ } else if (backend->peeling_mode == PEELING_FULL ||
+ (backend->peeling_mode == PEELING_STANDARD &&
+ git__prefixcmp(ref->name, GIT_REFS_TAGS_DIR) == 0)) {
ref->flags |= PACKREF_CANNOT_PEEL;
}