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

Re: In-depth git blame?

From
Jeff King <peff@peff.net>
Date
Mar 2, 2011, 21:15 UTC
Message-ID
<20110302211545.GD20400@sigill.intra.peff.net>
In-Reply-To
<AANLkTi=694NiUMzcHkNZ09sotcoN+=wPMnxnom5_ex+f@mail.gmail.com>
On Wed, Mar 02, 2011 at 03:43:42PM -0500, Jez wrote:
> Git-blame is useful, but sometimes I want to know the series of
> commits that have affected a line -- not just the most recent one. Is
> there a way to do this?

If you use "git gui blame" or "tig blame", both have a "blame from parent commit" feature. This restarts the blame using the content as it was just before the answer you just got, so you can recursively dig. It's unfortunately a somewhat manual process.

There was a GSoC project to do what you asked, where you would indicate a set of lines and get a "git log"-like output of all the commits touching those lines. But there were some issues with the code, and it never quite made it upstream, I think. I'm not sure what the current status is. Cc'ing Thomas and Bo, who worked on it.

-Peff
Previous: JezNext: Peter Baumann
Message 2 of 8 in “In-depth git blame?”
  1. JezMar 2, 2011
  2. Jeff KingMar 2, 2011
  3. Peter BaumannMar 2, 2011
  4. Jeff KingMar 2, 2011
  5. Peter BaumannMar 2, 2011
  6. Peter BaumannMar 2, 2011
  7. Jonas FonsecaMar 7, 2011
  8. Peter BaumannMar 8, 2011

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.