Title: Signed commits not parsed correctly · Issue #132 · gitpython-developers/GitPython · GitHub
Open Graph Title: Signed commits not parsed correctly · Issue #132 · gitpython-developers/GitPython
X Title: Signed commits not parsed correctly · Issue #132 · gitpython-developers/GitPython
Description: The _deserialize method of the Commit object (objects/commit.py:407) doesn't handle signed commits properly, see this example of a raw formatted git commit object (taken from the rails repository, where I discovered this bug): commit 317...
Open Graph Description: The _deserialize method of the Commit object (objects/commit.py:407) doesn't handle signed commits properly, see this example of a raw formatted git commit object (taken from the rails repository, ...
X Description: The _deserialize method of the Commit object (objects/commit.py:407) doesn't handle signed commits properly, see this example of a raw formatted git commit object (taken from the rails reposito...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/132
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Signed commits not parsed correctly","articleBody":"The `_deserialize` method of the `Commit` object (objects/commit.py:407) doesn't handle signed commits properly, see this example of a raw formatted git commit object (taken from the rails repository, where I discovered this bug):\n\n```\ncommit 31735bd39127784019893e4860b2c9807293da25\ntree 9c028a6346b49abfed31d8927d47980994f3b73d\nparent 1f633c78ea7ff13a8f35d64e8172b774dd662667\nauthor Miguel Herranz \u003cmiguel@ipglider.org\u003e 1345231220 +0200\ncommitter Miguel Herranz \u003cmiguel@ipglider.org\u003e 1345231220 +0200\ngpgsig -----BEGIN PGP SIGNATURE-----\n Version: GnuPG v1.4.12 (Darwin)\n\n iQIcBAABAgAGBQJQLpm/AAoJEJPQ5hNIfbMZ5KAP/2lFh7WMNR8c1tyQOXW518/k\n 92mr1YsdD4dSePLflKvloZe6ITfb6btcSd/nAnbdBubRiuqlpCGSmMUzZrafNXpF\n WD5zAPQude75KJl3Rar6nBCLzpNm4a3sAQdLvDLgjCA823+qAzLbk7xWCt+0oaal\n qJK5SJDwtyF+PXS8T+WPhuIERjNE3CkPG7NCFR4Atg1aiSMBkfY35FS0JpSXNqW0\n VZcHjAZR8oC7YuipwkoEKatjC/lwQfRKM+LdI2qP/1f05EVJaDAZGpQShyrVNgLt\n hlaZLL880XyNdzuP986J19RbuG69+GWbL2Q0DZItrxbUo7JqDes0uIDh/c2xlwDt\n QFISJ9Xieogo2FKDIFD2rc8jiHYiMx3OUs6QOTz6YXfAUdEoVInrv32Tm0E+IiHq\n Y5xxlBiNOsHd448Om6cB7sliwbdc5ic9UYrWibqgzEjdiyoY3uRnyS6r19ISjod+\n +C5aYZr3uWz7xzW6hY+VWi9pM9xxkdYZEN1vBiGrm3hH9b2cm9M1roRrMoCz0Kjy\n xgZSSnp+Dft2Sw61DJHxf7t8oaOW7J7ZWjkD6mM66Kx7IpKzvzfReSYjLQtQNcNt\n 8NHVUySPkC3/gpdlyzGOSu0xRvH1eq2eBJrKetlNN9XAEZAutQ+symdmfNY7L/Mj\n JcwMU0pcsI9X8NXBUMoK\n =GOBp\n -----END PGP SIGNATURE-----\n\n Update to activerecord-deprecated_finders on generator\n```\n\nAs you see there may be a gpgsig line after the committer which is then followed by the actual signature. GitPython doesn't recognise this and will interpret it as the encoding line. The `enc` variable is then set to '-----BEGIN PGP SIGNATURE-----', which is of course not valid and will cause an exception on line 443.\n\nTo reproduce the problem first clone the rails repository, and then run this code:\n\n```\nfrom git import *\nrepo = Repo(\"../rails\")\nrepo.commit(\"31735bd39127784019893e4860b2c9807293da25\").author\n```\n","author":{"url":"https://github.com/ArnoVanLumig","@type":"Person","name":"ArnoVanLumig"},"datePublished":"2014-01-11T18:39:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/132/GitPython/issues/132"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5a20ef5b-9eb6-582d-6c01-ab0684cd3f5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B876:A7892:672BB5:8B8ACC:6A62DC58 |
| html-safe-nonce | 4f1d79bfa3217e58f2f9e21a372ad24ceacf1041a3f42598ca9013578dcebed4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODc2OkE3ODkyOjY3MkJCNTo4QjhBQ0M6NkE2MkRDNTgiLCJ2aXNpdG9yX2lkIjoiMTMzNjc4NzUxNDQ0MDIxMTU0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e2976defc05142a6e371f918c5078f4da3cb3572a12cab6d6e5ca25be1cc822f |
| hovercard-subject-tag | issue:25448464 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/132/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c70f527326db28b5ec3baacaa8dc46fac85b2b542c725598709a8841ad94f74c/gitpython-developers/GitPython/issues/132 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c70f527326db28b5ec3baacaa8dc46fac85b2b542c725598709a8841ad94f74c/gitpython-developers/GitPython/issues/132 |
| og:image:alt | The _deserialize method of the Commit object (objects/commit.py:407) doesn't handle signed commits properly, see this example of a raw formatted git commit object (taken from the rails repository, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ArnoVanLumig |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width