From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
"Shawn O. Pearce" <spearce@spearce.org>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: [PATCH] format-patch: autonumber by default
Date: Thu, 2 Oct 2008 15:47:58 +0200 [thread overview]
Message-ID: <1222955278-16908-1-git-send-email-giuseppe.bilotta@gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0810021541470.22125@pacific.mpi-cbg.de.mpi-cbg.de>
format-patch is most commoly used for multiple patches at once when
sending a patchset, in which case we want to number the patches; on the
other hand, single-patches are not usually expected to be numbered.
The typical behavior expected by format-patch is therefore the one
obtained by enabling autonumber, which should therefore be the default.
Users that want to disable numbering for a particular patchset can do so
with the existing -N command-line switch. For users that want to change
the default behavior we provide a 'noauto' option for the
format.numbering config key.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
builtin-log.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index fc5e4da..5187dc2 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -426,7 +426,7 @@ static int istitlechar(char c)
static const char *fmt_patch_suffix = ".patch";
static int numbered = 0;
-static int auto_number = 0;
+static int auto_number = 1;
static char **extra_hdr;
static int extra_hdr_nr;
@@ -484,6 +484,10 @@ static int git_format_config(const char *var, const char *value, void *cb)
auto_number = 1;
return 0;
}
+ if (value && !strcasecmp(value, "noauto")) {
+ auto_number = 0;
+ return 0;
+ }
numbered = git_config_bool(var, value);
return 0;
}
--
1.5.6.5
next prev parent reply other threads:[~2008-10-02 13:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 11:27 [PATCH] format-patch: autonumber by default Giuseppe Bilotta
2008-10-02 12:33 ` Johannes Schindelin
2008-10-02 13:10 ` Giuseppe Bilotta
2008-10-02 13:42 ` Johannes Schindelin
2008-10-02 13:47 ` Giuseppe Bilotta [this message]
2008-10-02 14:08 ` Jakub Narebski
2008-10-02 14:14 ` Andreas Ericsson
2008-10-02 17:58 ` Giuseppe Bilotta
2008-10-02 20:03 ` Jeff King
2008-10-02 20:15 ` Giuseppe Bilotta
2008-10-02 21:06 ` Jeff King
2008-10-02 20:17 ` Brian Gernhardt
2008-10-02 20:36 ` Brian Gernhardt
2008-10-02 20:41 ` Brian Gernhardt
2008-10-02 20:50 ` Brian Gernhardt
2008-10-02 20:55 ` [PATCH v2] " Brian Gernhardt
2009-11-04 11:20 ` Eric W. Biederman
2009-11-04 17:38 ` Junio C Hamano
2009-11-04 17:48 ` Brian Gernhardt
2008-10-02 13:43 ` [PATCH] " Andreas Ericsson
2008-10-02 13:54 ` Johannes Sixt
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=1222955278-16908-1-git-send-email-giuseppe.bilotta@gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--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).