From 4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 29 Jan 2017 14:09:46 +0100 Subject: 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 e6b3879..a03da29 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, -- cgit v0.10.2-6-g49f6