John Keeping [off-list ref] 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".
On Thu, May 08, 2014 at 02:58:58PM -0700, Junio C Hamano wrote:
John Keeping [off-list ref] writes:
quoted
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.
Compare these two cases:
$ 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)
$ git blame ^5c9829f9 Makefile | head -5
7a3fc144 (John Keeping 2013-12-26 17:37:53 +0000 1) REL_VERSION = v0.2
^5c9829f (John Keeping 2013-07-29 17:03:26 +0100 2)
^5c9829f (John Keeping 2013-07-29 17:03:26 +0100 3) # The default target is...
^5c9829f (John Keeping 2013-07-29 17:03:26 +0100 4) all::
^5c9829f (John Keeping 2013-07-29 17:03:26 +0100 5)
While it might be useful to mark the initial commit, the current output
seems to mean that lines 4 and 5 existed before the repository was
created. If you consider blame's output to mean "introduced by commit"
then those lines should simply blame to the initial commit.
`git log --boundary` does not mark the initial commit as a boundary.
On Thu, May 08, 2014 at 11:10:24PM +0100, John Keeping wrote:
On Thu, May 08, 2014 at 02:58:58PM -0700, Junio C Hamano wrote:
quoted
John Keeping [off-list ref] writes:
quoted
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`.