Closed lvh closed 1 year ago
It looks like this problem dates back to 2010 (!) back when the code was called "scriptjure":
LOL!
I think rewriting the history isn't really that great. What would be the next best option?
I think the next best option is to close this ticket and do nothing; the fact that it exists means the next person who runs into this problem has an easy workaround already documented for them :) Plus the error message is very specific so I think discoverability will be ~100%. Thanks for taking a look!
Thanks!
Attempting to git clone with fsck enabled results in an error:
Git does not typically come configured to perform these checks automatically on fetch, but you can recreate this either by enabling fsck, for example by adding the following to your gitconfig:
.... or running git fsck on an existing repo.
It looks like this problem dates back to 2010 (!) back when the code was called "scriptjure":
You can see that the mode indeed starts with a 0 in violation of git's file format. That bad tree first occurred here:
Presumably at the time someone was using e.g. a Git client built into an IDE or something that did not us the real git binaries and hence produced slightly malformed content. Modern git is able to handle this fine.
We could technically fix this with a git fast-export + fast-import. but that will break hashes. I'm posting this ticket in case there's an interest in doing that and making sure there's a ticket (even a closed one) for the next person who runs into this problem.
Assuming the project is not interested in fixing the malformed history fixed (and breaking hashes in the process), people who have this problem can make fsck-on-receive/transfer/fetch treat this as a warning instead of a fatal error by adding the following to their git config:
Feel free to close this if deemed not actionable, which is honestly fair. Like I said: still filing it anyway so there's a search target for the next person.