Merge branch 'jc/t2300-setup'
authorJunio C Hamano <gitster@pobox.com>
Fri, 10 Jun 2016 22:26:04 +0000 (15:26 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jun 2016 22:26:04 +0000 (15:26 -0700)
A test fix.

* jc/t2300-setup:
  t2300: run git-sh-setup in an environment that better mimics the real life

t/t2300-cd-to-toplevel.sh

index 9965bc5..cccd7d9 100755 (executable)
@@ -8,7 +8,8 @@ test_cd_to_toplevel () {
        test_expect_success $3 "$2" '
                (
                        cd '"'$1'"' &&
-                       . "$(git --exec-path)"/git-sh-setup &&
+                       PATH="$(git --exec-path):$PATH" &&
+                       . git-sh-setup &&
                        cd_to_toplevel &&
                        [ "$(pwd -P)" = "$TOPLEVEL" ]
                )