How does git detect that a file has been modified?

Viewed 15186

How does git detect a file modification so fast?

Does it hash every file in the repo and compare SHA1s? This would take a lot of time, wouldn't it?

Or does it compare atime, ctime or mtime?

4 Answers
Related