Re: [PATCH/RFC] pretty.c: add %O format specifier to format_commit_one()

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

 



On Sat, May 01, 2010 at 10:18:35AM -0700, Junio C Hamano wrote:

> Alexander Shishkin <ash@xxxxxxxxxxxxx> writes:
> 
> > This specifier represents the number of each commit in the output
> > stream.
> 
> I don't like this.  What does such a number _mean_ in a non-linear
> history?
> 
> Also the next person who sees this will inevitably ask for %TOTAL to so
> that the output can say [N/M], but that would mean the list has to be
> limited and we cannot stream the output anymore.

Hmph. I started on a patch a while ago (but never finished) that would
allow an [N/M] output. My intent was to allow pretty-format specifiers
for generating cover letters[1].

Of course you can't stream when asking for %TOTAL, but that is already
the case with format-patch, which does such a calculation when numbering
patch subjects. We could use userformat_find_requirements to do the
lookup when needed, and then only formats which use the placeholder
would have to pay the penalty.

-Peff

[1] These days I do:

  git format-patch --stdout "$@" |
    sed -ne 's/^Subject: //p' |
    sed -e 's/\[PATCH /[/' \
        -e 's/]/]:/' \
        -e 's/^/  /'

and pull the result into a cover letter that I write manually.
--
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]