Skip to contentSkip to conversation

docs: remove stray bracket from git-clone synopsis

PATCH Superseded Knut Harald Ryager via GitGitGadget 3 participants 7 messages Jul 31, 2025 – Aug 12, 2025 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: remove stray bracket from git-clone synopsis

From: E-K-n <[email protected]>

The git-clone documentation contained an extra ‘]’ after --also-filter-submodules].

This patch removes the duplicate ‘]’ so that the line reads:

    [--also-filter-submodules] [--] <repository>

instead of:

    [--also-filter-submodules]] [--] <repository>

---
Remove excess right bracket from git-clone docs

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2023%2FKnutRyager%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2023/KnutRyager/master-v1
Pull-Request: https://github.com/git/git/pull/2023

 Documentation/git-clone.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-clone.adoc +1 -1
index 222d558290e..851502552f2 100644
@@ -16,7 +16,7 @@ git clone [--template=<template-directory>]
 	  [--depth <depth>] [--[no-]single-branch] [--[no-]tags]
 	  [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
 	  [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
-	  [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
+	  [--filter=<filter-spec>] [--also-filter-submodules] [--] <repository>
 	  [<directory>]
 
 DESCRIPTION

base-commit: e813a0200a7121b97fec535f0d0b460b0a33356c

Signature · 1 line
gitgitgadget
#1 lore raw

"Knut Harald Ryager via GitGitGadget" <[email protected]>

Quoted 1 line · writes:

From: E-K-n <[email protected]>

This should be updated to match the name you use on your sign-off below.

Quoted 2 lines

The git-clone documentation contained an extra ‘]’ after --also-filter-submodules].

It is correct to point out that the brackets are not matching, but I think the one that you are removing a wrong one.

When f05da2b4 (clone, submodule: pass partial clone filters to submodules, 2022-02-04) added an option --also-filter-submodules to the command, it wanted to express that the option is only valid when the "--filter=<filter-spec>" option is also given. And it did its update correctly:

- [--filter=<filter>] [--] <repository>
+ [--filter=<filter> [--also-filter-submodules]] [--] <repository>

Later, 76880f05 (doc: git-clone: apply new documentation formatting guidelines, 2024-03-29) introduced the extra closing bracket after "--filter=<filter>" to make these two look as if they are unrelated and independent, i.e.

    [--filter=<filter>] [--also-filter-submodules]]

So, I think the one immediately after "--filter=<filter>" is what you want to remove, not the one after "--also-filter-submodules".

Quoted 7 lines

This patch removes the duplicate ‘]’ so that the line reads:

    [--also-filter-submodules] [--] <repository>

instead of:

    [--also-filter-submodules]] [--] <repository>

We do not say "this patch does X" in our proposed log message. Instead, you tell somebody sitting on the keyboard to "Do X".

IOW, something like

    Remove the extra and incorrect closing bracket, so that the line
    reads:

        [--filter=<filter> [--also-filter-submodules]]

    instead of

        [--filter=<filter>] [--also-filter-submodules]]

is how we write this.

Quoted 26 lines

---
Remove excess right bracket from git-clone docs

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2023%2FKnutRyager%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2023/KnutRyager/master-v1
Pull-Request: https://github.com/git/git/pull/2023

 Documentation/git-clone.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-clone.adoc +1 -1
