Current version fails if any commit object has GPG signeture.
It works by just deleting lines from 433 to 440 of git/objects/commit.py.
I can't find documentation of git object format. But I tried to write support
GPG signature on commit object.
Please consider to merge.
Here is the way to reproduce problem:
sugi@vaj-k-334-sugi:~% mkdir signed-testsugi@vaj-k-334-sugi:~% cd signed-testsugi@vaj-k-334-sugi:~/signed-tes/% git initInitialized empty Git repository in /home/sugi/signed-test/.git/git@vaj-k-334-sugi:~/signed-test% date > date.txtsugi@vaj-k-334-sugi:~/signed-test% git add .sugi@vaj-k-334-sugi:~/signed-test% git commit -S -m 'Test commit with GPG sig.'You need a passphrase to unlock the secret key foruser: "Tatsuki Sugiura <sugi@nemui.org>"1024-bit DSA key, ID 4502FDC2, created 2000-09-30gpg: gpg-agent is not available in this session[master (root-commit) afad9ad] Test commit with GPG sig. 1 file changed, 1 insertion(+) create mode 100644 date.txtsugi@vaj-k-334-sugi:~/signed-test% git cat-file commit HEADtree 9165a13698f6b211db3d9631958ef11e8d06d477author Tatsuki Sugiura <sugi@nemui.org> 1336266773 +0900committer Tatsuki Sugiura <sugi@nemui.org> 1336266773 +0900gpgsig -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAk+l0BUACgkQbK2FzkUC/cLR9wCeKUkjeA39+vy0T/TwJuqPhca3 eNMAnRw0tDNAqIcM4HJnHvzCsu86dLGV =ZlAu -----END PGP SIGNATURE-----Test commit with GPG sig.sugi@vaj-k-334-sugi:~/signed-test% python Python 2.7.3rc2 (default, Apr 22 2012, 22:35:38) [GCC 4.6.3] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import git>>> git = git.Repo("/home/sugi/signed-test")>>> git.commit()<git.Commit "afad9ad7986c98784288ae71deb696d505cdfe5c">>>> git.commit().authorafad9ad7986c98784288ae71deb696d505cdfe5cTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sugi/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-x86_64.egg/gitdb/util.py", line 238, in __getattr__ self._set_cache_(attr) File "/home/sugi/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/objects/commit.py", line 133, in _set_cache_ self._deserialize(StringIO(stream.read())) File "/home/sugi/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/objects/commit.py", line 444, in _deserialize self.author.name = self.author.name.decode(self.encoding) LookupError: unknown encoding: -----BEGIN PGP SIGNATURE-----
Current version fails if any commit object has GPG signeture.
It works by just deleting lines from 433 to 440 of git/objects/commit.py.
I can't find documentation of git object format. But I tried to write support
GPG signature on commit object.
Please consider to merge.
Here is the way to reproduce problem: