Skip to content

Commit f0d2a05

Browse files
committed
Merge branch 'lw/test-fix'
* lw/test-fix: t/test-lib.sh: resolve symlinks in working directory, for pathname comparisons
2 parents 0cc01c9 + 1bd9c64 commit f0d2a05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/test-lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ rm -fr "$test" || {
419419
}
420420

421421
test_create_repo "$test"
422-
cd "$test" || exit 1
422+
# Use -P to resolve symlinks in our working directory so that the cwd
423+
# in subprocesses like git equals our $PWD (for pathname comparisons).
424+
cd -P "$test" || exit 1
423425

424426
this_test=$(expr "./$0" : '.*/\(t[0-9]*\)-[^/]*$')
425427
for skp in $GIT_SKIP_TESTS

0 commit comments

Comments
 (0)