Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: PackingType of packed-Refs not understood #225

Closed
samuelcole opened this issue Nov 3, 2017 · 13 comments
Closed

TypeError: PackingType of packed-Refs not understood #225

samuelcole opened this issue Nov 3, 2017 · 13 comments
Labels

Comments

@samuelcole
Copy link

legit broke with git version 2.15.0

$ git sync
Traceback (most recent call last):
  File "/usr/local/bin/legit", line 11, in <module>
    load_entry_point('legit==0.4.1', 'console_scripts', 'legit')()
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/legit/cli.py", line 48, in main
    command.__call__(args)
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/legit/cli.py", line 502, in __call__
    return self.fn(*args, **kw_args)
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/legit/cli.py", line 204, in cmd_sync
    if branch in get_branch_names(local=False):
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/legit/scm.py", line 290, in get_branch_names
    branches = get_branches(local=local, remote_branches=remote_branches)
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/legit/scm.py", line 265, in get_branches
    for b in remote.refs:
  File "/usr/local/Cellar/legit/0.4.1/libexec/lib/python2.7/site-packages/git/remote.py", line 527, in refs
    out_refs.extend(RemoteReference.list_items(self.repo, remote=self.name))
  File "/usr/local/Cellar/legit/0.4.1/libexec/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/legit/0.4.1/libexec/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/legit/0.4.1/libexec/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'
@weakish
Copy link
Collaborator

weakish commented Nov 9, 2017

Cannot reproduce this on my machine.
Have you tried the 2.15.0 version released on Nov. 8?
Can you specify your legit and os version?

My setup:

  • git 2.15.0
  • legit both v0.4.1 (installed with pip install legit) and 325dd22
  • osx 10.12.6

@samuelcole
Copy link
Author

Is it not this? gitpython-developers/GitPython#689

I assumed you would just need to wait for a new GitPython release, and update the dependency.

@weakish weakish added the Bug label Nov 11, 2017
@intentionally-left-nil
Copy link

I can confirm that manually applying the patch that @samuelcole mentioned above fixes the issue.
Git 2.15.0
legit v0.4.1 (via brew install)

@reneruiz
Copy link

Does this require a legit update or do I need to do something locally to fix it?

@Tatsh
Copy link

Tatsh commented Nov 16, 2017

Until the update comes you can do https://github.com/gitpython-developers/GitPython/archive/master.zip. I was affected by this with https://github.com/msiemens/PyGitUp .

@weakish
Copy link
Collaborator

weakish commented Nov 17, 2017

@reneruiz You can just update PyGitUp to master at now. After a new release of PyGitUp coming out, I will update the dependency list of legit.

@kennethreitz
Copy link
Collaborator

I was just hit by this. I'll try to get a release out the door.

@kennethreitz
Copy link
Collaborator

Oh, I see what's going on now.

I confirm that the patch mentioned above fixes the issue.

@miketheman
Copy link
Contributor

This appears to be fixed in the GitPython 2.1.8 version, as discussed here: gitpython-developers/GitPython#687

miketheman added a commit to miketheman/legit that referenced this issue Dec 24, 2017
Resolves frostming#225

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@reneruiz
Copy link

reneruiz commented Feb 6, 2018

Legit still doesn't work for me. It seems some of you have updated the GitPython dependency locally, but I have no idea how to do that. Any chance of a new release to fix this?

@weakish
Copy link
Collaborator

weakish commented Feb 7, 2018

@reneruiz Have you tried installing legit from github repository (the develop branch)?

@reneruiz
Copy link

reneruiz commented Feb 7, 2018

Unfortunately not, I installed legit through brew. Could you provide instructions on how to install from the develop branch?

@weakish
Copy link
Collaborator

weakish commented Feb 8, 2018

@reneruiz Just updated README, added instructions. See 246ec45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants