How to get source line numbers in a specific revision of a file?












3















It's possible to see source/original line numbers of lines with git blame But it shows line numbers according to the last commit that made a modification in the line



I want to do the same for a specific commit/revision of a file.



Example,



File: file.ext (xyz11 is the revision/commit of the file we're currently reviewing)



Content:



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)


I want to get "3" for "Line 3". Git blame will show this info according to the line's commit (abc13) commit. But, since xyz11 and abc13 revisions contain different contents, actual line number in the xyz11 may be different.



So how can I get line numbers in a specific revision of a file?



Note: I said "source/original line number" Because I want to get correct line numbers even if document is dirty (has uncommited changes) It is possible with git blame



My scenario is, I'll use these line numbers in API request to add inline comments



So, suppose I've modified the file.ext



Line 1
Line 2
Uncommited Line
Uncommited Line
Line 3


I should get still "3" for "Line 3" instead of "5", otherwise comment will go to wrong line. As I said, its possible with git blame but it shows this info according to the line's commit



Thanks










share|improve this question





























    3















    It's possible to see source/original line numbers of lines with git blame But it shows line numbers according to the last commit that made a modification in the line



    I want to do the same for a specific commit/revision of a file.



    Example,



    File: file.ext (xyz11 is the revision/commit of the file we're currently reviewing)



    Content:



    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)


    I want to get "3" for "Line 3". Git blame will show this info according to the line's commit (abc13) commit. But, since xyz11 and abc13 revisions contain different contents, actual line number in the xyz11 may be different.



    So how can I get line numbers in a specific revision of a file?



    Note: I said "source/original line number" Because I want to get correct line numbers even if document is dirty (has uncommited changes) It is possible with git blame



    My scenario is, I'll use these line numbers in API request to add inline comments



    So, suppose I've modified the file.ext



    Line 1
    Line 2
    Uncommited Line
    Uncommited Line
    Line 3


    I should get still "3" for "Line 3" instead of "5", otherwise comment will go to wrong line. As I said, its possible with git blame but it shows this info according to the line's commit



    Thanks










    share|improve this question



























      3












      3








      3








      It's possible to see source/original line numbers of lines with git blame But it shows line numbers according to the last commit that made a modification in the line



      I want to do the same for a specific commit/revision of a file.



      Example,



      File: file.ext (xyz11 is the revision/commit of the file we're currently reviewing)



      Content:



      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)


      I want to get "3" for "Line 3". Git blame will show this info according to the line's commit (abc13) commit. But, since xyz11 and abc13 revisions contain different contents, actual line number in the xyz11 may be different.



      So how can I get line numbers in a specific revision of a file?



      Note: I said "source/original line number" Because I want to get correct line numbers even if document is dirty (has uncommited changes) It is possible with git blame



      My scenario is, I'll use these line numbers in API request to add inline comments



      So, suppose I've modified the file.ext



      Line 1
      Line 2
      Uncommited Line
      Uncommited Line
      Line 3


      I should get still "3" for "Line 3" instead of "5", otherwise comment will go to wrong line. As I said, its possible with git blame but it shows this info according to the line's commit



      Thanks










      share|improve this question
















      It's possible to see source/original line numbers of lines with git blame But it shows line numbers according to the last commit that made a modification in the line



      I want to do the same for a specific commit/revision of a file.



      Example,



      File: file.ext (xyz11 is the revision/commit of the file we're currently reviewing)



      Content:



      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)


      I want to get "3" for "Line 3". Git blame will show this info according to the line's commit (abc13) commit. But, since xyz11 and abc13 revisions contain different contents, actual line number in the xyz11 may be different.



      So how can I get line numbers in a specific revision of a file?



      Note: I said "source/original line number" Because I want to get correct line numbers even if document is dirty (has uncommited changes) It is possible with git blame



      My scenario is, I'll use these line numbers in API request to add inline comments



      So, suppose I've modified the file.ext



      Line 1
      Line 2
      Uncommited Line
      Uncommited Line
      Line 3


      I should get still "3" for "Line 3" instead of "5", otherwise comment will go to wrong line. As I said, its possible with git blame but it shows this info according to the line's commit



      Thanks







      git git-blame






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 1 at 21:04









      Schwern

      90.7k17104237




      90.7k17104237










      asked Jan 1 at 20:45









      user3790180user3790180

      10819




      10819
























          2 Answers
          2






          active

          oldest

          votes


















          1














          There is an option rev for git blame so, you can specify the commit/revision you want to blame:



          git blame <rev> file


          Example



          git blame xyz11 file.txt


          More info in the docs






          share|improve this answer
























          • This seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:35











          • @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

            – Josué Cortina
            Jan 1 at 21:37











          • Yes, I'll do once I tested. Already upvoted. Thanks again

            – user3790180
            Jan 1 at 21:43



















          3














          If I understand you correctly, you have a file with uncommitted changes and your git blame looks like this.



          $ git blame foo

          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 3) Uncommitted Line
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 4) Uncommitted Line
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          Use -n to show what line it is in the original commit.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 12:58:47 -0800 3) Uncommitted Line
          00000000 4 (Not Committed Yet 2019-01-01 12:58:47 -0800 4) Uncommitted Line
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          To ignore all uncommitted and unstaged changes, use git blame <file> HEAD. HEAD is the last commit. This will look for all changes to the file from HEAD backwards. Because intervening commits will also throw the line numbers off, you'll still want -n to get the line number in that commit. For example.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 13:03:06 -0800 3) Uncommitted line
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 4) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3

          $ git blame -n foo HEAD

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 3) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 4) Line 3





          share|improve this answer


























          • Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:45











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998810%2fhow-to-get-source-line-numbers-in-a-specific-revision-of-a-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          There is an option rev for git blame so, you can specify the commit/revision you want to blame:



          git blame <rev> file


          Example



          git blame xyz11 file.txt


          More info in the docs






          share|improve this answer
























          • This seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:35











          • @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

            – Josué Cortina
            Jan 1 at 21:37











          • Yes, I'll do once I tested. Already upvoted. Thanks again

            – user3790180
            Jan 1 at 21:43
















          1














          There is an option rev for git blame so, you can specify the commit/revision you want to blame:



          git blame <rev> file


          Example



          git blame xyz11 file.txt


          More info in the docs






          share|improve this answer
























          • This seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:35











          • @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

            – Josué Cortina
            Jan 1 at 21:37











          • Yes, I'll do once I tested. Already upvoted. Thanks again

            – user3790180
            Jan 1 at 21:43














          1












          1








          1







          There is an option rev for git blame so, you can specify the commit/revision you want to blame:



          git blame <rev> file


          Example



          git blame xyz11 file.txt


          More info in the docs






          share|improve this answer













          There is an option rev for git blame so, you can specify the commit/revision you want to blame:



          git blame <rev> file


          Example



          git blame xyz11 file.txt


          More info in the docs







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 1 at 21:18









          Josué CortinaJosué Cortina

          1,5861512




          1,5861512













          • This seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:35











          • @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

            – Josué Cortina
            Jan 1 at 21:37











          • Yes, I'll do once I tested. Already upvoted. Thanks again

            – user3790180
            Jan 1 at 21:43



















          • This seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:35











          • @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

            – Josué Cortina
            Jan 1 at 21:37











          • Yes, I'll do once I tested. Already upvoted. Thanks again

            – user3790180
            Jan 1 at 21:43

















          This seems what I'm looking for. Thanks

          – user3790180
          Jan 1 at 21:35





          This seems what I'm looking for. Thanks

          – user3790180
          Jan 1 at 21:35













          @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

          – Josué Cortina
          Jan 1 at 21:37





          @user3790180 please, if this worked for you, mark it as accepted (green checkmark ✓) and up vote it!! Thnx in advance!!

          – Josué Cortina
          Jan 1 at 21:37













          Yes, I'll do once I tested. Already upvoted. Thanks again

          – user3790180
          Jan 1 at 21:43





          Yes, I'll do once I tested. Already upvoted. Thanks again

          – user3790180
          Jan 1 at 21:43













          3














          If I understand you correctly, you have a file with uncommitted changes and your git blame looks like this.



          $ git blame foo

          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 3) Uncommitted Line
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 4) Uncommitted Line
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          Use -n to show what line it is in the original commit.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 12:58:47 -0800 3) Uncommitted Line
          00000000 4 (Not Committed Yet 2019-01-01 12:58:47 -0800 4) Uncommitted Line
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          To ignore all uncommitted and unstaged changes, use git blame <file> HEAD. HEAD is the last commit. This will look for all changes to the file from HEAD backwards. Because intervening commits will also throw the line numbers off, you'll still want -n to get the line number in that commit. For example.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 13:03:06 -0800 3) Uncommitted line
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 4) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3

          $ git blame -n foo HEAD

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 3) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 4) Line 3





          share|improve this answer


























          • Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:45
















          3














          If I understand you correctly, you have a file with uncommitted changes and your git blame looks like this.



          $ git blame foo

          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 3) Uncommitted Line
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 4) Uncommitted Line
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          Use -n to show what line it is in the original commit.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 12:58:47 -0800 3) Uncommitted Line
          00000000 4 (Not Committed Yet 2019-01-01 12:58:47 -0800 4) Uncommitted Line
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          To ignore all uncommitted and unstaged changes, use git blame <file> HEAD. HEAD is the last commit. This will look for all changes to the file from HEAD backwards. Because intervening commits will also throw the line numbers off, you'll still want -n to get the line number in that commit. For example.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 13:03:06 -0800 3) Uncommitted line
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 4) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3

          $ git blame -n foo HEAD

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 3) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 4) Line 3





          share|improve this answer


























          • Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:45














          3












          3








          3







          If I understand you correctly, you have a file with uncommitted changes and your git blame looks like this.



          $ git blame foo

          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 3) Uncommitted Line
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 4) Uncommitted Line
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          Use -n to show what line it is in the original commit.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 12:58:47 -0800 3) Uncommitted Line
          00000000 4 (Not Committed Yet 2019-01-01 12:58:47 -0800 4) Uncommitted Line
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          To ignore all uncommitted and unstaged changes, use git blame <file> HEAD. HEAD is the last commit. This will look for all changes to the file from HEAD backwards. Because intervening commits will also throw the line numbers off, you'll still want -n to get the line number in that commit. For example.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 13:03:06 -0800 3) Uncommitted line
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 4) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3

          $ git blame -n foo HEAD

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 3) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 4) Line 3





          share|improve this answer















          If I understand you correctly, you have a file with uncommitted changes and your git blame looks like this.



          $ git blame foo

          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 3) Uncommitted Line
          00000000 (Not Committed Yet 2019-01-01 12:58:04 -0800 4) Uncommitted Line
          ^592c0a1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          Use -n to show what line it is in the original commit.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 12:58:47 -0800 3) Uncommitted Line
          00000000 4 (Not Committed Yet 2019-01-01 12:58:47 -0800 4) Uncommitted Line
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3


          To ignore all uncommitted and unstaged changes, use git blame <file> HEAD. HEAD is the last commit. This will look for all changes to the file from HEAD backwards. Because intervening commits will also throw the line numbers off, you'll still want -n to get the line number in that commit. For example.



          $ git blame -n foo

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          00000000 3 (Not Committed Yet 2019-01-01 13:03:06 -0800 3) Uncommitted line
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 4) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 5) Line 3

          $ git blame -n foo HEAD

          ^592c0a1 1 (Michael G. Schwern 2019-01-01 12:56:35 -0800 1) Line 1
          ^592c0a1 2 (Michael G. Schwern 2019-01-01 12:56:35 -0800 2) Line 2
          4a87d48f 3 (Michael G. Schwern 2019-01-01 13:02:32 -0800 3) Line 2.5
          ^592c0a1 3 (Michael G. Schwern 2019-01-01 12:56:35 -0800 4) Line 3






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 1 at 21:04

























          answered Jan 1 at 20:59









          SchwernSchwern

          90.7k17104237




          90.7k17104237













          • Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:45



















          • Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

            – user3790180
            Jan 1 at 21:45

















          Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

          – user3790180
          Jan 1 at 21:45





          Combination of this (-n parameter) and @Josué Cortina 's answer seems what I'm looking for. Thanks

          – user3790180
          Jan 1 at 21:45


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998810%2fhow-to-get-source-line-numbers-in-a-specific-revision-of-a-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          The term 'EXEC' is not recognized as the name of a cmdlet Powershell

          NPM command prompt closes immediately [closed]

          Error binding properties and functions in emscripten