From: David Kastrup <dak@gnu.org>
To: Jianyu Zhan <nasa4836@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: Is there any efficient way to track history of a piece of code?
Date: Thu, 08 May 2014 09:06:43 +0200 [thread overview]
Message-ID: <87bnv8rbp8.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CAHz2CGW4rRWzGMPxM1XsoYvrwrrddrxAr+AKAi5SdMx+3rBjNg@mail.gmail.com> (Jianyu Zhan's message of "Thu, 8 May 2014 14:54:56 +0800")
Jianyu Zhan <nasa4836@gmail.com> writes:
> Usually, a trivial change(like coding style fix) may bury a
> original change of the code, and thus git blame is of less
> help. And to address this situation, I have to do like this:
>
> git blame -s REF^ <file-in-question> > temp
>
> to dig into the history recursively by hand, to find out
> the original change.
>
> Here, REF is commit-id that git blame reports.
>
> git log -L is a good alternative option, but sometimes it seems
> too cubersome, as I care only one line of code.
>
> Is there any current solution or suggestion?
git blame -w
might help with a number of "coding style fixes".
--
David Kastrup
next prev parent reply other threads:[~2014-05-08 7:07 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
2014-05-09 6:56 ` David Lang
2014-05-08 7:06 ` David Kastrup [this message]
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=87bnv8rbp8.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nasa4836@gmail.com \
/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.