diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2017-04-15 00:57:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-15 02:05:43 -0700 |
commit | c67308f0e4402f4c8ae4be60159521c27a32bf84 (patch) | |
tree | 6eba79962f8a5ef10b264723d621170dea006be9 /builtin/am.c | |
parent | cf11a67975b057a144618badf16dc4e3d25b9407 (diff) | |
download | git-gp/rebase-signoff.tar.gz |
rebase: pass --[no-]signoff option to git amgp/rebase-signoff
This makes it easy to sign off a whole patchset before submission.
To make things work, we also fix a design issue in git-am that made it
ignore the signoff option during rebase (specifically, signoff was
handled in parse_mail(), but not in parse_mail_rebasing()).
This is trivially fixed by moving the conditional addition of the
signoff from parse_mail() to the caller (am_run()), after either of the
parse_mail*() functions were called.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r-- | builtin/am.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/am.c b/builtin/am.c index f7a7a971fb..d072027b5a 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1321,9 +1321,6 @@ static int parse_mail(struct am_state *state, const char *mail) strbuf_addbuf(&msg, &mi.log_message); strbuf_stripspace(&msg, 0); - if (state->signoff) - am_signoff(&msg); - assert(!state->author_name); state->author_name = strbuf_detach(&author_name, NULL); @@ -1848,6 +1845,9 @@ static void am_run(struct am_state *state, int resume) if (skip) goto next; /* mail should be skipped */ + if (state->signoff) + am_append_signoff(state); + write_author_script(state); write_commit_msg(state); } |