summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bac8037)
raw | patch | inline | side by side (parent: bac8037)
author | Jeff King <peff@peff.net> | |
Wed, 30 Dec 2009 11:01:09 +0000 (06:01 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 6 Jan 2010 07:41:51 +0000 (23:41 -0800) |
Currently textconv helpers are run directly. Running through
the shell is useful because the user can provide a program
with command line arguments, like "antiword -f".
It also makes textconv more consistent with other parts of
git, most of which run their helpers using the shell.
The downside is that textconv helpers with shell
metacharacters (like space) in the filename will be broken.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the shell is useful because the user can provide a program
with command line arguments, like "antiword -f".
It also makes textconv more consistent with other parts of
git, most of which run their helpers using the shell.
The downside is that textconv helpers with shell
metacharacters (like space) in the filename will be broken.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history | |
t/t4030-diff-textconv.sh | patch | blob | history | |
t/t4031-diff-rewrite-binary.sh | patch | blob | history |
index 08bbd3e9070996b38f4d34cedf7640d93aa5808d..4af7c3f9257a32ce694ff3dc902fe0aa71d4820b 100644 (file)
--- a/diff.c
+++ b/diff.c
*arg = NULL;
memset(&child, 0, sizeof(child));
+ child.use_shell = 1;
child.argv = argv;
child.out = -1;
if (start_command(&child) != 0 ||
index a3f0897a52ce2147388baeac6fc64d3b8501b516..c16d538f4694e86c4a1159ea121afe2b35f47ad2 100755 (executable)
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
test_expect_success 'setup textconv filters' '
echo file diff=foo >.gitattributes &&
- git config diff.foo.textconv "$PWD"/hexdump &&
+ git config diff.foo.textconv "\"$PWD\""/hexdump &&
git config diff.fail.textconv false
'
index a894c6062271c53b688830a3230d1c78fb561d70..27fb31b401b16e967cdf7a3eac91e3ac03150ba8 100755 (executable)
test_expect_success 'setup textconv' '
echo file diff=foo >.gitattributes &&
- git config diff.foo.textconv "$PWD"/dump
+ git config diff.foo.textconv "\"$PWD\""/dump
'
test_expect_success 'rewrite diff respects textconv' '