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
@@@ -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.
@@@ -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
@@@ -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