Skip to content

git: Ignore fsck errors for zero-padded filemodes

Patrick Steinhardt requested to merge pks-fsck-ignore-zero-padded-filemode into master

When receiving objects, Git by defaults verifies that all objects pass a range of consistency checks such that the repository doesn't end up in a corrupt state. While some of these checks are important, others check for formatting issues in the Git objects which used to be misformatted by some implementations of Git. Given that histories are immutable though, some repositories do have such misformatted objects and cannot really do anything about them, which is why we selectively disable some consistency checks for issues we encounter and think to be benign.

We have received several reports about failing consistency checks when the objects contain trees which have zero-padded filemodes. That is, instead of directory entries having the mode "4000", they instead have a mode of "040000", which is wrong. Git handles parsing these objects just fine though, so it's a harmless warning.

Ignore errors about zero-padded filemodes such that it becomes possible to push them into repos again.

Changelog: changed

Closes #2889 (closed)

Merge request reports

Loading