“PackingType of packed-Refs not understood”
bdesham opened this issue · 5 comments
I’m using Gitup 0.4 on macOS 10.12.6. I have a clone of a public repository from GitHub, and when I try to update it I get
/Users/bdesham/Compute/spectomic (1 repo):
spectomic:
Fetching origin: error: git.
Traceback (most recent call last):
File "/usr/local/Cellar/gitup/0.4/libexec/bin/gitup", line 9, in <module>
load_entry_point('gitup==0.4', 'console_scripts', 'gitup')()
File "/usr/local/Cellar/gitup/0.4/libexec/lib/python2.7/site-packages/gitup/script.py", line 137, in run
main()
File "/usr/local/Cellar/gitup/0.4/libexec/lib/python2.7/site-packages/gitup/script.py", line 129, in main
update_directories(args.directories_to_update, update_args)
File "/usr/local/Cellar/gitup/0.4/libexec/lib/python2.7/site-packages/gitup/update.py", line 254, in update_directories
_dispatch(path, _update_repository, *update_args)
File "/usr/local/Cellar/gitup/0.4/libexec/lib/python2.7/site-packages/gitup/update.py", line 240, in _dispatch
callback(repo, *args)
File "/usr/local/Cellar/gitup/0.4/libexec/lib/python2.7/site-packages/gitup/update.py", line 178, in _update_repository
for branch in sorted(repo.heads, key=lambda b: b.name):
File "/usr/local/Cellar/gitup/0.4/libexec/vendor/lib/python2.7/site-packages/git/repo/base.py", line 228, in heads
return Head.list_items(self)
File "/usr/local/Cellar/gitup/0.4/libexec/vendor/lib/python2.7/site-packages/git/util.py", line 932, in list_items
out_list.extend(cls.iter_items(repo, *args, **kwargs))
File "/usr/local/Cellar/gitup/0.4/libexec/vendor/lib/python2.7/site-packages/git/refs/symbolic.py", line 592, in _iter_items
for sha, rela_path in cls._iter_packed_refs(repo): # @UnusedVariable
File "/usr/local/Cellar/gitup/0.4/libexec/vendor/lib/python2.7/site-packages/git/refs/symbolic.py", line 92, 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'
Thanks to Homebrew, I have tried this with Git versions 2.14.2, 2.14.3, and 2.15.0, but the behavior is the same in each case. The only problem seems to be this GitHub repo; I can update my clones of some self-hosted GitLab repos and a non-hosted repo without a problem.
Edit: I did get this problem on a GitHub repo but I’ve since seen it on repos on my company’s self-hosted GitLab installation too. Weirdly, some of the repos from GitLab have updated without a problem. I can’t see a pattern in which repositories can update and which can’t.
This looks like an upstream bug in GitPython. See gitpython-developers/GitPython#687. There appears to be a fix already, but it hasn't been pushed to a release yet. If it's particularly urgent, you can manually install GitPython from source. Otherwise, I'll update the dependency here and close this after the next release.
@earwig I'm hitting this too, glad to see it's fixed on develop
. 👍
Do you plan to tag a new release soon & publish to Homebrew?
I see a version bump for 0.5 nearly a year ago, but it doesn't look like that was ever released. 🤔
Fair enough!
🎉 Cool, thanks!