diff options
author | Brenda J. Butler <bjb@rhino.stuffed.animals> | 2017-10-13 03:06:18 -0400 |
---|---|---|
committer | Brenda J. Butler <bjb@rhino.stuffed.animals> | 2017-10-13 03:06:18 -0400 |
commit | 5a358f2cfdc46a99db9e595d7368ecfecba52de0 (patch) | |
tree | 519e524f3b3b91b861a9bfea1cdcd32f17237fd5 /git | |
parent | f237620189a55d491b64cac4b5dc01b832cb3cbe (diff) | |
download | gitpython-5a358f2cfdc46a99db9e595d7368ecfecba52de0.tar.gz |
recognize the new packed-ref header format
as long as line contains "peeled", accept it
fixes the PackingType of packed-Refs not understood:
# pack-refs with: peeled fully-peeled sorted
problem
Diffstat (limited to 'git')
-rw-r--r-- | git/refs/symbolic.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index bef6ba3c..8efeafc5 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -96,7 +96,15 @@ class SymbolicReference(object): if not line: continue if line.startswith('#'): - if line.startswith('# pack-refs with:') and not line.endswith('peeled'): + # "# pack-refs with: peeled fully-peeled sorted" + # the git source code shows "peeled", + # "fully-peeled" and "sorted" as the keywords + # that can go on this line, as per comments in git file + # refs/packed-backend.c + # I looked at master on 2017-10-11, + # commit 111ef79afe, after tag v2.15.0-rc1 + # from repo https://github.com/git/git.git + if line.startswith('# pack-refs with:') and 'peeled' not in line: raise TypeError("PackingType of packed-Refs not understood: %r" % line) # END abort if we do not understand the packing scheme continue |