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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Jan 29, 2017 at 14:09 UTC
4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65
1 file changed
+1
-2
builtin/receive-pack.c
+1
-2
@@ -1942,8 +1942,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
1942
run_receive_hook(commands, "post-receive", 1,
1943
&push_options);
1944
run_update_post_hook(commands);
1945
- if (push_options.nr)
1946
- string_list_clear(&push_options, 0);
1945
+ string_list_clear(&push_options, 0);
1946
if (auto_gc) {
1947
const char *argv_gc_auto[] = {
1948
"gc", "--auto", "--quiet", NULL,