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

1  2 
builtin/receive-pack.c
diff --combined builtin/receive-pack.c
index 6b97cbdbe9444d72d575c149678e4b609a154842,a03da29e2c875a7bdf1998a71dfbbb5cb0e42761..1dbb8a069225be1e9d9fe27ad4b83a8bd66ca511
@@@ -795,8 -795,8 +795,8 @@@ static char *refuse_unconfigured_deny_m
           "with what you pushed, and will require 'git reset --hard' to match\n"
           "the work tree to HEAD.\n"
           "\n"
 -         "You can set 'receive.denyCurrentBranch' configuration variable to\n"
 -         "'ignore' or 'warn' in the remote repository to allow pushing into\n"
 +         "You can set the 'receive.denyCurrentBranch' configuration variable\n"
 +         "to 'ignore' or 'warn' in the remote repository to allow pushing into\n"
           "its current branch; however, this is not recommended unless you\n"
           "arranged to update its work tree to match what you pushed in some\n"
           "other way.\n"
@@@ -1942,8 -1942,7 +1942,7 @@@ int cmd_receive_pack(int argc, const ch
                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,