Page MenuHomeSoftware Heritage

Support Git commits with no angle brackets in author name
Closed, MigratedEdits Locked

Description

$ git clone https://github.com/noderabbit-team/tasks
$ python3
>>> import dulwich.repo
>>> r = dulwich.repo.Repo('tasks')
>>> c = dulwich.repo.Repo('.')[b'c8a1c472c97789b44d91256d5cb8899a461a0b22')
>>> c.as_raw_string()
b'tree 3e8bd4afdc836d866ad57089ad565b5f09e38475\nparent 361db946b8e11475869a125768185fdf5b77e8b3\nauthor kapil.foss@gmail.com 1297013737 -0500\ncommitter kapil.foss@gmail.com 1297013737 -0500\nencoding utf-8\n\nmore pep8, verify archive file exists before removing, test docstring'
>>> c.author
b'kapil.foss@gmail.com 1297013737 -0500'
>>> c.author_time

Revisions and Commits

Event Timeline

vlorentz triaged this task as Normal priority.Jan 24 2022, 2:32 PM
vlorentz created this task.

This will need a patch to Dulwich to fix properly. I'll use the opportunity to make Dulwich expose offset_bytes so we don't have to re-parse it ourselves

https://github.com/dulwich/dulwich/pull/927 (actually, this doesn't expose the offset_bytes yet)