Skip to content

Commit 6396258

Browse files
j6tgitster
authored andcommitted
t4030, t4031: work around bogus MSYS bash path conversion
Recall that MSYS bash converts POSIX style absolute paths to Windows style absolute paths. Unfortunately, it converts a program argument that begins with a double-quote and otherwise looks like an absolute POSIX path, but in doing so, it strips everything past the second double-quote[*]. This case is triggered in the two test scripts. The work-around is to place the Windows style path returned by $(pwd) between the quotes to avoid the path conversion. [*] It is already bogus that a conversion is even considered when a program argument begins with a double-quote because it cannot be an absolute POSIX path. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7ed7fac commit 6396258

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t4030-diff-textconv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test_expect_success 'file is considered binary by plumbing' '
4848

4949
test_expect_success 'setup textconv filters' '
5050
echo file diff=foo >.gitattributes &&
51-
git config diff.foo.textconv "\"$PWD\""/hexdump &&
51+
git config diff.foo.textconv "\"$(pwd)\""/hexdump &&
5252
git config diff.fail.textconv false
5353
'
5454

t/t4031-diff-rewrite-binary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ chmod +x dump
5454

5555
test_expect_success 'setup textconv' '
5656
echo file diff=foo >.gitattributes &&
57-
git config diff.foo.textconv "\"$PWD\""/dump
57+
git config diff.foo.textconv "\"$(pwd)\""/dump
5858
'
5959

6060
test_expect_success 'rewrite diff respects textconv' '

0 commit comments

Comments
 (0)