summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2018-03-20 11:10:55 +0000
committerJunio C Hamano <gitster@pobox.com>2018-03-29 11:09:03 -0700
commita852ec7f273cf61296a80ddfc26c23acf2163f2f (patch)
tree6abd2e0b2cb0e5b1de53c303950d4c661d341921 /git-rebase--interactive.sh
parent56173d28a5fb811c9525a8d5052ab6d83a07122e (diff)
downloadgit-a852ec7f273cf61296a80ddfc26c23acf2163f2f.tar.gz
rebase: extend --signoff support
Allow --signoff to be used with --interactive and --merge. In interactive mode only commits marked to be picked, edited or reworded will be signed off. The main motivation for this patch was to allow one to run 'git rebase --exec "make check" --signoff' which is useful when preparing a patch series for publication and is more convenient than doing the signoff with another --exec command. This change also allows --root without --onto to work with --signoff as well (--root with --onto was already supported). Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index d47bd29593..2bcdb67982 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -283,7 +283,7 @@ pick_one () {
pick_one_preserving_merges "$@" && return
output eval git cherry-pick $allow_rerere_autoupdate \
${gpg_sign_opt:+$(git rev-parse --sq-quote "$gpg_sign_opt")} \
- "$strategy_args" $empty_args $ff "$@"
+ $signoff "$strategy_args" $empty_args $ff "$@"
# If cherry-pick dies it leaves the to-be-picked commit unrecorded. Reschedule
# previous task so this commit is not lost.
@@ -524,10 +524,10 @@ do_pick () {
# resolve before manually running git commit --amend then git
# rebase --continue.
git commit --allow-empty --allow-empty-message --amend \
- --no-post-rewrite -n -q -C $sha1 &&
+ --no-post-rewrite -n -q -C $sha1 $signoff &&
pick_one -n $sha1 &&
git commit --allow-empty --allow-empty-message \
- --amend --no-post-rewrite -n -q -C $sha1 \
+ --amend --no-post-rewrite -n -q -C $sha1 $signoff \
${gpg_sign_opt:+"$gpg_sign_opt"} ||
die_with_patch $sha1 "$(eval_gettext "Could not apply \$sha1... \$rest")"
else