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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <benji@...>
Cc: <aroben@...>, <dak@...>, <Johannes.Schindelin@...>, <git@...>
Date: Sunday, November 11, 2007 - 1:38 pm

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>
---
 t/t7005-editor.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 01cc0c0..0b36ee1 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -61,7 +61,7 @@ do
 		;;
 	esac
 	test_expect_success "Using $i" '
-		git commit --amend &&
+		git --exec-path=. commit --amend &&
 		git show -s --pretty=oneline |
 		sed -e "s/^[0-9a-f]* //" >actual &&
 		diff actual expect
@@ -83,7 +83,7 @@ do
 		;;
 	esac
 	test_expect_success "Using $i (override)" '
-		git commit --amend &&
+		git --exec-path=. commit --amend &&
 		git show -s --pretty=oneline |
 		sed -e "s/^[0-9a-f]* //" >actual &&
 		diff actual expect
-- 
1.5.3.5.622.g6fd7a

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
t7005 and vi in GIT_EXEC_PATH, Brian Gernhardt, (Sat Nov 10, 6:03 pm)
[PATCH] t7005-editor.sh: Don't invoke real vi when it is in ..., Björn Steinbrink, (Sun Nov 11, 1:38 pm)
Re: [PATCH] t7005-editor.sh: Don't invoke real vi when it is..., Johannes Schindelin, (Sun Nov 11, 1:44 pm)
Re: [PATCH] t7005-editor.sh: Don't invoke real vi when it is..., Johannes Schindelin, (Sun Nov 11, 2:31 pm)
Re: t7005 and vi in GIT_EXEC_PATH, Johannes Schindelin, (Sun Nov 11, 11:58 am)
Re: t7005 and vi in GIT_EXEC_PATH, Brian Gernhardt, (Sun Nov 11, 12:10 pm)
Re: t7005 and vi in GIT_EXEC_PATH, Junio C Hamano, (Sun Nov 11, 3:43 pm)
Re: t7005 and vi in GIT_EXEC_PATH, Junio C Hamano, (Sun Nov 11, 5:29 pm)
[PATCH] Use the best available exec path only, Björn, (Sun Nov 11, 4:33 pm)
Re: [PATCH] Use the best available exec path only, Johannes Schindelin, (Sun Nov 11, 4:50 pm)
Re: [PATCH] Use the best available exec path only, Johannes Schindelin, (Sun Nov 11, 5:40 pm)
Re: t7005 and vi in GIT_EXEC_PATH, Johannes Schindelin, (Sun Nov 11, 12:28 pm)
Re: t7005 and vi in GIT_EXEC_PATH, David Kastrup, (Sat Nov 10, 6:09 pm)
Re: t7005 and vi in GIT_EXEC_PATH, Brian Gernhardt, (Sat Nov 10, 6:45 pm)