Skip to content

Commit

Permalink
recognize the new packed-ref header format
Browse files Browse the repository at this point in the history
as long as line contains "peeled", accept it
fixes the PackingType of packed-Refs not understood:
# pack-refs with: peeled fully-peeled sorted
problem
  • Loading branch information
Brenda J. Butler committed Oct 13, 2017
1 parent f237620 commit 5a358f2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion git/refs/symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ def _iter_packed_refs(cls, repo):
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
Expand Down

1 comment on commit 5a358f2

@thiblahute
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do you plan on releasing that? (git-phab is pretty much broken without that fix).

Please sign in to comment.