shallow: rewrite functions to take object_id arguments
[gitweb.git] / git-rebase.sh
index 55da9db818665f39ed205d3c77352987e3ca9963..1757404bc271ba4e1a08eb30fe27542c35e3008e 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
 }
@@ -582,7 +582,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