summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-04-25 04:28:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-25 04:28:51 (GMT)
commit850e9257525ef2fa13e1d34ccce4e6b73085bb4e (patch)
tree9de3df7ba23ef1db1b95d1a51d98f00ce784711f /sequencer.c
parentd892beef52a293b271538481dbc76014672ddf09 (diff)
parentda27a6fbd50861149b32cfd1f9e5c36a935c575a (diff)
downloadgit-850e9257525ef2fa13e1d34ccce4e6b73085bb4e.zip
git-850e9257525ef2fa13e1d34ccce4e6b73085bb4e.tar.gz
git-850e9257525ef2fa13e1d34ccce4e6b73085bb4e.tar.bz2
Merge branch 'pw/rebase-signoff'
"git rebase" has learned to honor "--signoff" option when using backends other than "am" (but not "--preserve-merges"). * pw/rebase-signoff: rebase --keep-empty: always use interactive rebase rebase -p: error out if --signoff is given rebase: extend --signoff support
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index eedd45e..a7d31e0 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -127,6 +127,7 @@ static GIT_PATH_FUNC(rebase_path_rewritten_pending,
static GIT_PATH_FUNC(rebase_path_gpg_sign_opt, "rebase-merge/gpg_sign_opt")
static GIT_PATH_FUNC(rebase_path_orig_head, "rebase-merge/orig-head")
static GIT_PATH_FUNC(rebase_path_verbose, "rebase-merge/verbose")
+static GIT_PATH_FUNC(rebase_path_signoff, "rebase-merge/signoff")
static GIT_PATH_FUNC(rebase_path_head_name, "rebase-merge/head-name")
static GIT_PATH_FUNC(rebase_path_onto, "rebase-merge/onto")
static GIT_PATH_FUNC(rebase_path_autostash, "rebase-merge/autostash")
@@ -1604,7 +1605,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
}
}
- if (opts->signoff)
+ if (opts->signoff && !is_fixup(command))
append_signoff(&msgbuf, 0, 0);
if (is_rebase_i(opts) && write_author_script(msg.message) < 0)
@@ -2043,6 +2044,11 @@ static int read_populate_opts(struct replay_opts *opts)
if (file_exists(rebase_path_verbose()))
opts->verbose = 1;
+ if (file_exists(rebase_path_signoff())) {
+ opts->allow_ff = 0;
+ opts->signoff = 1;
+ }
+
read_strategy_opts(opts, &buf);
strbuf_release(&buf);