Re: [PATCH v2 09/12] pretty: add %C(auto) for auto-coloring on the next placeholder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 6, 2013 at 4:13 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> If %C(auto) applies to some %<placeholder> but not to some others,
> the user needs to learn which %<placeholder> will eat the "auto" (so
> it no longer applies to the next one) and which one will not even
> look at "auto" (so the next %<placeholder> is affected by the auto,
> i.e. making the effect of auto skip a %<placeholder>).  If the rule
> were "%C(auto) applies to -next- placeholder", then the user does
> not have to worry about which ones are what you call textual and
> which ones are not (and there is no textual placeholder defined in
> the glossary).
>
> That would make it harder to learn. It would be much easier to
> explain if you said "%C(auto) affects the next %-placeholder and
> then resets".

So far (after this series, that is), we have two modifiers: %C(auto)
and %< (and friends). Both can be used to modify the "next"
placeholder, so either of them must learn to ignore the next
non-textual placeholder...

> I wonder if "Everything after %C(auto) will not be coloured if the
> output is not going to the terminal.", i.e. not resetting once
> colouring decision is made, makes more sense, though...

.. or we do this, which makes %< and friends the only placeholders
that care about the next one. Thanks for the idea.
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]