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

Re[2]: Feature request: implement '--follow' option for `git blame`

From
EKEugen Konkov <kes-kes@yandex.ru>
Date
Apr 10, 2015, 06:40 UTC
Message-ID
<209433431.20150410094038@yandex.ru>
In-Reply-To
<xmqqvbh7baij.fsf@gitster.dls.corp.google.com>
Здравствуйте, Junio.
Вы писали 8 апреля 2015 г., 5:48:36:
JCH> KES <kes-kes@yandex.ua> writes:
>> **UPDATE:** Short answer
>> `git blame` follow renames but not for `git blame COMMIT^ -- <filename>`

JCH> Suppose you have file A and file B in your version v1.0. .... As it does not make any sense to tell C to Git and JCH> then magically make it guess you meant A in some cases and B in some JCH> other. If v1.0 did not have C, the only sensible thing to do is to JCH> exit instead of making a guess (and without telling the user how it JCH> guessed).

I agree with your complex example. But it will be great to guess in simple case, when in version v1.0 only one file A which were renamed into C half year later.
`git blame COMMIT^ -- C`

For complex example the clue will be if user supply line number he want to blame. So if user supply line 10 we follow A, if user supply 30 we follow B. Simple and great =) (I mean usefull for people)

`git blame --line 10 COMMIT^ -- C` `git blame --line 30 COMMIT^ -- C`

-- 
С уважением,
 Eugen                          mailto:kes-kes@yandex.ru
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 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.