Skip to content

Commit 684d91b

Browse files
committed
tests (mingw): remove Bash-specific pwd option
The -W option is only understood by MSYS2 Bash's pwd command. We already make sure to override `pwd` by `builtin pwd -W` for MINGW, so let's not double the effort here. This will also help when switching the shell to another one (such as BusyBox' ash) whose pwd does *not* understand the -W option. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 510c2d6 commit 684d91b

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

t/t2029-checkout-long-paths.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test_expect_success cleanup '
5959
'
6060

6161
# check that the template used in the test won't be too long:
62-
abspath="$(pwd -W)"/testdir
62+
abspath="$(pwd)"/testdir
6363
test ${#abspath} -gt 230 ||
6464
test_set_prereq SHORTABSPATH
6565

t/t3700-add.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ test_expect_success 'all statuses changed in folder if . is given' '
404404
'
405405

406406
test_expect_success MINGW 'path is case-insensitive' '
407-
path="$(pwd -W)/BLUB" &&
407+
path="$(pwd)/BLUB" &&
408408
touch "$path" &&
409409
downcased="$(echo "$path" | tr A-Z a-z)" &&
410410
git add "$downcased"

t/t9902-completion.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ invalid_variable_name='${foo.bar}'
124124

125125
actual="$TRASH_DIRECTORY/actual"
126126

127-
if test_have_prereq MINGW
128-
then
129-
ROOT="$(pwd -W)"
130-
else
131-
ROOT="$(pwd)"
132-
fi
127+
ROOT="$(pwd)"
133128

134129
test_expect_success 'setup for __git_find_repo_path/__gitdir tests' '
135130
mkdir -p subdir/subsubdir &&

0 commit comments

Comments
 (0)