Skip to content

Commit cfaab3a

Browse files
authored
Merge pull request gitpython-developers#689 from bjb/master
recognize the new packed-ref header format
2 parents 9b030e4 + 5a6cd65 commit cfaab3a

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)