git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] format-patch: give --reroll-count a short synonym -v

From
Philip Oakley <philipoakley@iee.org>
Date
Jan 4, 2013, 00:28 UTC
Message-ID
<A6A2DEC8F88743B88AA03DC5BD8547B7@PhilipOakley>
In-Reply-To
<1357166525-12188-2-git-send-email-gitster@pobox.com>
From: "Junio C Hamano" <gitster@pobox.com> Sent: Wednesday, January 02, 
2013 10:42 PM
Show 65 quoted lines
> 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".
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> * As I do not think of a reason why users would want to tell the
>   command to be "verbose", I think it may be OK to squat on the
>   short and sweet single letter option, but I do not mind dropping
>   it.
>
> Documentation/git-format-patch.txt | 3 ++-
> builtin/log.c                      | 2 +-
> t/t4014-format-patch.sh            | 8 ++++++++
> 3 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-format-patch.txt 
> b/Documentation/git-format-patch.txt
> index 736d8bf..ae3212e 100644
> --- a/Documentation/git-format-patch.txt
> +++ b/Documentation/git-format-patch.txt
> @@ -18,7 +18,7 @@ SYNOPSIS
>     [--start-number <n>] [--numbered-files]
>     [--in-reply-to=Message-Id] [--suffix=.<sfx>]
>     [--ignore-if-in-upstream]
> -    [--subject-prefix=Subject-Prefix] [--reroll-count <n>]
> +    [--subject-prefix=Subject-Prefix] [(--reroll-count|-v) <n>]
>     [--to=<email>] [--cc=<email>]
>     [--cover-letter] [--quiet]
>     [<common diff options>]
> @@ -166,6 +166,7 @@ will want to ensure that threading is disabled for 
> `git send-email`.
>  allows for useful naming of a patch series, and can be
>  combined with the `--numbered` option.
>
> +-v <n>::
> --reroll-count=<n>::
>  Mark the series as the <n>-th iteration of the topic. The
>  output filenames have `v<n>` pretended to them, and the
> diff --git a/builtin/log.c b/builtin/log.c
> index e101498..08e8a9d 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -1081,7 +1081,7 @@ int cmd_format_patch(int argc, const char 
> **argv, const char *prefix)
>      N_("use <sfx> instead of '.patch'")),
>  OPT_INTEGER(0, "start-number", &start_number,
>      N_("start numbering patches at <n> instead of 1")),
> - OPT_INTEGER(0, "reroll-count", &reroll_count,
> + OPT_INTEGER('v', "reroll-count", &reroll_count,
>      N_("mark the series as Nth re-roll")),
>  { OPTION_CALLBACK, 0, "subject-prefix", &rev, N_("prefix"),
>      N_("Use [<prefix>] instead of [PATCH]"),
> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index 0ff9958..03b8e51 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -245,6 +245,14 @@ test_expect_success 'reroll count' '
>  ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
> '
>
> +test_expect_success 'reroll count (-v)' '
> + rm -fr patches &&
> + git format-patch -o patches --cover-letter -v 4 master..side >list 
> &&

Shouldn't this be using the sticked form -v4 as described in the commit message and gitcli? Or is this being too picky?

Show 11 quoted lines
> + ! grep -v "^patches/v4-000[0-3]-" list &&
> + sed -n -e "/^Subject: /p" $(cat list) >subjects &&
> + ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
> +'
> +
> check_threading () {
>  expect="$1" &&
>  shift &&
> -- 
> 1.8.0.9.g5e84801
>
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “format-patch: document and test --reroll-count”
  1. 1/2 format-patch: document and test --reroll-countJunio C Hamano, Jan 2, 2013
  2. 2/2 format-patch: give --reroll-count a short synonym -vJunio C Hamano, Jan 2, 2013
  3. Philip OakleyJan 4, 2013
  4. Junio C HamanoJan 4, 2013
  5. Junio C HamanoJan 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.