Merge branch 'rs/receive-pack-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Thu, 2 Feb 2017 21:36:56 +0000 (13:36 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Feb 2017 21:36:57 +0000 (13:36 -0800)
Code clean-up.

* rs/receive-pack-cleanup:
receive-pack: call string_list_clear() unconditionally

builtin/receive-pack.c
index 6b97cbdbe9444d72d575c149678e4b609a154842..1dbb8a069225be1e9d9fe27ad4b83a8bd66ca511 100644 (file)
@@ -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,