`git fsck` fails
See original GitHub issueDropwizard has a broken commit:
$ git clone https://github.com/dropwizard/dropwizard.git
Cloning into 'dropwizard'...
remote: Counting objects: 123311, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 123311 (delta 1), reused 0 (delta 0), pack-reused 123280
Receiving objects: 100% (123311/123311), 46.11 MiB | 1.71 MiB/s, done.
Resolving deltas: 100% (78597/78597), done.
$ cd dropwizard
$ git fsck
Checking object directories: 100% (256/256), done.
error in commit 6fbf9def0293986beb2547a671f46148a5d2faf7: badDate: invalid author/committer line - bad date
Checking objects: 100% (123311/123311), done.
The problem is that the commit has an uncorrect author field:
$ git show --format=raw 6fbf9def0293986beb2547a671f46148a5d2faf7
commit 6fbf9def0293986beb2547a671f46148a5d2faf7
tree a452806b01d6ebd7d28cc3c85451ae1485f07257
parent 662010f5206fbe3d5390760501a8f48ffa9602ac
parent 2b2c23d52f348a16d9644acd08339992dfeca011
author Coda Hale <coda.hale@gmail.com> <coda.hale@gmail.com> 1305038239 -0700
committer Coda Hale <coda.hale@gmail.com> <coda.hale@gmail.com> 1305038239 -0700
Merge pull request #3 from tommorris/patch-1
added link to example application repository from README
Expected is:
...
author Coda Hale <coda.hale@gmail.com> 1305038239 -0700
committer Coda Hale <coda.hale@gmail.com> 1305038239 -0700
...
I discovered this because I have the following sections in my .gitconfig
to make sure that my checkouts are correct:
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckObjects = true
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How can I fix a corrupted Git repository? - Stack Overflow
Create a backup copy of your corrupted repository. · Delete broken references: find .git/refs -size 0 -delete -print · Repair repository from ...
Read more >Ubuntu Manpage: git-repair - Fix a broken git repository
git -repair is able to test itself, by making a temporary copy of the git reposiory it's run in, damaging it in random...
Read more >Gitkab repocheck (git fsck) fails, but I don't know how to really ...
I have a self-hosted gitlab instance and suddenly one of my projects is sending emails telling me that the repo check is failing....
Read more >Git - git-fsck Documentation
During fsck git may find issues with legacy data which wouldn't be generated by current versions of git, and which wouldn't be sent...
Read more >git fsck fails with the same error for 3 different repositories
I'm running git fsck command on some repositories, and for 3 of them I got the same error:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
GitHub support confirmed that this has been around a while:
I think rewriting history is going to be dicey at best, so I’m going to close this and we’ll just have to remember to let folks know.
Okay, that makes me feel slightly better, then. I’m guessing it’s unrelated to the repo deletion and has probably been around for a while. I guess we know what most contributors have fsckobjects set to. 😐
Having no real experience repairing git repos, I have no immediate suggestions for fixing. I’ll wait a little longer to see it GH support responds with any recommendations.