Merge branch 'pa/cherry-pick-doc-typo'
[gitweb.git] / git-rebase.sh
index cf60c4390870ef28cff08b6a173a435d41e2d470..44ede367ae0e24ad80ba91608d26ad3bd4bbd8da 100755 (executable)
@@ -87,7 +87,10 @@ preserve_merges=
 autosquash=
 keep_empty=
 test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
-gpg_sign_opt=
+case "$(git config --bool commit.gpgsign)" in
+true)  gpg_sign_opt=-S ;;
+*)     gpg_sign_opt= ;;
+esac
 
 read_basic_state () {
        test -f "$state_dir/head-name" &&
@@ -248,6 +251,7 @@ do
                ;;
        --exec=*)
                cmd="${cmd}exec ${1#--exec=}${LF}"
+               test -z "$interactive_rebase" && interactive_rebase=implied
                ;;
        --interactive)
                interactive_rebase=explicit
@@ -348,12 +352,6 @@ do
 done
 test $# -gt 2 && usage
 
-if test -n "$cmd" &&
-   test "$interactive_rebase" != explicit
-then
-       die "$(gettext "The --exec option must be used with the --interactive option")"
-fi
-
 if test -n "$action"
 then
        test -z "$in_progress" && die "$(gettext "No rebase in progress?")"