Browse Source

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>
maint
René Scharfe 8 years ago committed by Junio C Hamano
parent
commit
4432dd6b5b
  1. 3
      builtin/receive-pack.c

3
builtin/receive-pack.c

@ -1942,8 +1942,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) @@ -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,

Loading…
Cancel
Save