summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorBrian Gernhardt <benji@silverinsanity.com>2008-10-02 20:55:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-18 14:18:03 (GMT)
commita567fdcb016e8e882ec0a1e044c9caac8f70e693 (patch)
treef88049a47c7d2355574599e0beb49de7d47d9d6a /builtin-log.c
parent5c283eb13c94be6ca974aa722159dc9838d10d97 (diff)
downloadgit-a567fdcb016e8e882ec0a1e044c9caac8f70e693.zip
git-a567fdcb016e8e882ec0a1e044c9caac8f70e693.tar.gz
git-a567fdcb016e8e882ec0a1e044c9caac8f70e693.tar.bz2
format-patch: autonumber by default
format-patch is most commonly 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. In other words, the typical behavior expected from format-patch is the one obtained by enabling autonumber, so we set it to be the default. Users that want to disable numbering for a particular patchset can do so with the existing -N command-line switch. Users that want to change the default behavior can use the format.numbering config key. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Test-updates-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 794821f..a0944f7 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;
@@ -485,6 +485,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
return 0;
}
numbered = git_config_bool(var, value);
+ auto_number = auto_number && numbered;
return 0;
}