From: René Scharfe Date: Sun, 29 Jan 2017 13:09:46 +0000 (+0100) Subject: receive-pack: call string_list_clear() unconditionally X-Git-Tag: v2.12.0-rc0~15^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65;p=git-core%2Fgit.git receive-pack: call string_list_clear() unconditionally string_list_clear() handles empty lists just fine, so remove the redundant check. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index e6b3879a5..a03da29e2 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1942,8 +1942,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) run_receive_hook(commands, "post-receive", 1, &push_options); run_update_post_hook(commands); - if (push_options.nr) - string_list_clear(&push_options, 0); + string_list_clear(&push_options, 0); if (auto_gc) { const char *argv_gc_auto[] = { "gc", "--auto", "--quiet", NULL,