From: Andreas Ericsson <ae@op5.se>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, spearce@spearce.org
Subject: Re: [PATCH] git-format-patch: Don't number patches when there's only one
Date: Mon, 22 Oct 2007 13:13:05 +0200 [thread overview]
Message-ID: <471C85C1.3020308@op5.se> (raw)
In-Reply-To: <Pine.LNX.4.64.0710221119300.25221@racer.site>
Johannes Schindelin wrote:
> Hi,
>
> On Mon, 22 Oct 2007, Andreas Ericsson wrote:
>
>> Johannes Schindelin wrote:
>>
>>> On Sun, 21 Oct 2007, Andreas Ericsson wrote:
>>>
>>>> [PATCH 1/1] looks a bit silly, and automagically handling this in
>>>> git-format-patch makes some scripting around it a lot more pleasant.
>>> I think you should not use "-n" if you do not want to have the
>>> numbers.
>> This stems from creating scripts around it where I only want to see the
>> numbers if there is more than a single patch. Currently I can't do that
>> without running git-format-patch twice or re-implementing the revision
>> parsing machinery to count revisions prior to passing arguments to
>> format-patch.
>
> Why not have something as simple as
>
> numbered=
> test $(git rev-list $options | wc -l) -gt 1 && numbered=-n
>
Because 23498~12 != 23498~12..HEAD to git rev-list, but it is to
git-format-patch, meaning I'll have to duplicate the logic in every
script that's supposed to use it or risk introducing a third way of
specifying a list of revisions.
> [...]
>
> git format-patch $numbered $options
>
> At the moment, the semantics of "--numbered" is really clear and precise.
> And I really like that. It makes for less surprises.
>
Semantics could be equally clear for --numbered-if-multiple.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2007-10-22 11:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 8:13 [PATCH] git-format-patch: Don't number patches when there's only one Andreas Ericsson
2007-10-22 9:44 ` Johannes Schindelin
2007-10-22 10:14 ` Andreas Ericsson
2007-10-22 10:22 ` Johannes Schindelin
2007-10-22 11:13 ` Andreas Ericsson [this message]
2007-11-03 15:44 ` [PATCH] git-format-patch: Number patches when there are more than one Mike Hommey
2007-11-03 15:59 ` Andreas Ericsson
2007-11-03 16:03 ` Mike Hommey
2007-11-03 16:32 ` Andreas Ericsson
2007-11-03 18:56 ` Samuel Tardieu
2007-11-03 16:31 ` Johannes Schindelin
2007-11-03 16:34 ` Andreas Ericsson
2007-11-04 0:25 ` Johannes Schindelin
2007-11-04 9:49 ` Andreas Ericsson
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=471C85C1.3020308@op5.se \
--to=ae@op5.se \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).