We have one situation in our repository where 'git blame -M' does not detect that code has been moved. We could reproduce this on 1.9.3, 2.1.4 and 2.4.5. To reproduce this simply clone the repository using “git clone https://gerrit.wikimedia.org/r/pywikibot/core” and then inside the repository you need to download a certain patch using “git fetch origin refs/changes/44/219244/10 && git checkout FETCH_HEAD”.
That will checkout 50a4e10 and when “git blame -M pywikibot/page.py” it should attribute line 3274 (and following) to legoktm but is in fact attributing amir. There is an additional change in line 3278 where it's using “[]” instead of “list()” but that doesn't really fix it. Now at least on 1.9.3 I could make git attribute legoktm at least the four lines above the change when I changed line 3278 to the original one but didn't commit it. But as soon as I committed that change it again attributed amir. The lines below (3340 and following) are not attributed to amir so that change works. It also attributes amir using the most recent git hash and it doesn't look like that the lines were actually from amir but moved twice. And doing the git blame on HEAD~ ( git blame -M pywikibot/page.py HEAD~ ) will reveal that this is indeed the case and legoktm is attributed then. The relevant change is in https://gerrit.wikimedia.org/r/#/c/219244/10 (using patchset 10). -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.