@matheusbsbs / matheus-bagliano / commits / 6396258368
Fork 0

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 <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Sixt committed Jan 1, 2010 at 23:15 UTC 6396258368b76d432090c81096755dc1fbc89551
2 files changed +2 -2
t/t4030-diff-textconv.sh
+1 -1
@@ -48,7 +48,7 @@ test_expect_success 'file is considered binary by plumbing' '
48
49 test_expect_success 'setup textconv filters' '
50 echo file diff=foo >.gitattributes &&
51 - git config diff.foo.textconv "\"$PWD\""/hexdump &&
51 + git config diff.foo.textconv "\"$(pwd)\""/hexdump &&
52 git config diff.fail.textconv false
53 '
54
t/t4031-diff-rewrite-binary.sh
+1 -1
@@ -54,7 +54,7 @@ chmod +x dump
54
55 test_expect_success 'setup textconv' '
56 echo file diff=foo >.gitattributes &&
57 - git config diff.foo.textconv "\"$PWD\""/dump
57 + git config diff.foo.textconv "\"$(pwd)\""/dump
58 '
59
60 test_expect_success 'rewrite diff respects textconv' '