Skip to content
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

Broken commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8 #2690

Closed
anatolyborodin opened this issue Jul 24, 2015 · 4 comments
Closed

Broken commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8 #2690

anatolyborodin opened this issue Jul 24, 2015 · 4 comments

Comments

@anatolyborodin
Copy link

"git fsck" thinks this commit is broken:

error in commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: invalid author/committer line - bad time zone
commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8
tree 0d1971c86d047f9530aee85a50b8fc1ca12723ba
parent 9471b0ab889a4684f87952cb951f7f4dc3f59dda
author Shrikant Sharat Kandula <...> 1313584730 +051800
committer Shrikant Sharat Kandula <...> 1313584730 +051800

Would it be possible to repair the history?

@sigmavirus24
Copy link
Contributor

No it isn't possible to repair the history. That will change the SHA value of every commit after it and update the timestamps on ALL of them. It will invalidate every tag since that commit and it will cause far too many headaches.

sigmavirus24 referenced this issue Jul 24, 2015
The kwarg is named `headers`, not `header`. Also, its a dict, not a set.
@sigmavirus24
Copy link
Contributor

To be clear, it is technically possible to repair this, also if repairing it didn't affect the repository's history from that point on, I would be very much in favor of it, but it irrevocably breaks expectations around our history and will cause more trouble than not. You appear to be the first person to have checked this and found it to be an issue.

Even if git fsck reports the commit as being damaged, git continues to work just fine. This doesn't realistically affect the use of the repository or any person's ability to contribute to it. I appreciate you reporting this, but it simply isn't something we're going to fix.

@anatolyborodin
Copy link
Author

You appear to be the first person to have checked this and found it to be an issue.

Oh, really? I thought I'm just too lazy to find an old and closed issue.

I just happen to have "transfer.fsckObjects = true" in my ~/.gitignore...

@sigmavirus24, yep, this looks like a very popular repo. Forking just for one commit would be a solution, but... Ok, I'll just disable the checks in .git/config after the checkout.

@peff
Copy link

peff commented Aug 12, 2015

@anatolyborodin Recent versions of git (master, but not yet in any released version) have support for configurable fsck checks. So you will be able to set receive.fsck.badtimezone = warn, for example, if you would like the usual checks, but would prefer to ignore this particular (minor) problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@anatolyborodin @peff @sigmavirus24 and others