format-patch: update append_signoff prototype
This is a preparation step for merging with append_signoff from sequencer.c Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Brandon Casey <bcasey@nvidia.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
79133a66f7
commit
5289c56a72
@ -1058,7 +1058,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
struct commit *origin = NULL, *head = NULL;
|
||||
const char *in_reply_to = NULL;
|
||||
struct patch_ids ids;
|
||||
char *add_signoff = NULL;
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
int use_patch_format = 0;
|
||||
int quiet = 0;
|
||||
@ -1154,16 +1153,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |
|
||||
PARSE_OPT_KEEP_DASHDASH);
|
||||
|
||||
if (do_signoff) {
|
||||
const char *committer;
|
||||
const char *endpos;
|
||||
committer = git_committer_info(IDENT_STRICT);
|
||||
endpos = strchr(committer, '>');
|
||||
if (!endpos)
|
||||
die(_("bogus committer info %s"), committer);
|
||||
add_signoff = xmemdupz(committer, endpos - committer + 1);
|
||||
}
|
||||
|
||||
for (i = 0; i < extra_hdr.nr; i++) {
|
||||
strbuf_addstr(&buf, extra_hdr.items[i].string);
|
||||
strbuf_addch(&buf, '\n');
|
||||
@ -1354,7 +1343,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
total++;
|
||||
start_number--;
|
||||
}
|
||||
rev.add_signoff = add_signoff;
|
||||
rev.add_signoff = do_signoff;
|
||||
while (0 <= --nr) {
|
||||
int shown;
|
||||
commit = list[nr];
|
||||
|
Reference in New Issue
Block a user