{"thread":{"id":"45059","subject":"A little help understanding output from git blame --reverse","startedAt":"2017-02-06T12:38:18Z","lastAt":"2017-02-06T12:40:38Z","messageCount":2,"participants":["Edmundo Carmona Antoranz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"310907","messageId":"CAOc6etZ7iuPKRQkYSZDrDRW0hxbu1aYMRuzB1iXAPv+EEnXJEg@mail.gmail.com","threadId":"45059","inReplyTo":null,"subject":"A little help understanding output from git blame --reverse","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2017-02-06T12:38:01Z","receivedAt":"2017-02-06T12:38:18Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"Hi!\n\nWhile doing some research developing difflame I found some output from\ngit blame --reverse that I can't quite understand. Perhaps another set\nof eyeballs could help me.\n\nI'm \"difflaming\" HEAD~100 (02db2d0421b97fcb6211) and HEAD\n(066fb0494e6398eb). Specifically file abspath.c.\n\nIf we diff (as in plain old git diff) HEAD~100..HEAD we can see that\nline 63 (from HEAD~100 revision) was deleted between HEAD~100 and\nHEAD:\n\n@@ -58,86 +95,136 @@ blah blah\n                       goto error_out;\n       }\n\n-       strbuf_reset(&sb);\n-       strbuf_addstr(&sb, path);\n-\n-       while (depth--) {\n-               if (!is_directory(sb.buf)) {\n\n\nSo, if I do a \"reverse\" blame operation on the file, I would expect to\nsee the last revision where that line was _present_ on the file:\n\nc5f3cba126  61)         strbuf_reset(&sb);\nc5f3cba126  62)         strbuf_addstr(&sb, path);\n066fb0494e  63)\nc5f3cba126  64)         while (depth--) {\nc5f3cba126  65)                 if (!is_directory(sb.buf)) {\n\nline 63 shows up as if it had been last present on the file on\nrevision 066fb0494e, which is HEAD, which kind of doesn't make a lot\nof sense to me because given that the line is not present on the file\non HEAD (as we can guess from diff output) it means it was \"forcefully\npresent\" on some previous revision (and that's what I would expect to\nsee reported on blame --reverse output).\n\nWhat am I missing? Thanks in advance.\n"},{"id":"310908","messageId":"CAOc6etbtEBUkSXHKzNuobJ9CGgb4yrLcJSTvH3vy=XBt-qcdaQ@mail.gmail.com","threadId":"45059","inReplyTo":"CAOc6etZ7iuPKRQkYSZDrDRW0hxbu1aYMRuzB1iXAPv+EEnXJEg@mail.gmail.com","subject":"Re: A little help understanding output from git blame --reverse","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2017-02-06T12:40:33Z","receivedAt":"2017-02-06T12:40:38Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"On Mon, Feb 6, 2017 at 6:38 AM, Edmundo Carmona Antoranz\n<eantoranz@gmail.com> wrote:\n> I'm \"difflaming\" HEAD~100 (02db2d0421b97fcb6211) and HEAD\n> (066fb0494e6398eb). Specifically file abspath.c.\n\nI just noticed that I'm standing on a private branch. Replace HEAD for\n\"4e59582ff\" when doing your analysis. You should get the same results.\n"}]}