title: Identify renamed and modified file in Git using SHA1
body: <p>I'm hacking around git repository at low-level, trying to retrieve file's history from it. And having difficulties identifying file modified and renamed in a same revision.</p>
  
  <p>I'm developing C# application and I need to implement <code>git log --follow FILENAME</code> feature.</p>
  
  <p>Modification is simple: search for file with given path in trees attached to revision, if SHA1 differs — <em>Voilà</em>!</p>
  
  <p>Rename is simple too: if search by given path was not successful — look for object with same SHA1, as previously, if found — <em>Voilà</em>!</p>
  
  <p>But if not found it might be either file deletion and my search is over, or rename and modify in same revision... but how to distinguish between these cases?</p>
  
  <p>I've studied everything I found regarding Git internals, but still cannot find out what to do in this case, what might be common between tree objects corresponding to the same modified and renamed file in different revisions?</p>
  
  <p>Many thanks in advance for your help!</p>