Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2010-12-30 23:51:53 +0300
committerJunio C Hamano <gitster@pobox.com>2011-01-11 21:49:38 +0300
commite6ec2b6a23a364de76cd8868d4df20627264eb45 (patch)
tree6a2e04e534c76d8a042effabba22e40cc5e2f518 /t/t1501-worktree.sh
parent2cf08b6a0ab09f1b81b78a5686a632a2a602abf4 (diff)
Fix expected values of setup tests on Windows
On Windows, bash stores absolute path names in shell variables in POSIX format that begins with a slash, rather than in drive-letter format; such a value is converted to the latter format when it is passed to a non-MSYS program such as git. When an expected test value is constructed, it must contain the value that will be produced by git, which will be in the drive-letter format. But TRASH_DIRECTORY is in POSIX format. Fix this by using $(pwd), which produces drive-letter format since 4114156a (Tests on Windows: $(pwd) must return Windows-style paths). The change in t1510 is a straight seach-and-replace, except for the first hunk of the diff. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1501-worktree.sh')
-rwxr-xr-xt/t1501-worktree.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index f072a8ed48..da6252b117 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -343,7 +343,7 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
- echo "$TRASH_DIRECTORY/repo.git/work" >expected &&
+ echo "$(pwd)/repo.git/work" >expected &&
test_cmp expected actual
'