Merge branch 'jk/rebase-no-autostash' into maint
[gitweb.git] / git-rebase.sh
index 95a45938ada989488aaeac1eab2d6f45c81596be..af7ba5fd90c3000892ed31893e1812514e4f3773 100755 (executable)
@@ -202,9 +202,9 @@ run_specific_rebase () {
 
 run_pre_rebase_hook () {
        if test -z "$ok_to_skip_pre_rebase" &&
-          test -x "$GIT_DIR/hooks/pre-rebase"
+          test -x "$(git rev-parse --git-path hooks/pre-rebase)"
        then
-               "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} ||
+               "$(git rev-parse --git-path hooks/pre-rebase)" ${1+"$@"} ||
                die "$(gettext "The pre-rebase hook refused to rebase.")"
        fi
 }
@@ -585,7 +585,7 @@ then
                # Lazily switch to the target branch if needed...
                test -z "$switch_to" ||
                GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \
-                       git checkout "$switch_to" --
+                       git checkout -q "$switch_to" --
                say "$(eval_gettext "Current branch \$branch_name is up to date.")"
                finish_rebase
                exit 0