Skip to content

Commit 1d71b35

Browse files
committed
t7800: fix quoting
When passing a command-line to call an external diff command to the difftool, we must be prepared for paths containing special characters, e.g. backslashes in the temporary directory's path on Windows. This has been caught by running the test suite with an MSVC-built Git: in contrast to the MINGW one, it does not rewrite `$TMP` to use forward slashes instead of backslashes. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 8e94b35 commit 1d71b35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7800-difftool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ test_expect_success 'difftool --extcmd cat arg1' '
332332
test_expect_success 'difftool --extcmd cat arg2' '
333333
echo branch >expect &&
334334
git difftool --no-prompt \
335-
--extcmd sh\ -c\ \"cat\ \$2\" branch >actual &&
335+
--extcmd sh\ -c\ \"cat\ \\\"\$2\\\"\" branch >actual &&
336336
test_cmp expect actual
337337
'
338338

0 commit comments

Comments
 (0)