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

Re: Output from "git blame A..B -- path" for the bottom commit is misleading

From
John Keeping <john@keeping.me.uk>
Date
May 8, 2014, 22:16 UTC
Message-ID
<20140508221648.GC19464@serenity.lan>
In-Reply-To
<20140508221024.GB19464@serenity.lan>
On Thu, May 08, 2014 at 11:10:24PM +0100, John Keeping wrote:
Show 22 quoted lines
> On Thu, May 08, 2014 at 02:58:58PM -0700, Junio C Hamano wrote:
> > John Keeping <john@keeping.me.uk> writes:
> > 
> > > On a slight tangent, I tried this in a fairly young repository and got
> > > this (with master at v2.0.0-rc2-4-g1dc51c6):
> > >
> > > $ git blame Makefile | head -5
> > > 7a3fc144 (John Keeping      2013-12-26 17:37:53 +0000   1) REL_VERSION = v0.2
> > > 5c9829f9 (John Keeping      2013-07-29 17:03:26 +0100   2) 
> > > 5c9829f9 (John Keeping      2013-07-29 17:03:26 +0100   3) # The default target is...
> > > ^f7fae99 (John Keeping      2013-03-24 17:14:40 +0000   4) all::
> > > ^f7fae99 (John Keeping      2013-03-24 17:14:40 +0000   5) 
> > >
> > > f7fae99 is the initial commit in the repository, so shouldn't the last
> > > two lines blame to that, not a non-existent ancestor?
> > 
> > It is not saying f7fae99^, is it?  It is debatable if it is correct
> > to mark the root commit as a boundary, but that is what it is
> > showing, I think.  In other words, "this line hasn't changed since
> > the inception of the project".
> 
> Yes, it's marking it as a boundary but I'm not convinced that's correct.

But it is intentional. I get the output I expect if I use `git blame --root`.

Previous: John KeepingNext: Junio C Hamano
Message 16 of 17 in “Output from "git blame A..B -- path" for the bottom commit is misleading”
  1. Junio C HamanoMay 8, 2014
  2. David KastrupMay 8, 2014
  3. Junio C HamanoMay 8, 2014
  4. Jeff KingMay 9, 2014
  5. Jeff KingMay 8, 2014
  6. David KastrupMay 8, 2014
  7. Jeff KingMay 9, 2014
  8. David KastrupMay 9, 2014
  9. Jeff KingMay 9, 2014
  10. Junio C HamanoMay 9, 2014
  11. David KastrupMay 9, 2014
  12. Duy NguyenMay 10, 2014
  13. John KeepingMay 8, 2014
  14. Junio C HamanoMay 8, 2014
  15. John KeepingMay 8, 2014
  16. John KeepingMay 8, 2014
  17. Junio C HamanoMay 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.