Re: [PATCH 2/2] removed else statement
From: Junio C Hamano <hidden>
Date: 2022-10-07 18:36:01
Victoria Dye [off-list ref] writes:
dsal3389 via GitGitGadget wrote:quoted
From: dsal3389 <redacted> there is no need for the else statement if we can do it more elegantly with a signle if statement we no "else"Similar recommendations on the commit message as in the previous patch [1]: - title should be prefixed with 'git.c:' - title & message should use the imperative mood (e.g. "remove else statement" instead of "removed else statement") - please fix typos - s/there/There - s/signle/single - s/we/with(?)
Thanks for these.
quoted
+ if (argc <= 0) {nit: argc is always >= 0 [2], so a more appropriate condition would be: if (!argc) There are lots of examples of that '!argc' conditional in Git, but none of the 'argc <= 0' pattern, so it's probably best to match convention here.
Yes to this, too.