0

For a example have a look at this commit in here, the blame view present in the website, clearly shows which lines are added, which lines are deleted from the current commit. How does it do that?. After searching on the Internet for a long period of time, I found out that through these @@ -77,13 +77,15 @@notation the place of the modification is being kept in tracked. But it only says there are 13 lines from line no 77 in old file and 15 lines are in the new file from line no 77. So how does the actual lines changed are kept in track. Can anyone help me to find the answer to my problem. Thanks in advane

Kasun Siyambalapitiya
  • 3,956
  • 8
  • 38
  • 58
  • 1
    I think you confused blame and diff. Git blame show, for each line of a file, the date, author and commit message of the last change. Git diff show a diffrence (lines added, deleted or modified). The link you provided is a diff. The corresponding blame is: https://github.com/wso2/wso2-axis2-transports/blame/e3c3457149b109178d510aac965d5a85cc465aa0/modules/rabbitmq/src/main/java/org/apache/axis2/transport/rabbitmq/RabbitMQMessageSender.java – Antwane Feb 13 '17 at 15:10
  • As @Antwane said, that's an ordinary diff, not the output of `git blame` or `git annotate`. If you want to know how diffs are done, see http://stackoverflow.com/q/1510225/1256452. If your question is merely what the diff hunk headers—the `@@ ...` lines—mean, see http://stackoverflow.com/q/10950412/1256452. – torek Feb 13 '17 at 15:12

0 Answers0