Merge branch 'pw/rebase-signoff'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:51 +0000 (13:28 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:28:51 +0000 (13:28 +0900)
"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

1  2 
Documentation/git-rebase.txt
git-rebase--am.sh
git-rebase--interactive.sh
git-rebase--merge.sh
git-rebase.sh
sequencer.c
Simple merge
Simple merge
index 50323fc27351666440e76ae50806ee480e998da3,2bcdb67982befaf04ab28b4707051dfe228d12c7..9947e6265fe7c0bc4531fd928bbf2373a0ae7552
@@@ -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.
index 685f48ca49bcdac63f5577ac20daa2993be5e4a2,9a60cef05251d25be9112f8c58c344c892b0ea9a..cf4c0422148935906ad939c5351652a1531e5f0d
@@@ -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 548c15e4a16160e15a7f32cee8ace37284dbb850,ee8c77ad99895a8d6af79c7e0c7853dd3b1d3b61..ded5de085a87505b244b7449b1977c3779650640
@@@ -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 ;;
diff --cc sequencer.c
Simple merge