Skip to content

Strange case of badFilemode #1519

Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for bringing this up!

First of all, I checked what git fsck is doing and it looks like it finds a tree that prints its entries correctly, but probably has some extra bits set in the part that isn't printing (see source). Thus it looks OK, but probably isn't. This could be validated by printing with an altered version of Git that doesn't truncate the mode.

gix-fsck is just a demo at this point, as it misses way too much and indeed, should have a proper mode-check instead of relying on the discretized enum. There might even be hidden bugs if code keeps insisting that all modes are correct, or falls back to thinking it's a submodule. Maybe the latter is the least destructive, but mayb…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by EliahKagan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants