Skip to content

Commit 665177e

Browse files
dschogitster
authored andcommitted
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 patch is needed in preparation for the next commit, which will make the MinGW version of Git *not* rewrite TMP to use forward slashes instead of backslashes. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cae598d commit 665177e

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)