…s passed This is the missing part of 53c0894.
... by using git diff to compare directly the current and parent blob. Signed-off-by: Jonas Fonseca <email@example.com>
From git commit 96e117099c0e4f7d508eb071f60b6275038f6f37: It gives the parent commit of the blamed commit, _and_ a path in that parent commit that corresponds to the blamed path --- in short, it is the origin that would have been blamed (or passed blame through) for the line _if_ the blamed commit did not change that line. This functionality was released in git version 1.6.3 in 2009-05-06.
The bug was introduced in 33e10c2.
Originally, we use "git rev-list -1 --parents" to get the list of parents, and therefore the 0th slot was the commit in question, the 1st slot was the 1st parent, and so forth. Commit 0a46941 switched this to use --pretty=format:%P, so that the menu-selection code could be easily used (which counts items starting from 0). However, we only use the menu code in the case of multiple parents. For a single parent, this introduced an off-by-one where we look just past the parent we want. This patch fixes it by explicitly selecting the 0th parent for the single parent case. Signed-off-by: Jeff King <firstname.lastname@example.org> Signed-off-by: Jonas Fonseca <email@example.com>