summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-02 21:36:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-02 21:36:57 (GMT)
commit140d41ae87274303f972702ce394544407d5c21e (patch)
tree630feb77aef4250096b6460a909665fe0d2720f6
parentf1fac407f5657ca9a8aa6d3909daa1e7e3036404 (diff)
parent4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65 (diff)
downloadgit-140d41ae87274303f972702ce394544407d5c21e.zip
git-140d41ae87274303f972702ce394544407d5c21e.tar.gz
git-140d41ae87274303f972702ce394544407d5c21e.tar.bz2
Merge branch 'rs/receive-pack-cleanup'
Code clean-up. * rs/receive-pack-cleanup: receive-pack: call string_list_clear() unconditionally
-rw-r--r--builtin/receive-pack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 6b97cbd..1dbb8a0 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,