Revert "checkout: retire --ignore-other-worktrees in favor of --force"
[gitweb.git] / git-rebase--interactive.sh
index b64dd28acf86e0b3075a638ae3419fb3a79a1815..b32f797aa91bff965c8d35c0e2b591ff52f1fb4e 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."