format-patch: give --reroll-count a short synonym -v

Accept "-v" as a synonym to "--reroll-count", so that users can say "git format-patch -v4 master", instead of having to fully spell it out as "git format-patch --reroll-count=4 master". As I do not think of a reason why users would want to tell the command to be "verbose", I think this should be OK. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jan 2, 2013 at 14:19 UTC 7952ea66e72d1129afbebcdde11dcbeecd92698a
3 files changed +11 -2
Documentation/git-format-patch.txt
+2 -1
@@ -18,7 +18,7 @@ SYNOPSIS
18 [--start-number <n>] [--numbered-files]
19 [--in-reply-to=Message-Id] [--suffix=.<sfx>]
20 [--ignore-if-in-upstream]
21 - [--subject-prefix=Subject-Prefix] [--reroll-count <n>]
21 + [--subject-prefix=Subject-Prefix] [(--reroll-count|-v) <n>]
22 [--to=<email>] [--cc=<email>]
23 [--cover-letter] [--quiet]
24 [<common diff options>]
@@ -166,6 +166,7 @@ will want to ensure that threading is disabled for `git send-email`.
166 allows for useful naming of a patch series, and can be
167 combined with the `--numbered` option.
168
169 +-v <n>::
170 --reroll-count=<n>::
171 Mark the series as the <n>-th iteration of the topic. The
172 output filenames have `v<n>` pretended to them, and the
builtin/log.c
+1 -1
@@ -1081,7 +1081,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1081 N_("use <sfx> instead of '.patch'")),
1082 OPT_INTEGER(0, "start-number", &start_number,
1083 N_("start numbering patches at <n> instead of 1")),
1084 - OPT_INTEGER(0, "reroll-count", &reroll_count,
1084 + OPT_INTEGER('v', "reroll-count", &reroll_count,
1085 N_("mark the series as Nth re-roll")),
1086 { OPTION_CALLBACK, 0, "subject-prefix", &rev, N_("prefix"),
1087 N_("Use [<prefix>] instead of [PATCH]"),
t/t4014-format-patch.sh
+8
@@ -245,6 +245,14 @@ test_expect_success 'reroll count' '
245 ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
246 '
247
248 +test_expect_success 'reroll count (-v)' '
249 + rm -fr patches &&
250 + git format-patch -o patches --cover-letter -v4 master..side >list &&
251 + ! grep -v "^patches/v4-000[0-3]-" list &&
252 + sed -n -e "/^Subject: /p" $(cat list) >subjects &&
253 + ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
254 +'
255 +
256 check_threading () {
257 expect="$1" &&
258 shift &&