]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
run-command: introduce CHILD_PROCESS_INIT
authorRené Scharfe <l.s.r@web.de>
Tue, 19 Aug 2014 19:09:35 +0000 (21:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Aug 2014 16:53:37 +0000 (09:53 -0700)
commitd3180279322c7450a47decf8833de47f444ca93f
tree6b15045aef08b51a0831ee75bb67fd0beddc0d0c
parent6c4ab27f2378ce67940b4496365043119d7ffff2
run-command: introduce CHILD_PROCESS_INIT

Most struct child_process variables are cleared using memset first after
declaration.  Provide a macro, CHILD_PROCESS_INIT, that can be used to
initialize them statically instead.  That's shorter, doesn't require a
function call and is slightly more readable (especially given that we
already have STRBUF_INIT, ARGV_ARRAY_INIT etc.).

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
40 files changed:
Documentation/technical/api-run-command.txt
archive-tar.c
builtin/add.c
builtin/commit.c
builtin/help.c
builtin/merge.c
builtin/notes.c
builtin/receive-pack.c
builtin/remote-ext.c
builtin/repack.c
builtin/replace.c
builtin/verify-pack.c
bundle.c
column.c
connect.c
connected.c
convert.c
credential-cache.c
credential.c
daemon.c
diff.c
editor.c
fetch-pack.c
gpg-interface.c
http-backend.c
http.c
imap-send.c
pager.c
prompt.c
remote-curl.c
remote-testsvn.c
run-command.c
run-command.h
send-pack.c
submodule.c
test-run-command.c
test-subprocess.c
transport.c
upload-pack.c
wt-status.c