{"thread":{"id":"45000","subject":"[PATCH] receive-pack: call string_list_clear() unconditionally","startedAt":"2017-01-29T13:18:08Z","lastAt":"2017-01-29T13:18:08Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"310507","messageId":"3dd27c57-9ba5-fc31-6e7e-414408cd63af@web.de","threadId":"45000","inReplyTo":null,"subject":"[PATCH] receive-pack: call string_list_clear() unconditionally","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-01-29T13:09:46Z","receivedAt":"2017-01-29T13:18:08Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"string_list_clear() handles empty lists just fine, so remove the\nredundant check.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n builtin/receive-pack.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/builtin/receive-pack.c b/builtin/receive-pack.c\nindex 6b97cbdbe..1dbb8a069 100644\n--- a/builtin/receive-pack.c\n+++ b/builtin/receive-pack.c\n@@ -1942,8 +1942,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)\n \t\trun_receive_hook(commands, \"post-receive\", 1,\n \t\t\t\t &push_options);\n \t\trun_update_post_hook(commands);\n-\t\tif (push_options.nr)\n-\t\t\tstring_list_clear(&push_options, 0);\n+\t\tstring_list_clear(&push_options, 0);\n \t\tif (auto_gc) {\n \t\t\tconst char *argv_gc_auto[] = {\n \t\t\t\t\"gc\", \"--auto\", \"--quiet\", NULL,\n-- \n2.11.0\n\n"}]}