diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-11 10:33:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-11 10:33:27 -0700 |
commit | 825fd93767510895a98ad7f12e3c1af3e40e367b (patch) | |
tree | ea3b4beac8dae69e2b45c9bfb8ce2cc21f462499 /builtin/notes.c | |
parent | Merge branch 'jk/contrib-subtree-make-all' (diff) | |
parent | run-command: inline prepare_run_command_v_opt() (diff) | |
download | tgif-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.c | 3 |
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; |