{"thread":{"id":"61748","subject":"Unbalanced closing paren in help of git commit","startedAt":"2024-07-07T12:39:09Z","lastAt":"2024-07-22T23:00:06Z","messageCount":8,"participants":["Tomas Nordin","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"498191","messageId":"87o7792xgu.fsf@posteo.net","threadId":"61748","inReplyTo":null,"subject":"Unbalanced closing paren in help of git commit","fromName":"Tomas Nordin","fromEmail":"tomasn@posteo.net","sentAt":"2024-07-07T12:33:21Z","receivedAt":"2024-07-07T12:39:09Z","isPatch":false,"sender":{"key":"tomasn@posteo.net","avatar":"https://avatars.githubusercontent.com/u/5942154?v=4"},"body":"Hello List\n\nThe second line of the help message for git commit looks like this:\n\n    [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n\nSee for example https://gitirc.eu/git-commit.html. It has two opening\nparens and three closing parens. <commit> ends with a closing paren\nbefore the closing bracket. Me and gsish (on IRC) suspect this is a\nmisstake.\n\nWhat do you think?\n\nPlease reply all, not suscribed to the list.\n\nBest regards\n--\nTomas\n"},{"id":"498215","messageId":"20240708085440.GA819809@coredump.intra.peff.net","threadId":"61748","inReplyTo":"87o7792xgu.fsf@posteo.net","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-07-08T08:54:40Z","receivedAt":"2024-07-08T08:54:41Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jul 07, 2024 at 12:33:21PM +0000, Tomas Nordin wrote:\n\n> The second line of the help message for git commit looks like this:\n> \n>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n> \n> See for example https://gitirc.eu/git-commit.html. It has two opening\n> parens and three closing parens. <commit> ends with a closing paren\n> before the closing bracket. Me and gsish (on IRC) suspect this is a\n> misstake.\n> \n> What do you think?\n\nYep, looks like a typo introduced by 00ea64ed7a (doc/git-commit: add\ndocumentation for fixup=[amend|reword] options, 2021-03-15).\n\nWant to try your hand at producing a patch? (It's OK if the answer is\nno; it just seems like a good opportunity for somebody to get their feet\nwet on contributing).\n\n-Peff\n"},{"id":"498310","messageId":"87le2b3cew.fsf@posteo.net","threadId":"61748","inReplyTo":"20240708085440.GA819809@coredump.intra.peff.net","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Tomas Nordin","fromEmail":"tomasn@posteo.net","sentAt":"2024-07-08T19:35:03Z","receivedAt":"2024-07-08T19:35:13Z","isPatch":false,"sender":{"key":"tomasn@posteo.net","avatar":"https://avatars.githubusercontent.com/u/5942154?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sun, Jul 07, 2024 at 12:33:21PM +0000, Tomas Nordin wrote:\n>\n>> The second line of the help message for git commit looks like this:\n>> \n>>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n>> \n>> See for example https://gitirc.eu/git-commit.html. It has two opening\n>> parens and three closing parens. <commit> ends with a closing paren\n>> before the closing bracket. Me and gsish (on IRC) suspect this is a\n>> misstake.\n>> \n>> What do you think?\n>\n> Yep, looks like a typo introduced by 00ea64ed7a (doc/git-commit: add\n> documentation for fixup=[amend|reword] options, 2021-03-15).\n\nI stumbled upon it while working on a synopsis parsing tool, similar to\nthe Python docopt if familiar.\n\n> Want to try your hand at producing a patch? (It's OK if the answer is\n> no; it just seems like a good opportunity for somebody to get their feet\n> wet on contributing).\n\nI can try, why not? Should I hang it up on this thread so to say. Is\nthis a bug report?\n"},{"id":"498313","messageId":"xmqqcynnejwl.fsf@gitster.g","threadId":"61748","inReplyTo":"87o7792xgu.fsf@posteo.net","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-08T19:57:46Z","receivedAt":"2024-07-08T19:57:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tomas Nordin <tomasn@posteo.net> writes:\n\n> Hello List\n>\n> The second line of the help message for git commit looks like this:\n\nThis seems to have come from 00ea64ed (doc/git-commit: add\ndocumentation for fixup=[amend|reword] options, 2021-03-15),\nif \"git blame\" is to be trusted.\n\n>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n\nWe can have --dry-run but we do not have to, we can have only one of\n\n    \"-c <commit>\"\n    \"-C <commit>\",\n    \"--squash <commit>\",\n    \"--fixup amend:<commit>\"\n    \"--fixup reword:<commit>\", or\n    \"--fixup <commit>\"\n\nas they are mutually exclusive, but it is OK if we have none of\nthem.\n\nThe last closing parenthesis after <commit> but before the closing\nsquare bracket is unwanted, I think, as you pointed out.\n\n"},{"id":"498329","messageId":"20240708233511.GB948906@coredump.intra.peff.net","threadId":"61748","inReplyTo":"87le2b3cew.fsf@posteo.net","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-07-08T23:35:11Z","receivedAt":"2024-07-08T23:35:15Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 08, 2024 at 07:35:03PM +0000, Tomas Nordin wrote:\n\n> > Want to try your hand at producing a patch? (It's OK if the answer is\n> > no; it just seems like a good opportunity for somebody to get their feet\n> > wet on contributing).\n> \n> I can try, why not? Should I hang it up on this thread so to say. Is\n> this a bug report?\n\nYou can do it as a reply to this thread, or you can start a new thread.\nIf there is a lot of discussion in the bug report thread, it is\nsometimes helpful to reference it in your commit message or cover\nletter. E.g. as:\n\n  https://lore.kernel.org/git/87o7792xgu.fsf@posteo.net/\n\nbut in this case the issue is simple enough that you can just describe\nthe problem fully in the commit message.\n\n-Peff\n"},{"id":"499030","messageId":"871q3nx7f3.fsf@posteo.net","threadId":"61748","inReplyTo":"xmqqcynnejwl.fsf@gitster.g","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Tomas Nordin","fromEmail":"tomasn@posteo.net","sentAt":"2024-07-21T12:21:04Z","receivedAt":"2024-07-21T12:29:01Z","isPatch":false,"sender":{"key":"tomasn@posteo.net","avatar":"https://avatars.githubusercontent.com/u/5942154?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Tomas Nordin <tomasn@posteo.net> writes:\n>\n>> Hello List\n>>\n>> The second line of the help message for git commit looks like this:\n>\n> This seems to have come from 00ea64ed (doc/git-commit: add\n> documentation for fixup=[amend|reword] options, 2021-03-15),\n> if \"git blame\" is to be trusted.\n>\n>>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n>\n> We can have --dry-run but we do not have to, we can have only one of\n>\n>     \"-c <commit>\"\n>     \"-C <commit>\",\n>     \"--squash <commit>\",\n>     \"--fixup amend:<commit>\"\n>     \"--fixup reword:<commit>\", or\n>     \"--fixup <commit>\"\n>\n> as they are mutually exclusive, but it is OK if we have none of\n> them.\n>\n> The last closing parenthesis after <commit> but before the closing\n> square bracket is unwanted, I think, as you pointed out.\n\nSo then I make an attempt to provide a patch to remove that closing\nparenthesis. Please tell if it should be done differently somehow. The\npatch was done on top of maint.\n\n\n\nFrom 5da052f43b119949c0ac0c7c3047542bc7474c17 Mon Sep 17 00:00:00 2001\nFrom: Tomas Nordin <tomasn@posteo.net>\nDate: Sun, 21 Jul 2024 13:16:50 +0200\nSubject: [PATCH] doc: remove dangling closing parenthesis\n\n* Documentation/git-commit.txt:\n  The second line of the synopsis, starting with [--dry-run] has a\n  dangling closing paren in the second optional group. Probably added by\n  misstake, so remove it.\n\nSigned-off-by: Tomas Nordin <tomasn@posteo.net>\n---\n Documentation/git-commit.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 89ecfc63a8..c822113c11 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -9,7 +9,7 @@ SYNOPSIS\n --------\n [verse]\n 'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n-\t   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n+\t   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]\n \t   [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n \t   [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n \t   [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n-- \n2.39.2\n\n"},{"id":"499074","messageId":"xmqqed7lb6dt.fsf@gitster.g","threadId":"61748","inReplyTo":"871q3nx7f3.fsf@posteo.net","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-22T18:58:54Z","receivedAt":"2024-07-22T18:58:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tomas Nordin <tomasn@posteo.net> writes:\n\n> So then I make an attempt to provide a patch to remove that closing\n> parenthesis. Please tell if it should be done differently somehow. The\n> patch was done on top of maint.\n>\n> From 5da052f43b119949c0ac0c7c3047542bc7474c17 Mon Sep 17 00:00:00 2001\n> From: Tomas Nordin <tomasn@posteo.net>\n> Date: Sun, 21 Jul 2024 13:16:50 +0200\n> Subject: [PATCH] doc: remove dangling closing parenthesis\n\nWe do not \"attach\" patches to an e-mail, like this.  Please visit \nhttps://lore.kernel.org/git/ and check patch messages from others.\n\nAn example:\n  https://lore.kernel.org/git/e048ef54-5824-452d-ab1f-233581711f4e@web.de/\n\nYour Subject: looks good.  It shows that the author read (at least\nsome parts of) Documentation/SubmittingPatches.\n\n> * Documentation/git-commit.txt:\n>   The second line of the synopsis, starting with [--dry-run] has a\n>   dangling closing paren in the second optional group. Probably added by\n>   misstake, so remove it.\n\nWe do not work file-by-file.  If any reader wants to know which\npaths were affected, they can see the diffstat before the patch.\n\nI think what you wrote is just fine otherwise; just drop the \"*\nDocumentation/git-commit\" line, dedent the body of the paragraph,\nand typofix the \"misstake\".\n\nThanks.\n\n\n> Signed-off-by: Tomas Nordin <tomasn@posteo.net>\n> ---\n>  Documentation/git-commit.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\n> index 89ecfc63a8..c822113c11 100644\n> --- a/Documentation/git-commit.txt\n> +++ b/Documentation/git-commit.txt\n> @@ -9,7 +9,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n> -\t   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]\n> +\t   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]\n>  \t   [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n>  \t   [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n>  \t   [--date=<date>] [--cleanup=<mode>] [--[no-]status]\n"},{"id":"499094","messageId":"87jzhdvxqq.fsf@posteo.net","threadId":"61748","inReplyTo":"xmqqed7lb6dt.fsf@gitster.g","subject":"Re: Unbalanced closing paren in help of git commit","fromName":"Tomas Nordin","fromEmail":"tomasn@posteo.net","sentAt":"2024-07-22T22:59:57Z","receivedAt":"2024-07-22T23:00:06Z","isPatch":false,"sender":{"key":"tomasn@posteo.net","avatar":"https://avatars.githubusercontent.com/u/5942154?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> We do not \"attach\" patches to an e-mail, like this.  Please visit \n> https://lore.kernel.org/git/ and check patch messages from others.\n\nI tried to send the format-patch file using git send-email now. That\nwill be in a thread other than this.\n\n> We do not work file-by-file.  If any reader wants to know which\n> paths were affected, they can see the diffstat before the patch.\n>\n> I think what you wrote is just fine otherwise; just drop the \"*\n> Documentation/git-commit\" line, dedent the body of the paragraph,\n> and typofix the \"misstake\".\n\nI made those amendments, lets see if its OK.\n"}]}