]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-submodule.txt: fix AsciiDoc formatting error
authorDenton Liu <liu.denton@gmail.com>
Mon, 16 Sep 2019 18:19:17 +0000 (11:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Sep 2019 19:27:00 +0000 (12:27 -0700)
In b57e8119e6 (submodule: teach set-branch subcommand, 2019-02-08), the
`set-branch` subcommand was added for submodules. When the documentation
was written, the syntax for a "index term" in AsciiDoc was
accidentally used. This caused the documentation to be rendered as

set-branch -d|--default)|(-b|--branch <branch> [--] <path>

instead of

set-branch ((-d|--default)|(-b|--branch <branch>)) [--] <path>

In addition to this, the original documentation was possibly confusing
as it made it seem as if the `-b` option didn't accept a `<branch>`
argument.

Break `--default` and `--branch` into their own separate invocations to
make it obvious that these options are mutually exclusive. Also, this
removes the surrounding parentheses so that the "index term" syntax is
not triggered.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-submodule.txt

index 4daf14418074abe1b0c3cb5b720afe15e2576561..0474e7af0fe37daa80ead2b8ede312929360d441 100644 (file)
@@ -169,7 +169,8 @@ submodule with the `--init` option.
 If `--recursive` is specified, this command will recurse into the
 registered submodules, and update any nested submodules within.
 --
-set-branch ((-d|--default)|(-b|--branch <branch>)) [--] <path>::
+set-branch (-b|--branch) <branch> [--] <path>::
+set-branch (-d|--default) [--] <path>::
        Sets the default remote tracking branch for the submodule. The
        `--branch` option allows the remote branch to be specified. The
        `--default` option removes the submodule.<name>.branch configuration