@matheusbsbs / matheus-bagliano / commits / e70f320251
Fork 0

t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH

The git wrapper executable always prepends the GIT_EXEC_PATH build variable to the current PATH, so prepending "." to the PATH is not enough to give precedence to the fake vi executable. The --exec-path option allows to prepend a directory to PATH even before GIT_EXEC_PATH (which is added anyway), so we can use that instead. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Björn Steinbrink committed Nov 11, 2007 at 18:38 UTC e70f3202512a022898657047b59b46355be1631b
1 file changed +2 -3
t/t7005-editor.sh
+2 -3
@@ -13,7 +13,6 @@ do
13 done
14 unset vi
15 mv e-vi.sh vi
16 -PATH=".:$PATH"
16 unset EDITOR VISUAL GIT_EDITOR
17
18 test_expect_success setup '
@@ -59,7 +58,7 @@ do
58 ;;
59 esac
60 test_expect_success "Using $i" '
62 - git commit --amend &&
61 + git --exec-path=. commit --amend &&
62 git show -s --pretty=oneline |
63 sed -e "s/^[0-9a-f]* //" >actual &&
64 diff actual expect
@@ -81,7 +80,7 @@ do
80 ;;
81 esac
82 test_expect_success "Using $i (override)" '
84 - git commit --amend &&
83 + git --exec-path=. commit --amend &&
84 git show -s --pretty=oneline |
85 sed -e "s/^[0-9a-f]* //" >actual &&
86 diff actual expect