From: Martin Ågren Date: Tue, 26 Mar 2024 20:03:25 GMT Subject: Re: [PATCH 4/4] doc: git-clone: apply new documentation guidelines Message-ID: In-Reply-To: <5ae83d3f799e9ab84d5233f77cb91715415ae167.1711318740.git.gitgitgadget@gmail.com> Thanks for working on this. This renders really nicely. On Sun, 24 Mar 2024 at 23:20, Jean-Noël Avila via GitGitGadget wrote: > > From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= > > Heavily apply literal and placeholder markup everywhere. > > Signed-off-by: Jean-Noël Avila > --- > Documentation/config/clone.txt | 23 +++++-- > Documentation/git-clone.txt | 120 ++++++++++++++++----------------- > Documentation/urls.txt | 22 +++--- > 3 files changed, 88 insertions(+), 77 deletions(-) > > diff --git a/Documentation/config/clone.txt b/Documentation/config/clone.txt > index d037b57f729..0e0a8a1ae4a 100644 > --- a/Documentation/config/clone.txt > +++ b/Documentation/config/clone.txt > @@ -1,13 +1,22 @@ > -clone.defaultRemoteName:: > +`clone.defaultRemoteName`:: > The name of the remote to create when cloning a repository. Defaults to > - `origin`, and can be overridden by passing the `--origin` command-line > + `origin`. > +ifdef::git-clone[] > + It can be overridden by passing the `--origin` command-line > + option. > +endif::[] > +ifndef::git-clone[] > + It can be overridden by passing the `--origin` command-line > option to linkgit:git-clone[1]. > +endif::[] There's a bit more going on here than the commit message claims. FWIW, I think these changes are good, even if maybe a bit surprising. > -'git clone' [--template=] > - [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] > - [-o ] [-b ] [-u ] [--reference ] > - [--dissociate] [--separate-git-dir ] > - [--depth ] [--[no-]single-branch] [--no-tags] > - [--recurse-submodules[=]] [--[no-]shallow-submodules] > - [--[no-]remote-submodules] [--jobs ] [--sparse] [--[no-]reject-shallow] > - [--filter= [--also-filter-submodules]] [--] > - [] > +`git clone` [`--template=`{empty}____] > + [`-l`] [`-s`] [`--no-hardlinks`] [`-q`] [`-n`] [`--bare`] [`--mirror`] > + [`-o` __] [`-b` __] [`-u` __] [`--reference` __] > + [`--dissociate`] [`--separate-git-dir` __] > + [`--depth` __] [`--`[`no-`]`single-branch`] [`--no-tags`] > + [`--recurse-submodules`[`=`{empty}____]] [`--`[`no-`]`shallow-submodules`] > + [`--`[`no-`]`remote-submodules`] [`--jobs` __] [`--sparse`] [`--`[`no-`]`reject-shallow`] > + [`--filter=`{empty}____] [`--also-filter-submodules`]] [`--`] __ > + [__] Don't ask me why, but I need this on top (whitespace-damaged) - [`--depth` __] [`--`[`no-`]`single-branch`] [`--no-tags`] - [`--recurse-submodules`[`=`{empty}____]] [`--`[`no-`]`shallow-submodules`] - [`--`[`no-`]`remote-submodules`] [`--jobs` __] [`--sparse`] [`--`[`no-`]`reject-shallow`] + [`--depth` __] [`--`[`no-`]{empty}`single-branch`] [`--no-tags`] + [`--recurse-submodules`[`=`{empty}____]] [`--`[`no-`]{empty}`shallow-submodules`] + [`--`[`no-`]{empty}`remote-submodules`] [`--jobs` __] [`--sparse`] [`--`[`no-`]{empty}`reject-shallow`] i.e., some sprinkling of "{empty}", to keep each of these "[--[no-]" from simply disappearing. This is with Asciidoctor 1.5.5, which is admittedly starting to get old, but still ok as per our INSTALL document. > ---bare:: > +`--bare`:: > Make a 'bare' Git repository. That is, instead of > creating __ and placing the administrative > - files in `/.git`, make the __ > + files in __`/.git`, make the __ This should be ____{empty}`/.git` Thanks. Apart from the small mistake and the misrendering of "[--[no-]", this looks really nice to me, both HTML and manpage. The source .txt files do get a bit messier, especially with the {empty} trickery, but ok. (I haven't been paying attention. Maybe this has been discussed before, and TBH I haven't even dug -- I don't mean to start another round of discussion.) Martin