Merge branch 'ah/submodule-typofix-in-error' into maint
[gitweb.git] / git-rebase--interactive.sh
index 0564ad41f2ef00f8c74a35e29ad5fb725988054c..5ff0f1c81ac8e72ce6a2358ca2fced0650571030 100644 (file)
@@ -655,9 +655,9 @@ do_next () {
                git notes copy --for-rewrite=rebase < "$rewritten_list" ||
                true # we don't care if this copying failed
        } &&
-       if test -x "$GIT_DIR"/hooks/post-rewrite &&
-               test -s "$rewritten_list"; then
-               "$GIT_DIR"/hooks/post-rewrite rebase < "$rewritten_list"
+       hook="$(git rev-parse --git-path hooks/post-rewrite)"
+       if test -x "$hook" && test -s "$rewritten_list"; then
+               "$hook" rebase < "$rewritten_list"
                true # we don't care if this hook failed
        fi &&
        warn "Successfully rebased and updated $head_name."