summaryrefslogtreecommitdiff
path: root/builtin/notes.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-09-11 10:33:27 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-11 10:33:27 -0700
commit825fd93767510895a98ad7f12e3c1af3e40e367b (patch)
treeea3b4beac8dae69e2b45c9bfb8ce2cc21f462499 /builtin/notes.c
parentMerge branch 'jk/contrib-subtree-make-all' (diff)
parentrun-command: inline prepare_run_command_v_opt() (diff)
downloadtgif-825fd93767510895a98ad7f12e3c1af3e40e367b.tar.xz
Merge branch 'rs/child-process-init'
Code clean-up. * rs/child-process-init: run-command: inline prepare_run_command_v_opt() run-command: call run_command_v_opt_cd_env() instead of duplicating it run-command: introduce child_process_init() run-command: introduce CHILD_PROCESS_INIT
Diffstat (limited to 'builtin/notes.c')
-rw-r--r--builtin/notes.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/notes.c b/builtin/notes.c
index 820c34135c..c25a412510 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -122,12 +122,11 @@ static void write_commented_object(int fd, const unsigned char *object)
{
const char *show_args[5] =
{"show", "--stat", "--no-notes", sha1_to_hex(object), NULL};
- struct child_process show;
+ struct child_process show = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT;
struct strbuf cbuf = STRBUF_INIT;
/* Invoke "git show --stat --no-notes $object" */
- memset(&show, 0, sizeof(show));
show.argv = show_args;
show.no_stdin = 1;
show.out = -1;