index 222d558290e..851502552f2 100644
@@ -16,7 +16,7 @@ git clone [--template=<template-directory>]
 	  [--depth <depth>] [--[no-]single-branch] [--[no-]tags]
 	  [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
 	  [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
-	  [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
+	  [--filter=<filter-spec>] [--also-filter-submodules] [--] <repository>
 	  [<directory>]
 
 DESCRIPTION

base-commit: e813a0200a7121b97fec535f0d0b460b0a33356c

#2 lore raw

PATCH v2 1/1 Remove the extra and incorrect closing bracket, so that the line reads:

In reply to Knut Harald Ryager via GitGitGadget

From: Knut Harald Ryager <[email protected]>

    [--filter=<filter> [--also-filter-submodules]]

instead of

    [--filter=<filter>] [--also-filter-submodules]]

---
Remove excess right bracket from git-clone docs

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2023%2FKnutRyager%2Fmaster-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2023/KnutRyager/master-v2
Pull-Request: https://github.com/git/git/pull/2023

Range-diff vs v1:

1: 6bb5c653356 ! 1: bb158425b8a docs: remove stray bracket from git-clone synopsis
@@
## Metadata ##
-Author: E-K-n <[email protected]>
+Author: Knut Harald Ryager <[email protected]>

## Commit message ##
- docs: remove stray bracket from git-clone synopsis
+ Remove the extra and incorrect closing bracket, so that the line reads:

- The git-clone documentation contained an extra ‘]’ after
- --also-filter-submodules].
+ [--filter=<filter> [--also-filter-submodules]]

- This patch removes the duplicate ‘]’ so that the line reads:
+ instead of

- [--also-filter-submodules] [--] <repository>
-
- instead of:
-
- [--also-filter-submodules]] [--] <repository>
+ [--filter=<filter>] [--also-filter-submodules]]

@@ Documentation/git-clone.adoc: git clone [--template=<template-directory>]
[--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules] [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
- [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
-+ [--filter=<filter-spec>] [--also-filter-submodules] [--] <repository>
++ [--filter=<filter-spec> [--also-filter-submodules]] [--] <repository>
[<directory>]

DESCRIPTION

 Documentation/git-clone.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-clone.adoc +1 -1
index 222d558290e..d829206d1b5 100644
@@ -16,7 +16,7 @@ git clone [--template=<template-directory>]
 	  [--depth <depth>] [--[no-]single-branch] [--[no-]tags]
 	  [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
 	  [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
-	  [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
+	  [--filter=<filter-spec> [--also-filter-submodules]] [--] <repository>
 	  [<directory>]
 
 DESCRIPTION

base-commit: e813a0200a7121b97fec535f0d0b460b0a33356c

Signature · 1 line
gitgitgadget
#3 lore raw

Re: [PATCH v2] Remove the extra and incorrect closing bracket, so that the line reads:

Quoted 27 lines · Knut Harald Ryager via GitGitGadget

From: Knut Harald Ryager <[email protected]>

    [--filter=<filter> [--also-filter-submodules]]

instead of

    [--filter=<filter>] [--also-filter-submodules]]

---
Remove excess right bracket from git-clone docs

Published-As:
https://github.com/gitgitgadget/git/releases/tag/pr-git-2023%2FKnutRyager%2Fmaster-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git
pr-git-2023/KnutRyager/master-v2
Pull-Request: https://github.com/git/git/pull/2023

Range-diff vs v1:

1: 6bb5c653356 ! 1: bb158425b8a docs: remove stray bracket from
git-clone synopsis
@@
## Metadata ##
-Author: E-K-n <[email protected]>
+Author: Knut Harald Ryager <[email protected]>

Quoted 3 lines

## Commit message ##
- docs: remove stray bracket from git-clone synopsis
+ Remove the extra and incorrect closing bracket, so that the line reads:

It looks like you accidentally deleted the nice subject line

docs: remove stray bracket from git-clone synopsis

When rewriting the commit message with Junio’s suggestion. Which made what was supposed to be the first line of the first paragraph into the subject line.

I think you want this:

docs: remove stray bracket from git-clone synopsis

Remove the extra and incorrect closing bracket, so that the line reads:

[--filter=<filter> [--also-filter-submodules]]

instead of

[--filter=<filter>] [--also-filter-submodules]]

Quoted 5 lines

- The git-clone documentation contained an extra ‘]’ after
- --also-filter-submodules].
+ [--filter=<filter> [--also-filter-submodules]]
...

Signature · 1 line
Kristoffer
#4 lore raw

Re: [PATCH v2] Remove the extra and incorrect closing bracket, so that the line reads:

Quoted 4 lines · Kristoffer Haugsbakk

I think you want this:

docs: remove stray bracket from git-clone synopsis

Quoted 8 lines

Remove the extra and incorrect closing bracket, so that the line reads:

[--filter=<filter> [--also-filter-submodules]]

instead of

[--filter=<filter>] [--also-filter-submodules]]

