Subject: Re: Is there any efficient way to track history of a piece of code?

From: Junio C Hamano <[email-masked]>
Date: Thu, 08 May 2014 11:34:26 -0700

Jianyu Zhan <[email-masked]> writes:

> On Thu, May 8, 2014 at 3:00 PM, Jeff King <[email-masked]> wrote:
>> Try "tig blame"[1]; from the blame view, the "," command will restart
>> the blame at REF^ automatically.  If you don't mind a more graphical
>> interface, I think "git gui blame" can also reblame from the parent from
>> the right-click context menu.
>
> Thanks! It helps!
>
> Hmm, but you know, we are cli people so we met git ;-)
>
> My by-hand recursive digging history works for me and I've consider automate
> this but failed since the pattern match to find the correct line of
> code in each recursion
> is a big problem.

Yes, by definition, there is no corresponding line in a version
behind the version shown in the blame output, so there needs some
heuristics, such as "assume the same line range", "find the
beginning and the end of the function definition that contains that
line", etc.