Merge branch 'mh/tempfile'
[gitweb.git] / git-rebase.sh
index 90854e38cb9ceb6985a5d7bd9faae722ed92361f..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
 }