All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Nordin <tomasn@posteo.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Charvi Mendiratta <charvi077@gmail.com>
Subject: Re: Unbalanced closing paren in help of git commit
Date: Sun, 21 Jul 2024 12:21:04 +0000	[thread overview]
Message-ID: <871q3nx7f3.fsf@posteo.net> (raw)
In-Reply-To: <xmqqcynnejwl.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

Junio C Hamano <gitster@pobox.com> writes:

> Tomas Nordin <tomasn@posteo.net> writes:
>
>> Hello List
>>
>> The second line of the help message for git commit looks like this:
>
> This seems to have come from 00ea64ed (doc/git-commit: add
> documentation for fixup=[amend|reword] options, 2021-03-15),
> if "git blame" is to be trusted.
>
>>     [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]
>
> We can have --dry-run but we do not have to, we can have only one of
>
>     "-c <commit>"
>     "-C <commit>",
>     "--squash <commit>",
>     "--fixup amend:<commit>"
>     "--fixup reword:<commit>", or
>     "--fixup <commit>"
>
> as they are mutually exclusive, but it is OK if we have none of
> them.
>
> The last closing parenthesis after <commit> but before the closing
> square bracket is unwanted, I think, as you pointed out.

So then I make an attempt to provide a patch to remove that closing
parenthesis. Please tell if it should be done differently somehow. The
patch was done on top of maint.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-remove-dangling-closing-parenthesis.patch --]
[-- Type: text/x-diff, Size: 1210 bytes --]

From 5da052f43b119949c0ac0c7c3047542bc7474c17 Mon Sep 17 00:00:00 2001
From: Tomas Nordin <tomasn@posteo.net>
Date: Sun, 21 Jul 2024 13:16:50 +0200
Subject: [PATCH] doc: remove dangling closing parenthesis

* Documentation/git-commit.txt:
  The second line of the synopsis, starting with [--dry-run] has a
  dangling closing paren in the second optional group. Probably added by
  misstake, so remove it.

Signed-off-by: Tomas Nordin <tomasn@posteo.net>
---
 Documentation/git-commit.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 89ecfc63a8..c822113c11 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
-	   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]
+	   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]
 	   [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
 	   [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
 	   [--date=<date>] [--cleanup=<mode>] [--[no-]status]
-- 
2.39.2


  reply	other threads:[~2024-07-21 12:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-07 12:33 Unbalanced closing paren in help of git commit Tomas Nordin
2024-07-08  8:54 ` Jeff King
2024-07-08 19:35   ` Tomas Nordin
2024-07-08 23:35     ` Jeff King
2024-07-08 19:57 ` Junio C Hamano
2024-07-21 12:21   ` Tomas Nordin [this message]
2024-07-22 18:58     ` Junio C Hamano
2024-07-22 22:59       ` Tomas Nordin

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=871q3nx7f3.fsf@posteo.net \
    --to=tomasn@posteo.net \
    --cc=charvi077@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.