From: Collin Funk <collin.funk1@gmail.com>
To: aum2357 <ahambrahmasmi2357@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>
Date: Fri, 13 Mar 2026 07:41:46 -0700 [thread overview]
Message-ID: <m1fr63zt91.fsf@gmail.com> (raw)
In-Reply-To: <20260313133937.562603-1-ahambrahmasmi2357@gmail.com> (aum's message of "Fri, 13 Mar 2026 19:09:37 +0530")
aum2357 <ahambrahmasmi2357@gmail.com> writes:
> diff: use conventional comparison order
>
> Replace `0 <= addremove_explicit` with `addremove_explicit >= 0`
> to follow the common coding style where variables appear on the
> left side of comparisons.
> ---
> builtin/add.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/add.c b/builtin/add.c
> index 0ee21692c2..ad0d6047af 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -432,7 +432,7 @@ int cmd_add(int argc,
> argc--;
> argv++;
>
> - if (0 <= addremove_explicit)
> + if ( addremove_explicit >= 0 )
> addremove = addremove_explicit;
> else if (take_worktree_changes && ADDREMOVE_DEFAULT)
> addremove = 0; /* "-u" was given but not "-A" */
See a previous thread on this topic [1].
We have a dead link in the Coreutils README-hacking that is likely to
that thread. We also generally prefer the previous ordering there.
Collin
[1] https://public-inbox.org/git/7vekbwru6x.fsf@assigned-by-dhcp.cox.net/
next prev parent reply other threads:[~2026-03-13 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:39 [PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com> aum2357
2026-03-13 14:41 ` Collin Funk [this message]
2026-03-13 17:43 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2026-03-13 13:58 aum2357
2026-03-13 13:55 aum2357
2026-03-13 13:34 aum2357
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1fr63zt91.fsf@gmail.com \
--to=collin.funk1@gmail.com \
--cc=ahambrahmasmi2357@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox