{"thread":{"id":"65229","subject":"[PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>","startedAt":"2026-03-13T13:39:35Z","lastAt":"2026-03-13T17:43:16Z","messageCount":3,"participants":["aum2357","Collin Funk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"538887","messageId":"20260313133937.562603-1-ahambrahmasmi2357@gmail.com","threadId":"65229","inReplyTo":null,"subject":"[PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>","fromName":"aum2357","fromEmail":"ahambrahmasmi2357@gmail.com","sentAt":"2026-03-13T13:39:37Z","receivedAt":"2026-03-13T13:39:35Z","isPatch":true,"sender":{"key":"ahambrahmasmi2357@gmail.com","avatar":null},"body":"diff: use conventional comparison order\n\nReplace `0 <= addremove_explicit` with `addremove_explicit >= 0`\nto follow the common coding style where variables appear on the\nleft side of comparisons.\n---\n builtin/add.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 0ee21692c2..ad0d6047af 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -432,7 +432,7 @@ int cmd_add(int argc,\n \targc--;\n \targv++;\n \n-\tif (0 <= addremove_explicit)\n+\tif ( addremove_explicit >= 0 )\n \t\taddremove = addremove_explicit;\n \telse if (take_worktree_changes && ADDREMOVE_DEFAULT)\n \t\taddremove = 0; /* \"-u\" was given but not \"-A\" */\n-- \n2.53.0\n\n"},{"id":"538901","messageId":"m1fr63zt91.fsf@gmail.com","threadId":"65229","inReplyTo":"20260313133937.562603-1-ahambrahmasmi2357@gmail.com","subject":"Re: [PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2026-03-13T14:41:46Z","receivedAt":"2026-03-13T14:41:49Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"aum2357 <ahambrahmasmi2357@gmail.com> writes:\n\n> diff: use conventional comparison order\n>\n> Replace `0 <= addremove_explicit` with `addremove_explicit >= 0`\n> to follow the common coding style where variables appear on the\n> left side of comparisons.\n> ---\n>  builtin/add.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/builtin/add.c b/builtin/add.c\n> index 0ee21692c2..ad0d6047af 100644\n> --- a/builtin/add.c\n> +++ b/builtin/add.c\n> @@ -432,7 +432,7 @@ int cmd_add(int argc,\n>  \targc--;\n>  \targv++;\n>  \n> -\tif (0 <= addremove_explicit)\n> +\tif ( addremove_explicit >= 0 )\n>  \t\taddremove = addremove_explicit;\n>  \telse if (take_worktree_changes && ADDREMOVE_DEFAULT)\n>  \t\taddremove = 0; /* \"-u\" was given but not \"-A\" */\n\nSee a previous thread on this topic [1].\n\nWe have a dead link in the Coreutils README-hacking that is likely to\nthat thread. We also generally prefer the previous ordering there.\n\nCollin\n\n[1] https://public-inbox.org/git/7vekbwru6x.fsf@assigned-by-dhcp.cox.net/\n"},{"id":"538918","messageId":"xmqqa4wb62xa.fsf@gitster.g","threadId":"65229","inReplyTo":"m1fr63zt91.fsf@gmail.com","subject":"Re: [PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-13T17:43:13Z","receivedAt":"2026-03-13T17:43:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Collin Funk <collin.funk1@gmail.com> writes:\n\n> Subject: Re: [PATCH] Signed-off-by: aum2357 <ahambrahmasmi2357@gmail.com>\n\nThe commit title is not where sign-off is made.\n\n> aum2357 <ahambrahmasmi2357@gmail.com> writes:\n>\n>> diff: use conventional comparison order\n\nThe first line of the commit body begins with \"diff:\" but the patch\nis about \"add\".\n\n>> Replace `0 <= addremove_explicit` with `addremove_explicit >= 0`\n>> to follow the common coding style where variables appear on the\n>> left side of comparisons.\n>> ---\n>>  builtin/add.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/builtin/add.c b/builtin/add.c\n>> index 0ee21692c2..ad0d6047af 100644\n>> --- a/builtin/add.c\n>> +++ b/builtin/add.c\n>> @@ -432,7 +432,7 @@ int cmd_add(int argc,\n>>  \targc--;\n>>  \targv++;\n>>  \n>> -\tif (0 <= addremove_explicit)\n>> +\tif ( addremove_explicit >= 0 )\n> ... We also generally prefer the previous ordering there.\n\nCodingGuidelines say that \"We prefer a space between the function\nname and the parentheses, and no space inside the parentheses.\".  \n\nIt also says that \"less stable value on the left hand side\" and\n\"textual order match the actual order of values\" are both valid ways\nto write comparisons, and concludes \"Just do not mix styles in the\nsame part of the code and mimic existing styles in the\nneighbourhood.\"\n\nAnd as you point out, I think this file prefers the \"textual order\nmatches actual order\" style (there is only one violation of it in\nthe file, if I counted correctly, in prune_directory()).\n\nMany things in this patch contradicts the coding guidelines X-<.  I\nwish if the vger mailing list can use some e-mail lint installed to\nbounce a patch e-mail that ignores our guides like CodingGuidelines\nand SubmittingPatches before it reaches the list to the author, with\nexplanation.\n\n\n\n"}]}