git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: John Keeping <john@keeping.me.uk>
Cc: git@vger.kernel.org
Subject: Re: Output from "git blame A..B -- path" for the bottom commit is misleading
Date: Thu, 08 May 2014 15:31:15 -0700	[thread overview]
Message-ID: <xmqqlhub298s.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140508221024.GB19464@serenity.lan> (John Keeping's message of "Thu, 8 May 2014 23:10:24 +0100")

John Keeping <john@keeping.me.uk> writes:

> 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.

You may be onto something, but I am not sure.  Let me, as you told
me to, compare these two outputs.

The first says "At f7fae99, these lines were already there, and we
are not showing anything before that state."  The second says
exactly the same thing but with f7fae99 replaced with 5c9829f.

It is debatable if a root commit is *that* special to be shown
differently from an in-between commit that introduced a change, and
for consistency, I tend to agree with you that it may be better if
roots weren't marked with the "^" prefix.

      parent reply	other threads:[~2014-05-08 22:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 20:52 Output from "git blame A..B -- path" for the bottom commit is misleading Junio C Hamano
2014-05-08 21:13 ` David Kastrup
2014-05-08 21:56   ` Junio C Hamano
2014-05-09  1:55     ` Jeff King
2014-05-08 21:26 ` Jeff King
2014-05-08 21:32   ` David Kastrup
2014-05-09  0:11     ` Jeff King
2014-05-09  5:04       ` David Kastrup
2014-05-09 15:29         ` Jeff King
2014-05-09 17:28           ` Junio C Hamano
2014-05-09 19:59             ` David Kastrup
2014-05-10 13:45         ` Duy Nguyen
2014-05-08 21:38 ` John Keeping
2014-05-08 21:58   ` Junio C Hamano
2014-05-08 22:10     ` John Keeping
2014-05-08 22:16       ` John Keeping
2014-05-08 22:31       ` Junio C Hamano [this message]

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=xmqqlhub298s.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).