From: Junio C Hamano <gitster@pobox•com>
To: Ramkumar Ramachandra <artagnon@gmail•com>
Cc: Git List <git@vger•kernel.org>
Subject: Re: [PATCH 1/3] for-each-ref: introduce %C(...) for color
Date: Fri, 08 Nov 2013 09:30:31 -0800 [thread overview]
Message-ID: <xmqqppqaol6w.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CALkWK0=w1G2O_W1LnfstqzaMjOQ0GWqJXeeRN4ymfsvohQBfyA@mail.gmail.com> (Ramkumar Ramachandra's message of "Fri, 8 Nov 2013 20:14:47 +0800")
Ramkumar Ramachandra <artagnon@gmail•com> writes:
> ... %C(...) is
> different in that it doesn't actually output anything, but changes the
> color of tokens following it. While I'm not opposed to %(color:...), I
> would prefer a color syntax that is different from other-token syntax,
> like in pretty-formats.
You may prefer it, but I do not see why users prefer to memorize
that a magic that consumes no display output columns uses a syntax
different from all the other magic introducers that follows %(name
of the magic with string after colon to give more specifics to the
magic) syntax.
In all honesty, the %XY mnemonic syntax in pretty-format is a
syntactic disaster. It is perfectly OK to have a set of often used
shorthand, but because we started without a consistent long-hand, we
ended up with %Cred and %C(yellow), leading us to a nonsense like
this (try it yourself and weep):
$ git show -s --format='%CredAnd%CyellowAreNotTheSameColor'
It would have been much saner if we started from %(color:yellow),
%(subject), etc., i.e. have a single long-hand magic introducer
%(...), and added a set of often-used short-hands like %s.
I am not opposed to unify the internal implementations and the
external interfaces of pretty, for-each-ref and friends, but
modelling the external UI after the "mnemonic only with ad hoc
additions" mess the pretty-format uses is a huge mistake.
next prev parent reply other threads:[~2013-11-08 17:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 9:46 [PATCH (resend) 0/3] Minor f-e-r enhacements Ramkumar Ramachandra
2013-10-31 9:46 ` [PATCH 1/3] for-each-ref: introduce %C(...) for color Ramkumar Ramachandra
2013-10-31 20:50 ` Junio C Hamano
2013-11-01 8:37 ` Ramkumar Ramachandra
2013-11-01 15:05 ` Junio C Hamano
2013-11-02 6:02 ` Ramkumar Ramachandra
2013-11-04 18:17 ` Junio C Hamano
2013-11-07 6:36 ` Ramkumar Ramachandra
2013-11-07 18:02 ` Junio C Hamano
2013-11-08 12:14 ` Ramkumar Ramachandra
2013-11-08 17:30 ` Junio C Hamano [this message]
2013-11-12 3:38 ` Ramkumar Ramachandra
2013-10-31 9:46 ` [PATCH 2/3] for-each-ref: introduce %(HEAD) asterisk marker Ramkumar Ramachandra
2013-10-31 9:46 ` [PATCH 3/3] for-each-ref: introduce %(upstream:track[short]) Ramkumar Ramachandra
2013-11-01 17:17 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2013-09-27 12:10 [PATCH 0/3] Juggling between hot branches Ramkumar Ramachandra
2013-09-27 12:10 ` [PATCH 1/3] for-each-ref: introduce %C(...) for color Ramkumar Ramachandra
2013-09-27 13:16 ` Phil Hord
2013-05-24 14:19 [PATCH v2 0/3] Towards a useable git-branch Ramkumar Ramachandra
2013-05-24 14:19 ` [PATCH 1/3] for-each-ref: introduce %C(...) for color Ramkumar Ramachandra
2013-05-24 20:56 ` Antoine Pelisse
2013-05-25 11:50 ` Ramkumar Ramachandra
2013-05-25 12:20 ` John Keeping
2013-05-25 12:54 ` Ramkumar Ramachandra
2013-05-25 12:35 ` Antoine Pelisse
2013-05-24 23:41 ` David Aguilar
2013-05-25 11:51 ` Ramkumar Ramachandra
2013-05-25 6:29 ` Eric Sunshine
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=xmqqppqaol6w.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=artagnon@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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