git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Understanding behavior of git blame -M

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2014, 17:07 UTC
Message-ID
<xmqq7g291y21.fsf@gitster.dls.corp.google.com>
In-Reply-To
<71BF70CE41AEE741896AF3A5450D86F11F28C762@DEFTHW99EH3MSX.ww902.siemens.net>

"Sokolov, Konstantin (ext)" <konstantin.sokolov.ext@siemens.com> writes:

Show 13 quoted lines
>>git blame -s -n -f -w -M20 file.txt
> ^2cd9f7f 1 1) AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> ^2cd9f7f 3 2) CCCCCCCCCCCCCCCCCCCCCCCC2222222222222222222222222
> ^2cd9f7f 4 3) DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
> d4bbd97e 4 4) BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
> ^2cd9f7f 5 5) EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
> ^2cd9f7f 6 6) GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
> ^2cd9f7f 7 7) FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
>
> I wonder, why line B is not recognized as moved. According to the
> documentation, I would expect git blame to report that it
> originates from line 2 in revision 2cd9f7f. Can anybody explain
> the behavior?

Interesting. Would it make a difference if you move B further away from lines A and C?

Previous: Duy NguyenNext: Sokolov, Konstantin (ext)
Message 6 of 8 in “Understanding behavior of git blame -M”
  1. Sokolov, Konstantin (ext)Aug 15, 2014
  2. David KastrupAug 15, 2014
  3. AW: Understanding behavior of git blame -MSokolov, Konstantin (ext), Aug 15, 2014
  4. David KastrupAug 16, 2014
  5. Duy NguyenAug 16, 2014
  6. Junio C HamanoAug 15, 2014
  7. AW: Understanding behavior of git blame -MSokolov, Konstantin (ext), Aug 15, 2014
  8. Sokolov, Konstantin (ext)Aug 18, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.