We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 438d4e7 + 412b9a1 commit 3a30c14Copy full SHA for 3a30c14
t/t2300-cd-to-toplevel.sh
@@ -4,11 +4,19 @@ test_description='cd_to_toplevel'
4
5
. ./test-lib.sh
6
7
+EXEC_PATH="$(git --exec-path)"
8
+test_have_prereq !MINGW ||
9
+case "$EXEC_PATH" in
10
+[A-Za-z]:/*)
11
+ EXEC_PATH="/${EXEC_PATH%%:*}${EXEC_PATH#?:}"
12
+ ;;
13
+esac
14
+
15
test_cd_to_toplevel () {
16
test_expect_success $3 "$2" '
17
(
18
cd '"'$1'"' &&
- PATH="$(git --exec-path):$PATH" &&
19
+ PATH="$EXEC_PATH:$PATH" &&
20
. git-sh-setup &&
21
cd_to_toplevel &&
22
[ "$(pwd -P)" = "$TOPLEVEL" ]
0 commit comments