title: How to get source line numbers in a specific revision of a file?
body: <p>It's possible to see <strong><em>source/original</em></strong> line numbers of lines with <code>git blame</code> But it shows line numbers according to the <strong>last commit that made a modification in the line</strong></p>
  
  <p>I want to do the same for a specific commit/revision of a file.</p>
  
  <p>Example,</p>
  
  <p>File: <code>file.ext</code> (<strong>xyz11</strong> is the revision/commit of the file we're currently reviewing)</p>
  
  <p>Content:</p>
  
  <pre><code>Line 1 (**abc11** is the last commit changed this line)
  Line 2 (**abc12** is the last commit changed this line)
  Line 3 (**abc13** is the last commit changed this line)
  </code></pre>
  
  <p>I want to get <strong>"3"</strong> for <strong>"Line 3"</strong>. Git blame will show this info according to the <strong>line's commit (abc13)</strong> commit. But, since <strong>xyz11</strong> and <strong>abc13</strong> revisions contain different contents, actual line number in the <strong>xyz11</strong> may be different.</p>
  
  <p>So how can I get line numbers in a specific revision of a file?</p>
  
  <p>Note: I said <strong>"source/original line number"</strong> Because I want to get correct line numbers even if document is dirty (has uncommited changes) It is possible with <code>git blame</code></p>
  
  <p>My scenario is, I'll use these line numbers in API request to add inline comments</p>
  
  <p>So, suppose I've modified the <code>file.ext</code></p>
  
  <pre><code>Line 1
  Line 2
  Uncommited Line 
  Uncommited Line
  Line 3
  </code></pre>
  
  <p>I should get still <strong>"3"</strong> for <strong>"Line 3"</strong> instead of <strong>"5"</strong>, otherwise comment will go to wrong line. As I said, its possible with <code>git blame</code> but it shows this info according to the line's commit</p>
  
  <p>Thanks</p>