From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Output from "git blame A..B -- path" for the bottom commit is misleading
Date: Thu, 8 May 2014 22:38:06 +0100 [thread overview]
Message-ID: <20140508213806.GA19464@serenity.lan> (raw)
In-Reply-To: <xmqq8uqc2dt5.fsf@gitster.dls.corp.google.com>
On Thu, May 08, 2014 at 01:52:38PM -0700, Junio C Hamano wrote:
> I am tempted to say "blame that is run without the --porcelain
> option is a end-user facing Porcelain, and people should not be
> reading its output in their scripts" and change the behaviour of the
> "-b" option to instead show something like this instead:
>
> ^cc29195 (Unknown 2014-04-18 11:21:43 -0700 103)
> 7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 104) test_expect_...
> ^cc29195 (Unknown 2014-04-18 11:21:43 -0700 105) test...
> 7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 106) git ...
> ^cc29195 (Unknown 2014-04-18 11:21:43 -0700 107) test...
>
> which shows the commit object name, its bottom-ness and the
> timestamp, or even
>
> ( 103)
> 7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 104) test_expect_...
> ( 105) test...
> 7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 106) git ...
> ( 107) test...
>
> which does away with the misleading information altogether.
>
> I myself is leaning towards the latter between the two, and not
> overriding "-b" but introducing another "cleanse the output of
> useless bottom information even more" option.
I'd be tempted to leave the SHA-1 to indicate "sometime before" but
delete the author and date (I also think it looks a bit nicer to omit
the opening parenthesis):
^cc29195 103)
7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 104) test_expect_...
^cc29195 105) test...
7bbc458b (Kyle J. McKay 2014-04-22 04:16:22 -0700 106) git ...
^cc29195 107) test...
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?
next prev parent reply other threads:[~2014-05-08 21:38 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 [this message]
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
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=20140508213806.GA19464@serenity.lan \
--to=john@keeping.me.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.