public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: KES <kes-kes@yandex•ua>
To: git@vger•kernel.org
Subject: Fwd: Feature request: implement '--follow' option for `git blame`
Date: Tue, 07 Apr 2015 20:26:30 +0300	[thread overview]
Message-ID: <720501428427590@web5j.yandex.ru> (raw)
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
-------- Завершение пересылаемого сообщения --------

  reply	other threads:[~2015-04-07 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 12:12 Feature request: implement '--follow' option for `git blame` KES
2015-04-07 17:26 ` KES [this message]
2015-04-08  2:48 ` Junio C Hamano
2015-04-10  6:40   ` Re[2]: " Eugen Konkov
2015-04-13  5:32     ` Junio C Hamano
2015-04-13 19:07       ` Re[2]: " Eugen Konkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=720501428427590@web5j.yandex.ru \
    --to=kes-kes@yandex$(echo .)ua \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox