As far as I understand how git status
operation works, and please correct me if I am wrong, a modified file is detected when its sha-1 hash doesn't match any file name stored inside .git/objects
directory.
However, I have a hard time to imagine git reads every already existing file contained in the working tree in order to build and compare its hash because this seems to be a slow process.
Are there any optimisation techniques that I am not aware of? Such as caching?
Thanks :)