git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC PATCH] show decorations at the end of the line
Date: Mon, 13 Feb 2017 17:38:19 -0500	[thread overview]
Message-ID: <20170213223819.gr3wndswieu4bbvn@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq7f4tdcua.fsf@gitster.mtv.corp.google.com>

On Mon, Feb 13, 2017 at 01:01:49PM -0800, Junio C Hamano wrote:

> Linus Torvalds <torvalds@linux-foundation.org> writes:
> 
> > And if you actually want decorations, and you're parsing them, you are
> > *not* going to script it with "--oneline --decorations", because the
> > end result is basically impossible to parse already (because it's
> > ambiguous - think about parentheses in the commit message).
> 
> OK.  So let's wait to hear from others if they like the "obviously"
> improved output.  Even though I find the decorations indispensable
> in my "git log" output, I personally do not have much preference
> either way, as my screen is often wide enough ;-)

I have a slight preference for the new output (decorations at the end)
versus the original, but I could go either way.

I don't think the scripting compatibility concerns are an issue, for all
the reasons given in the thread.

There is one related option, --source, which also puts its data between
the hash and the subject in --oneline. In theory that should be treated
similarly, though:

  1. It's already really ugly, as it does not even get the parentheses
     and coloring.

  2. It's perhaps more likely to get scripted, as it really is parseable
     in the current state.

I'm not sure if a better path forward would be to just extend the idea
of "decorator" to possibly include more than just ref-tips. On the other
hand, if you really want to get fancy with formatting, we already have a
complete formatting language. Perhaps it should learn a placeholder for
the "--source" data.

Similarly, I've often wanted a "contained in this tags/branches"
annotation for each commit. It's not too expensive to compute if you
topo-sort the set of commits and just paint down as you traverse.

Anyway, I think none of that needs to block changes to --decorate
output. Just thinking out loud.

-Peff

  reply	other threads:[~2017-02-13 22:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 18:02 [RFC PATCH] show decorations at the end of the line Linus Torvalds
2017-02-11 18:13 ` Linus Torvalds
2017-02-13  8:30   ` Junio C Hamano
2017-02-13 19:33     ` Linus Torvalds
2017-02-13 21:01       ` Junio C Hamano
2017-02-13 22:38         ` Jeff King [this message]
2017-02-14 22:11         ` Junio C Hamano
2017-02-15  0:29           ` Jeff King
2017-02-18  5:27             ` Junio C Hamano
2017-02-19 22:33               ` Linus Torvalds
2017-02-19 23:03                 ` Jacob Keller
2017-02-20  0:46                   ` Jeff King
2017-02-20  1:15                     ` Junio C Hamano
2017-02-20  1:48                     ` Linus Torvalds
2017-02-21 20:11                       ` Junio C Hamano
2017-02-21 20:40                         ` Linus Torvalds
2017-02-21 21:08                           ` Jeff King
2017-02-21 21:47                             ` Junio C Hamano
2017-02-21 22:24                               ` Jeff King
2017-02-14 20:36     ` Stephan Beyer

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170213223819.gr3wndswieu4bbvn@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@linux-foundation.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).