diff options
| author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-03-20 11:10:55 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-03-29 11:09:03 -0700 |
| commit | a852ec7f273cf61296a80ddfc26c23acf2163f2f (patch) | |
| tree | 6abd2e0b2cb0e5b1de53c303950d4c661d341921 /git-rebase--interactive.sh | |
| parent | Merge branch 'pw/rebase-keep-empty-fixes' into pw/rebase-signoff (diff) | |
| download | git-a852ec7f273cf61296a80ddfc26c23acf2163f2f.tar.gz git-a852ec7f273cf61296a80ddfc26c23acf2163f2f.zip | |
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.sh | 6 |
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 |
