format-patch: allow a non-integral version numbers

The `-v<n>` option of `format-patch` can give nothing but an
integral iteration number to patches in a series.  Some people,
however, prefer to mark a new iteration with only a small fixup
with a non integral iteration number (e.g. an "oops, that was
wrong" fix-up patch for v4 iteration may be labeled as "v4.1").

Allow `format-patch` to take such a non-integral iteration
number.

`<n>` can be any string, such as '3.1' or '4rev2'. In the case
where it is a non-integral value, the "Range-diff" and "Interdiff"
headers will not include the previous version.

Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
ZheNing Hu
2021-03-23 11:12:25 +00:00
committed by Junio C Hamano
parent 90917373cd
commit db91988aa1
6 changed files with 88 additions and 12 deletions

View File

@@ -235,7 +235,7 @@ struct rev_info {
const char *mime_boundary;
const char *patch_suffix;
int numbered_files;
int reroll_count;
const char *reroll_count;
char *message_id;
struct ident_split from_ident;
struct string_list *ref_message_ids;