From: Junio C Hamano <gitster@pobox.com>
To: Jianyu Zhan <nasa4836@gmail.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: Is there any efficient way to track history of a piece of code?
Date: Thu, 08 May 2014 11:34:26 -0700 [thread overview]
Message-ID: <xmqq1tw43yrx.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAHz2CGV6==abb0SrXOyqwumxEVLFnTtqe1Z4j2A7XcvJNuoAHw@mail.gmail.com> (Jianyu Zhan's message of "Thu, 8 May 2014 15:32:47 +0800")
Jianyu Zhan <nasa4836@gmail.com> writes:
> On Thu, May 8, 2014 at 3:00 PM, Jeff King <peff@peff.net> 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.
next prev parent reply other threads:[~2014-05-08 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 6:54 Is there any efficient way to track history of a piece of code? Jianyu Zhan
2014-05-08 7:00 ` Jeff King
2014-05-08 7:32 ` Jianyu Zhan
2014-05-08 18:34 ` Junio C Hamano [this message]
2014-05-09 6:56 ` David Lang
2014-05-08 7:06 ` David Kastrup
2014-05-08 7:35 ` Chris Packham
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=xmqq1tw43yrx.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=nasa4836@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.