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

Fwd: Feature request: implement '--follow' option for `git blame`

From
KKES <kes-kes@yandex.ua>
Date
Apr 7, 2015, 17:26 UTC
Message-ID
<720501428427590@web5j.yandex.ru>
In-Reply-To
<4215491428322362@web26m.yandex.ru>

-------- Пересылаемое сообщение -------- 06.04.2015, 15:12, "KES" <kes-kes@yandex.ua>:

    $ pwd
    /data/mdi2/classes
    $ git blame -L22,+1 -- utils.js
    99b7a802 mdi2/utils.js (user 2015-03-26 21:54:57 +0200 22)  #comment
    $ git blame -L22,+1 99b7a802^ -- utils.js
    fatal: no such path mdi2/classes/utils.js in 99b7a802^
As you have noticed, the file were in different directory in that commit
    $ git blame -L22,+1 99b7a802^ -- ../utils.js
    c5105267 (user 2007-04-10 08:00:20 +0000 22)    #comment 2
Despite on doc
    The origin of lines is automatically followed across whole-file renames (currently there is no option to turn
           the rename-following off)
blame does not follow renames. Why?
**UPDATE:** Short answer
`git blame` follow renames but not for `git blame COMMIT^ -- <filename>`

But this is too hard to track file renames manually through bulk of renames and ton of history. I think, this behaviour must be fixed to silently follow renames for `git blame COMMIT^ -- <filename>`. Or, at least, `--follow` must be implemented, so I can: `git blame --follow COMMIT^ -- <filename>`

The good suggestion is here: http://stackoverflow.com/questions/29468273/why-git-blame-does-not-follow-renames -------- Завершение пересылаемого сообщения --------

Previous: KESNext: Junio C Hamano
Message 2 of 6 in “Feature request: implement '--follow' option for `git blame`”
  1. KESApr 6, 2015
  2. Fwd: Feature request: implement '--follow' option for `git blame`KES, Apr 7, 2015
  3. Junio C HamanoApr 8, 2015
  4. Re[2]: Feature request: implement '--follow' option for `git blame`Eugen Konkov, Apr 10, 2015
  5. Junio C HamanoApr 13, 2015
  6. Re[2]: Feature request: implement '--follow' option for `git blame`Eugen Konkov, Apr 13, 2015

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.