OSDN Git Service

rebase-i-exec: Allow space in SHELL_PATH
authorFredrik Medley <fredrik.medley@gmail.com>
Fri, 13 Nov 2015 06:03:19 +0000 (07:03 +0100)
committerJeff King <peff@peff.net>
Fri, 13 Nov 2015 22:51:39 +0000 (17:51 -0500)
On Windows, when Git is installed under "C:\Program Files\Git",
SHELL_PATH will include a space. Fix "git rebase --interactive --exec"
so that it works with spaces in SHELL_PATH.

Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
git-rebase--interactive.sh

index 30edb17..b938a6d 100644 (file)
@@ -610,7 +610,7 @@ do_next () {
                read -r command rest < "$todo"
                mark_action_done
                printf 'Executing: %s\n' "$rest"
-               ${SHELL:-@SHELL_PATH@} -c "$rest" # Actual execution
+               "${SHELL:-@SHELL_PATH@}" -c "$rest" # Actual execution
                status=$?
                # Run in subshell because require_clean_work_tree can die.
                dirty=f