Skip to content

PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted' #687

Description

@apexo
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).

Activity

  1. bjb commented on Oct 13, 2017

    @bjb

    See pull request #689. i had the same problem after upgrading git.

  2. JasonMWhite commented on Nov 1, 2017

    @JasonMWhite

    👋 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?

  3. HariSekhon commented on Nov 7, 2017

    @HariSekhon

    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

  4. JasonMWhite commented on Nov 7, 2017

    @JasonMWhite

    The fix has been merged to master, the next time a release is cut we should be all set.

  5. paulbovbel commented on Nov 7, 2017

    @paulbovbel

    Can I request a release with this patch included please? Git 2.15 is the stable release as of Oct 30th.

  6. nuzz commented on Nov 13, 2017

    @nuzz

    Is there an ETA on when you'll package a v2.1.8 release that includes this fix?

  7. damian-lewkowicz commented on Nov 29, 2017

    @damian-lewkowicz

    Any news?

    Workaround - install unreleased version :)

    pip install -U git+http://github.com/gitpython-developers/GitPython.git
  8. igor-raits commented on Nov 29, 2017

    @igor-raits

    Or install packaged version in your $distro which has patch :P

  9. hugovk commented on Dec 4, 2017

    @hugovk
    Contributor

    See #704 about a new release.

  10. added this to the v2.1.8 - Bugfixes milestone on Dec 11, 2017
  11. Byron commented on Dec 11, 2017

    @Byron
    Member

    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!

  12. truthdoug commented on Dec 11, 2017

    @truthdoug

    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.

  13. JasonMWhite commented on Dec 11, 2017

    @JasonMWhite

    Thanks @Byron ! I appreciate it :)

  14. Byron commented on Dec 11, 2017

    @Byron
    Member

    @truthdoug I totally agree, and fortunately the waiting is over now: https://pypi.python.org/pypi/GitPython

  15. added a commit that references this issue on Dec 11, 2017
  16. pmb311 commented on Oct 2, 2018

    @pmb311

    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().

  17. Byron commented on Oct 14, 2018

    @Byron
    Member

    @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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions