From 3590a8d71fdfaf8ef9076bb92be2720e594cfb71 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 7 Oct 2009 00:52:27 +0200 Subject: [PATCH] Avoid specifying (on Windows unimplemented) child_process.dir --- submodule.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/submodule.c b/submodule.c index e0848dd779..8df17ffe82 100644 --- a/submodule.c +++ b/submodule.c @@ -46,18 +46,19 @@ void show_submodule_summary(FILE *f, const char *path, if (!message) { struct child_process child; - struct strbuf range = STRBUF_INIT; + struct strbuf range = STRBUF_INIT, git_dir = STRBUF_INIT; const char* argv[] = { - "log", "--pretty=format: %m %s", "--left-right", + NULL, "log", "--pretty=format: %m %s", "--left-right", NULL, "--", NULL }; strbuf_addf(&range, "%s...%s", sha1_to_hex(one), sha1_to_hex(two)); - argv[3] = range.buf; + strbuf_addf(&git_dir, "--git-dir=%s/.git", path); + argv[0] = git_dir.buf; + argv[4] = range.buf; memset(&child, 0, sizeof(child)); child.argv = argv; - child.dir = path; child.no_stdin = 1; child.out = dup(fileno(f)); child.err = dup(fileno(stderr)); -- 2.11.4.GIT