Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
receive-pack: call string_list_clear() unconditionally
author
René Scharfe
<l.s.r@web.de>
Sun, 29 Jan 2017 13:09:46 +0000
(14:09 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 30 Jan 2017 23:08:58 +0000
(15:08 -0800)
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>
builtin/receive-pack.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
ad36dc8
)
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index e6b3879a5b90034937dfb8eee32f8d2981f6bb53..a03da29e2c875a7bdf1998a71dfbbb5cb0e42761 100644
(file)
--- 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,