From: Junio C Hamano <gitster@pobox.com>
To: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Does it make sense to show tips on blame?
Date: Sun, 22 Jan 2017 14:25:34 -0800 [thread overview]
Message-ID: <xmqqefzuvijl.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAOc6etZ9QeJAf1CKh9Eraigwy45yR6eO-7Th+bZRnTa71BoPew@mail.gmail.com> (Edmundo Carmona Antoranz's message of "Fri, 20 Jan 2017 23:23:04 -0600")
Edmundo Carmona Antoranz <eantoranz@gmail.com> writes:
> Output is like this (from README.txt, taken from difflame on git
> itself, sorry if it's too wide):
It is not just too wide but it is line-wrapped and cannot see what
you wanted to say out of it.
What does the word "tip" mean in this context? The word is often
used to mean the commits directly pointed at by branches (i.e. the
tip of history), but I do not think that is what you are interested
in showing in this butchered "diff" output.
> 2a113aee9b (Johan Herland 2009-12-07 12:27:24 +0100 2227)
> 405d7f4af fast-import: properly fanout notes when tree is imported
> +405d7f4af6 (Mike Hommey 2016-12-21 06:04:48 +0900 2228) if (!root->tree)
> +405d7f4af6 (Mike Hommey 2016-12-21 06:04:48 +0900 2229)
> load_tree(root);
> ...
Do you mean the one-line summary for the commit? The commits that
are shown will not be at the tip most of the time (the "+" ones may
be if you happen to be running "git show" on the tip of a branch,
but that is minority if you also want to do "git log -p"), so I am
not sure it makes sense to call them "tips" in the above output.
If I were doing the above, I would probably do them as footnotes to
keep the body of the patch text (slightly) more readable. E.g.
@@ -l,k +m,n @@
2a113aee9b
+405d7f4af6 if (!root-tree)
+405d7f4af6 load_tree(root)
...
#2a113aee9b "fast-import: Proper notes tree manipulation", 2009-12-07
#405d7f4af6 "fast-import: properly fanout notes when tree is imported", 2016-12-21
> The question is if you think it makes sense to add this option to
> git-blame itself.
>
> Something like:
> git blame --tips README.txt
I do not think I would use it personally, as it would make it hard
to pipe the output of "git blame" to less and then /search things,
as extra cruft added by the option will get in the way. IOW, I do
not think we want it for human-oriented output.
On the other hand, when output from "blame" is used by scripts (or
GUI frontends), having the one-line summary would be very useful.
But I think the authors of "blame" already thought about that
usecase and included the "summary" field in the "--porcelain" output
that are meant to be consumed by scripts, so...
next prev parent reply other threads:[~2017-01-22 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 5:23 Does it make sense to show tips on blame? Edmundo Carmona Antoranz
2017-01-22 22:25 ` Junio C Hamano [this message]
2017-01-22 22:59 ` Edmundo Carmona Antoranz
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=xmqqefzuvijl.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/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