Skip to content

Commit 66328d7

Browse files
authored
Merge pull request #689 from bjb/master
recognize the new packed-ref header format
2 parents c7f657f + 5a358f2 commit 66328d7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

git/refs/symbolic.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,15 @@ def _iter_packed_refs(cls, repo):
9696
if not line:
9797
continue
9898
if line.startswith('#'):
99-
if line.startswith('# pack-refs with:') and not line.endswith('peeled'):
99+
# "# pack-refs with: peeled fully-peeled sorted"
100+
# the git source code shows "peeled",
101+
# "fully-peeled" and "sorted" as the keywords
102+
# that can go on this line, as per comments in git file
103+
# refs/packed-backend.c
104+
# I looked at master on 2017-10-11,
105+
# commit 111ef79afe, after tag v2.15.0-rc1
106+
# from repo https://github.com/git/git.git
107+
if line.startswith('# pack-refs with:') and 'peeled' not in line:
100108
raise TypeError("PackingType of packed-Refs not understood: %r" % line)
101109
# END abort if we do not understand the packing scheme
102110
continue

0 commit comments

Comments
 (0)