Re: [PATCH] pretty: allow to override the built-in formats

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

 



Jeff King <peff@xxxxxxxx> writes:

> You could accomplish something similar by having gitk look up
> pretty.userReference, and defaulting to something sensible if it's not
> defined. For a big script like gitk that's not too much of an
> imposition. But it's awfully convenient to be able to just say
> --format=reference in any script and get the user's preferred format.

Or --format=userReference in any script, and then allow it to fall
back to pretty.reference that is otherwise ignored?  Ah, that indeed
is what you suggested with --format=loose:reference already.

> So of any of the formats, it seems like the most likely candidate for
> such a feature (setting "pretty.raw" would be a pretty big foot-gun, for
> instance). I don't like the inconsistency it introduces between formats,
> though.

Yes, the inconsistency was what primarily disturbed me.

> Here's a slightly different proposal. I'm not sure if I like it or not,
> but just thinking out loud for a moment. The issue is that we're worried
> the consumer of the output may be surprised by a user-configured pretty
> format. Can we give them a way to say "I don't care about the exact
> output; pick what the user configured for this name, or some sane
> default". I.e., something like:
>
>   git log --format=loose:reference

Yeah, that, or with s/loose/user/ or something.



[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]

  Powered by Linux