From: Junio C Hamano Date: Wed, 25 Apr 2018 04:28:51 +0000 (+0900) Subject: Merge branch 'pw/rebase-signoff' X-Git-Tag: v2.18.0-rc0~130 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/850e9257525ef2fa13e1d34ccce4e6b73085bb4e 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 --- 850e9257525ef2fa13e1d34ccce4e6b73085bb4e diff --cc git-rebase--interactive.sh index 50323fc273,2bcdb67982..9947e6265f --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@@ -283,9 -281,9 +283,9 @@@ pick_one () test -d "$rewritten" && pick_one_preserving_merges "$@" && return - output eval git cherry-pick $allow_rerere_autoupdate \ + output eval git cherry-pick $allow_rerere_autoupdate $allow_empty_message \ ${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. diff --cc git-rebase--merge.sh index 685f48ca49,9a60cef052..cf4c042214 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@@ -27,8 -27,7 +27,8 @@@ continue_merge () cmt=$(cat "$state_dir/current") if ! git diff-index --quiet --ignore-submodules HEAD -- then - if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message \ - if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} $signoff --no-verify -C "$cmt" ++ if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} $signoff $allow_empty_message \ + --no-verify -C "$cmt" then echo "Commit failed, please do not call \"git commit\"" echo "directly, but instead do one of the following: " diff --cc git-rebase.sh index 548c15e4a1,ee8c77ad99..ded5de085a --- a/git-rebase.sh +++ b/git-rebase.sh @@@ -92,7 -90,7 +92,8 @@@ action preserve_merges= autosquash= keep_empty= +allow_empty_message= + signoff= test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t case "$(git config --bool commit.gpgsign)" in true) gpg_sign_opt=-S ;;