summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-01-29 13:09:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-30 23:08:58 (GMT)
commit4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65 (patch)
tree2870e700cdfab223b15342a7fe7a37bbc9916de3 /builtin/receive-pack.c
parentad36dc8b4b165bf9eb3576b42a241164e312d48c (diff)
downloadgit-4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65.zip
git-4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65.tar.gz
git-4432dd6b5bb5ad33bb20966807c0fda4b0e3cb65.tar.bz2
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>
Diffstat (limited to 'builtin/receive-pack.c')
-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 e6b3879..a03da29 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,