Re: [PATCH 0/3] pretty: format aliases

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

 



On Mon, Apr 26, 2010 at 12:57:08PM -0500, Jonathan Nieder wrote:

> > To be clear, I don't have any problem with the _functionality_. I just
> > think it probably should have been log.pretty, or pretty.default or
> > something. Too late now, though.
> 
> Ah, sorry to be dense.  Maybe something like the following would work:
> 
>  [log "format"]
> 	changelog = "* [%h] %s"

We usually reserve the [log "format"] for when "format" can be an
arbitrary string. I'm not sure if we can use some nicer syntax like
[log.format]; I'd have to experiment.

> This is rev-list’s code, and log is its most noticeable manifestation.

We also tend to refer to the log/show/whatchanged as "the log family of
commands". I think whatchanged is pretty much dead and historical at
this point, though.

> By the way: I just noticed today that rev-list is not very friendly
> when given a --pretty=format: specification:
> 
>   $ git rev-list -1 --oneline HEAD
>   651b91e log --format=email: fix confusing variable name
>   $ git rev-list -1 --format='%h %s' HEAD
>   commit 651b91ef7a15a46145d65193c8709670b969161f
>   651b91e log --format=email: fix confusing variable name
> 
> Is this deliberate?  I mention it because I seem to remember from the
> discussion of --decorate configuration that scripts should be using
> rev-list in preference to log even when a --format option is involved.

I'm not sure it's deliberate, as in somebody thought it was a good idea.
But it has always been that way, and I think it has been deliberate that
we not change it. I agree it is unfriendly.

I think we have accepted that scripts will use log because of its
enhanced features (gitk does), but we generally suppress extra output
(like decorations or notes) for at least --pretty=raw and
--pretty=format.

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