X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=convert.c;h=3fea3e95091b5c49a7b38db381524f50436d11cf;hb=7b3bdbb335b6be938b4748e86a41357e51c97804;hp=e70ee094a76d850cd655338d406a7c4efc37c7d5;hpb=8499da04766e46f50872b615a9972da53209253a;p=git.git diff --git a/convert.c b/convert.c index e70ee094a..3fea3e950 100644 --- a/convert.c +++ b/convert.c @@ -249,10 +249,13 @@ static int filter_buffer(int in, int out, void *data) struct child_process child_process; struct filter_params *params = (struct filter_params *)data; int write_err, status; - const char *argv[] = { "sh", "-c", params->cmd, NULL }; + const char *argv[] = { NULL, NULL }; + + argv[0] = params->cmd; memset(&child_process, 0, sizeof(child_process)); child_process.argv = argv; + child_process.use_shell = 1; child_process.in = -1; child_process.out = out; @@ -378,9 +381,9 @@ static void setup_convert_check(struct git_attr_check *check) static struct git_attr *attr_filter; if (!attr_crlf) { - attr_crlf = git_attr("crlf", 4); - attr_ident = git_attr("ident", 5); - attr_filter = git_attr("filter", 6); + attr_crlf = git_attr("crlf"); + attr_ident = git_attr("ident"); + attr_filter = git_attr("filter"); user_convert_tail = &user_convert; git_config(read_convert_config, NULL); }