t2300: use documented technique to invoke git-sh-setup
authorMatthew Ogilvie <mmogilvi_git@miniinfo.net>
Sat, 28 Nov 2009 18:38:54 +0000 (11:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Nov 2009 02:00:14 +0000 (18:00 -0800)
This is needed to allow the test suite to run against a standard
install bin directory instead of GIT_EXEC_PATH.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2300-cd-to-toplevel.sh
index 3b01ad2e4de152d23bbe8267d3b1a5cafd615e88..9965bc5c92445160895ae3ea426c5caf1b3458b3 100755 (executable)
@@ -8,7 +8,7 @@ test_cd_to_toplevel () {
        test_expect_success $3 "$2" '
                (
                        cd '"'$1'"' &&
-                       . git-sh-setup &&
+                       . "$(git --exec-path)"/git-sh-setup &&
                        cd_to_toplevel &&
                        [ "$(pwd -P)" = "$TOPLEVEL" ]
                )