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

2 messages, 1 author, 2016-06-15 · open the first message on its own page

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

From: KES <hidden>
Date: 2016-06-15 23:04:22

    $ 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 answer is here:
http://stackoverflow.com/questions/29468273/why-git-blame-does-not-follow-renames

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

From: KES <hidden>
Date: 2016-06-15 23:04:23


-------- Пересылаемое сообщение  --------
06.04.2015, 15:12, "KES" [off-list ref]:

    $ 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
-------- Завершение пересылаемого сообщения --------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help