Skip to content

another parsing failure of malformed author/committer timestamp #1322

Closed
@yuja

Description

@yuja

Current behavior 😯

gix fails to parse the following commit because the timezone is invalid:
rails/rails@4cf9497

% git cat-file -p 4cf94979c9f4d6683c9338d694d5eb3106a4e734
tree 7989dfb2ec2f41914611a22fb30bbc2b3849df9a
parent 8845ae683e2688bc619baade49510c17e978518f
author Vijay Dev <vijaydev.cse@gmail.com> 1312735823 +051800
committer Vijay Dev <vijaydev.cse@gmail.com> 1312735823 +051800

edit changelog to mention about x_sendfile_header default change%

Expected behavior 🤔

I have no idea what's the most reasonable behavior. On one hand, the current behavior is correct because the commit object is malformed. On the other hand, it's often useful to get lossy parsing output because author/committer metadata isn't so important compared to tree/parent hashes.

This is similar to #950.

Git behavior

git show works (maybe because it doesn't parse the timestamp strictly?)

git fsck reports the error.

% git fsck
Checking object directories: 100% (256/256), done.
error in commit 4cf94979c9f4d6683c9338d694d5eb3106a4e734: badTimezone: invalid author/committer line - bad time zone
...

Steps to reproduce 🕹

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedan issue is accepted as shortcoming to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions