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

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

From
David Kastrup <dak@gnu.org>
Date
May 8, 2014, 07:06 UTC
Message-ID
<87bnv8rbp8.fsf@fencepost.gnu.org>
In-Reply-To
<CAHz2CGW4rRWzGMPxM1XsoYvrwrrddrxAr+AKAi5SdMx+3rBjNg@mail.gmail.com>
Jianyu Zhan <nasa4836@gmail.com> writes:
Show 15 quoted lines
> 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
Previous: David LangNext: Chris Packham
Message 6 of 7 in “Is there any efficient way to track history of a piece of code?”
  1. Jianyu ZhanMay 8, 2014
  2. Jeff KingMay 8, 2014
  3. Jianyu ZhanMay 8, 2014
  4. Junio C HamanoMay 8, 2014
  5. David LangMay 9, 2014
  6. David KastrupMay 8, 2014
  7. Chris PackhamMay 8, 2014

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.