Merge branch 'nd/multiple-work-trees'
[gitweb.git] / git-rebase--interactive.sh
index f7deeb096e24f4de69bdfe08f0aa35ebf170577a..08e5d86fe5b5eda37f2ab44c3cce6dabb42c54e1 100644 (file)
@@ -642,9 +642,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."