Skip to content

parsing failure of invalid author/committer line - missing space before email #1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yuja opened this issue Jul 3, 2024 · 3 comments · Fixed by #1439
Closed

parsing failure of invalid author/committer line - missing space before email #1438

yuja opened this issue Jul 3, 2024 · 3 comments · Fixed by #1439
Assignees
Labels
acknowledged an issue is accepted as shortcoming to be fixed

Comments

@yuja
Copy link
Contributor

yuja commented Jul 3, 2024

Current behavior 😯

Apparently, gix can't parse the following commit:
LibreOffice/core@eaa4e44

% git cat-file commit eaa4e44cfee19f81a3a3d41982263a3f09e23f06  
tree 220738fd4199e95a2b244465168366a73ebdf271
parent 209fbe2d632761b30b7b17422914e11b93692833
author Gregor Hartmann<gh <Gregor Hartmann<[email protected]>> 1282910542 +0200
committer Gregor Hartmann<gh <Gregor Hartmann<[email protected]>> 1282910542 +0200

build breakers

Originally reported to jj-vcs/jj#4008

Expected behavior 🤔

Recover from parsing error by default, or add option to do so? This is similar to #950 and #1322.

Git behavior

% git show eaa4e44cfee19f81a3a3d41982263a3f09e23f06
commit eaa4e44cfee19f81a3a3d41982263a3f09e23f06
Author: Gregor Hartmann <gh <Gregor Hartmann<[email protected]>
Date:   Fri Aug 27 14:02:22 2010 +0200
...

BTW, git fsck reports many errors in this repository. There might be other invalid patterns that gix can't parse.

Steps to reproduce 🕹

No response

@Byron Byron self-assigned this Jul 3, 2024
@Byron Byron added the acknowledged an issue is accepted as shortcoming to be fixed label Jul 3, 2024
@Byron
Copy link
Member

Byron commented Jul 3, 2024

Thanks for reporting, I am looking into it right now.

The handling of objects like these will probably remain reactive, i.e. depends on bug reports, but I will usually be fixing these the same day.

Byron added a commit that referenced this issue Jul 3, 2024
Note that Git can parse it.

It's notable that it parses the name as `Gregor Hartmann`
and the email as `gh <Gregor Hartmann<[email protected]`,
while the author/commiter lines are
`Gregor Hartmann<gh <Gregor Hartmann<[email protected]>>`
Byron added a commit that referenced this issue Jul 3, 2024
Note that Git can parse it.

It's notable that it parses the name as `Gregor Hartmann`
and the email as `gh <Gregor Hartmann<[email protected]`,
while the author/commiter lines are
`Gregor Hartmann<gh <Gregor Hartmann<[email protected]>>`
@Byron Byron linked a pull request Jul 3, 2024 that will close this issue
2 tasks
@Byron
Copy link
Member

Byron commented Jul 3, 2024

gix-actor contains the fix, and gix-object was also updated for good measure. But updating gix-actor should do the trick.

Minion3665 added a commit to Minion3665/jj that referenced this issue Jul 3, 2024
Gitoxide, which is used to parse git commits, previously failed to parse
some malformed author/committer lines.

In 0.31.4, this parsing was made more lenient so as to better match
Git's parsing and avoid breaking on "in-the-wild" repositories such as
https://github.com/LibreOffice/core

Refs: GitoxideLabs/gitoxide#1438
Fixes: jj-vcs#4008
emilazy pushed a commit to jj-vcs/jj that referenced this issue Jul 3, 2024
Gitoxide, which is used to parse git commits, previously failed to parse
some malformed author/committer lines.

In 0.31.4, this parsing was made more lenient so as to better match
Git's parsing and avoid breaking on "in-the-wild" repositories such as
https://github.com/LibreOffice/core

Refs: GitoxideLabs/gitoxide#1438
Fixes: #4008
@yuja
Copy link
Contributor Author

yuja commented Jul 4, 2024

Thanks for the quick fix!

LuaKT pushed a commit to LMonitor/gitoxide that referenced this issue Aug 20, 2024
Note that Git can parse it.

It's notable that it parses the name as `Gregor Hartmann`
and the email as `gh <Gregor Hartmann<[email protected]`,
while the author/commiter lines are
`Gregor Hartmann<gh <Gregor Hartmann<[email protected]>>`
LuaKT pushed a commit to LMonitor/gitoxide that referenced this issue Aug 20, 2024
Byron added a commit to pierrechevalier83/gitoxide that referenced this issue Apr 5, 2025
Byron added a commit to pierrechevalier83/gitoxide that referenced this issue Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged an issue is accepted as shortcoming to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants