title: How does git detect that a file has been modified?
body: <p>How does git detect a file modification so fast?</p>
  
  <p>Does it hash every file in the repo and compare SHA1s?  This would take a lot of time, wouldn't it?</p>
  
  <p>Or does it compare <code>atime</code>, <code>ctime</code> or <code>mtime</code>?</p>