Skip to content

Commit 58461bd

Browse files
committed
t1308: do not get fooled by symbolic links to the source tree
When your $PWD does not match $(/bin/pwd), e.g. you have your copy of the git source tree in one place, point it with a symbolic link, and then "cd" to that symbolic link before running 'make test', one of the tests in t1308 expects that the per-user configuration was reported to have been read from the true path (i.e. relative to the target of such a symbolic link), but the test-config program reports a path relative to $PWD (i.e. the symbolic link). Instead, expect a path relative to $HOME (aka $TRASH_DIRECTORY), as per-user configuration is read from $HOME/.gitconfig and the test framework sets these shell variables up in such a way to avoid this problem. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9acc591 commit 58461bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t1308-config-set.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ test_expect_success 'iteration shows correct origins' '
237237
key=foo.bar
238238
value=from-home
239239
origin=file
240-
name=$(pwd)/.gitconfig
240+
name=$HOME/.gitconfig
241241
scope=global
242242
243243
key=foo.bar

0 commit comments

Comments
 (0)