File "/usr/lib/python2.7/dist-packages/git/repo/base.py", line 335, in tags
return TagReference.list_items(self)
File "/usr/lib/python2.7/dist-packages/git/util.py", line 932, in list_items
out_list.extend(cls.iter_items(repo, *args, **kwargs))
File "/usr/lib/python2.7/dist-packages/git/refs/symbolic.py", line 613, in _iter_items
for sha, rela_path in cls._iter_packed_refs(repo): # @UnusedVariable
File "/usr/lib/python2.7/dist-packages/git/refs/symbolic.py", line 97, in _iter_packed_refs
raise TypeError("PackingType of packed-Refs not understood: %r" % line)
I guess the "sorted" token can be safely ignored; _iter_packed_refs() could probably be somewhat improved by adding a whitelist of supported tokens, the current code looks a bit fragile (but then, I don't know what the syntax and semantics for the packed-refs header is).
See pull request #689. i had the same problem after upgrading git.
馃憢 We're hitting the same issue now that brew is upgrading our users' git to 2.15. Any way we could get a 2.1.8 release out with this patch?
Same problem:
branches = repo.branches
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/git/repo/base.py", line 267, in heads
return Head.list_items(self)
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/git/util.py", line 942, in list_items
out_list.extend(cls.iter_items(repo, *args, **kwargs))
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/git/refs/symbolic.py", line 609, in _iter_items
for sha, rela_path in cls._iter_packed_refs(repo): # @UnusedVariable
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/git/refs/symbolic.py", line 100, in _iter_packed_refs
raise TypeError("PackingType of packed-Refs not understood: %r" % line)
TypeError: PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'
See full build log here:
https://travis-ci.org/HariSekhon/pytools/builds/298554130#L6405
The fix has been merged to master, the next time a release is cut we should be all set.
Can I request a release with this patch included please? Git 2.15 is the stable release as of Oct 30th.
Is there an ETA on when you'll package a v2.1.8 release that includes this fix?
Any news?
Workaround - install unreleased version :)
pip install -U git+http://github.com/gitpython-developers/GitPython.git
Or install packaged version in your $distro which has patch :P
See https://github.com/gitpython-developers/GitPython/issues/704 about a new release.
I am closing this issue in preparation for the next release, which contains the fix. I am sorry for having let you wait for so long!
Rather than closing _in preparation_ for the release, would you consider re-opening and then closing once the release _is available_? That way those of us who subscribe to notifications on this issue will be alerted to the availability of the new release.
Thanks @Byron ! I appreciate it :)
@truthdoug I totally agree, and fortunately the waiting is over now: https://pypi.python.org/pypi/GitPython
I hit this issue and have limited control of getting the upgrade -- if anyone is in a similar situation you can workaround it by calling repo.git.tag().
@pmb311 I believe you can always monkey-patch the code, based on the fix that has been released by now. Do you think that will work?
Most helpful comment
馃憢 We're hitting the same issue now that brew is upgrading our users' git to 2.15. Any way we could get a 2.1.8 release out with this patch?