How to check/verify Git repository which uses submodules?

102 Views Asked by At

It seems that

git fsck

doesn't check any submodules (that is, verify that submodules do not have corrupted files). Seeing that

git fsck --recursive

is not not supported either. What's the correct way to check the whole repository hierarchy?

The best I can think of would be

git fsck --no-dangling --full && git submodule foreach --recursive git fsck --no-dangling --full && echo OK

but is that enough and can we have something simpler?

0

There are 0 best solutions below