As even the author of this patch was once confused, I think the reason why this plausible change

          [--filter=<filter>] [--also-filter-submodules]

is not a correct fix should also be in the proposed log message to help readers.

#5 lore raw

PATCH v3 1/1 docs: remove stray bracket from git-clone synopsis

In reply to Knut Harald Ryager via GitGitGadget

From: Knut Harald Ryager <[email protected]>

Remove the extra and incorrect closing bracket, so that the line reads:

    [--filter=<filter> [--also-filter-submodules]]

instead of

    [--filter=<filter>] [--also-filter-submodules]]

Note: Both filter options were grouped when --also-filter-submodules was added by commit f05da2b4. The extra bracket was added later by commit 76880f05.

---
Remove excess right bracket from git-clone docs

cc "Kristoffer Haugsbakk" [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2023%2FKnutRyager%2Fmaster-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2023/KnutRyager/master-v3
Pull-Request: https://github.com/git/git/pull/2023

Range-diff vs v2:

1: bb158425b8a ! 1: c1a167a16fd Remove the extra and incorrect closing bracket, so that the line reads:
@@ Metadata
Author: Knut Harald Ryager <[email protected]>

## Commit message ##
+ docs: remove stray bracket from git-clone synopsis
+
Remove the extra and incorrect closing bracket, so that the line reads:

[--filter=<filter> [--also-filter-submodules]]
@@ Commit message

[--filter=<filter>] [--also-filter-submodules]]

+ Note: Both filter options were grouped when --also-filter-submodules
+ was added by commit f05da2b4. The extra bracket was added
+ later by commit 76880f05.
+

## Documentation/git-clone.adoc ##

 Documentation/git-clone.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-clone.adoc +1 -1
index 222d558290e..d829206d1b5 100644
@@ -16,7 +16,7 @@ git clone [--template=<template-directory>]
 	  [--depth <depth>] [--[no-]single-branch] [--[no-]tags]
 	  [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
 	  [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
-	  [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
+	  [--filter=<filter-spec> [--also-filter-submodules]] [--] <repository>
 	  [<directory>]
 
 DESCRIPTION

base-commit: e813a0200a7121b97fec535f0d0b460b0a33356c

Signature · 1 line
gitgitgadget
#6 lore raw

"Knut Harald Ryager via GitGitGadget" <[email protected]>

Quoted 8 lines · writes:

From: Knut Harald Ryager <[email protected]>

Remove the extra and incorrect closing bracket, so that the line reads:

    [--filter=<filter> [--also-filter-submodules]]

instead of

Quoted 8 lines
    [--filter=<filter>] [--also-filter-submodules]]

Note: Both filter options were grouped when --also-filter-submodules was added by commit f05da2b4. The extra bracket was added later by commit 76880f05.

---

Thanks. Let me rewrite the proposed log message thusly:

--- >8 ---
Subject: docs: remove stray bracket from git-clone synopsis

The synopsis section has an extra closing bracket, like this:

    [--filter=<filter>] [--also-filter-submodules]]

The extra one is not the one at the end of this line; it is the one after "...=<filter>".

The "--also-filter-submodules" option was added by f05da2b4 (clone,
submodule: pass partial clone filters to submodules, 2022-02-04). Because it makes sense only when used with the "--filter=<filter>" option, these two options are enclosed in a pair of brackets. The extra one was added by 76880f05 (doc: git-clone: apply new documentation formatting guidelines, 2024-03-29) by mistake.

Remove the extra and incorrect closing bracket, so that the line reads:

    [--filter=<filter> [--also-filter-submodules]]