Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork966
Closed
Milestone
Description
Related bug report with Dulwich:https://bugs.launchpad.net/dulwich/+bug/963525
Test case:
#!/usr/bin/pythonimportgitrepo=git.Repo.clone_from('git://github.com/puppetlabs/puppet.git','puppet',bare=True)repo.commit('b00f8600a3cfd37590e644da98b12800569554d2').parents
Traceback:
Traceback (mostrecentcalllast):File"./mergetag-testcase.py",line7,in<module>repo.commit('b00f8600a3cfd37590e644da98b12800569554d2').parentsFile"/usr/lib/python2.7/dist-packages/gitdb/util.py",line238,in__getattr__self._set_cache_(attr)File"/usr/lib/python2.7/dist-packages/git/objects/commit.py",line132,in_set_cache_self._deserialize(StringIO(stream.read()))File"/usr/lib/python2.7/dist-packages/git/objects/commit.py",line443,in_deserializeself.author.name=self.author.name.decode(self.encoding)LookupError:unknownencoding:objecta61c7851ee3f02118d9f10724e95554fa90e7d18
Basically the data stream now contains mergetag objects which GitPython doesn't know how to parse:
$ git cat-file -p b00f8600a3cfd37590e644da98b12800569554d2tree 94f6f055e0d6c5eaf8f3e2509a803abcfe5a5f81parent 4173839dd274202bb74a3dd59e6d66e4e52e40e5parent a61c7851ee3f02118d9f10724e95554fa90e7d18author Nick Lewis<nick@puppetlabs.com> 1330024544 -0800committer Nick Lewis<nick@puppetlabs.com> 1330024544 -0800mergetag object a61c7851ee3f02118d9f10724e95554fa90e7d18type commit tag 2.6.14 tagger Matthaus Litteken<matthaus@puppetlabs.com> 1329867278 -0800 2.6.14 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQIcBAABAgAGBQJPRCoOAAoJEBBUt6JL1uwwTrIP/39zSu0GPC+R31kt7HLdvbEG 1/8yH3Ss9ihapDlOiMRL5nUL2NoRKohfIfFqQLSDtwuSgIaoH26tBmKnbaje7VZ6 0h94seFKI228y3yu4H2XRKkucEF0gkqNmKJjbZ6kX3g4byS8WSm+ZgoS5LajdEg0 mEQWkhGgklN6j1EbEbmKaS1dZF9zW9GYZ8sDux08UhaJkDayJGDmlQ2EbV4pyn1q 2RDVUr+RMNIFjCzf7oiKvrUt80dPIHVl6q9xJHc3nR2MDEopEMq0L+H75ZFDAqoA vnTSIggb2FIgtHWBmSTZknl/vEH3PuGNdm8H3PFYMRR1XSjOJLlyQuV/BIPJcdo9 HflFhTsPK49GLAeEMf0dWQZSgnDyJfQ8NGCfCvmu8M28QkYdanWGGPxFVgaT1u8I o5FBi+/ik/FnzzP0ThM4W2bvWHxm8i6KQwjOiC/2aQmYZQb0aEDpnGaoITyoJGP1 qnUALt/pwvKNng/74VBNbvdJgI1xjBte52iXF70AySCzr5bHn1FoBroaS1NBuUCW Tctayzj1IsF7bSikO4vv0K+594RI9hhTQzMdnCuP3tjotGcqRuFJfYren1sb9X0C Dq3e/F83NjPfghE0tzgk8rAwNjdkLPuQMWXr/arp8Qa7qB6UITLcS/Pd48+1xFmd xZ5r0TSjPVxVx992dKWV =v8sR -----END PGP SIGNATURE-----Merge tag'2.6.14' into 2.6.x
Somewhat interesting (for parsing) is that the "blank" lines in the mergetag block are actually prefixed with one space, so a simple fix (without adding mergetag support) would be to skip over that block until a blank line is found.
Metadata
Metadata
Assignees
Labels
No labels