From: Jean-Noël AVILA Date: Sat, 01 Feb 2025 16:47:36 GMT Subject: Re: [PATCH v4 2/6] clone: make it possible to specify --tags Message-ID: <1911002.tdWV9SEqCh@cayenne> In-Reply-To: <20250131-toon-clone-refs-v4-2-2a4ff851498f@iotcl.com> Hello, I'm only reviewing the doc part. On Friday, 31 January 2025 16:30:30 UTC+1 Toon Claes wrote: > Option --no-tags was added in 0dab2468ee (clone: add a --no-tags option > to clone without tags, 2017-04-26). At the time there was no need to > support --tags as well, although there was some conversation about > it[1]. > > To simplify the code and to prepare for future commits, invert the flag > internally. Functionally there is no change, because the flag is > default-enabled passing `--tags` has no effect, so there's no need to > add tests for this. > > [1]: > https://lore.kernel.org/git/ CAGZ79kbHuMpiavJ90kQLEL_AR0BEyArcZoEWAjPPhOFacN16 > YQ@mail.gmail.com/ > > Signed-off-by: Toon Claes > --- > Documentation/git-clone.txt | 7 ++++--- > builtin/clone.c | 14 +++++++------- > 2 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt > index > de8d8f58930ecff305f79480b13ddce10cd96c60..99a9222e63429b3447deb3e7c08962d4ec6 > 0a295 100644 --- a/Documentation/git-clone.txt > +++ b/Documentation/git-clone.txt > @@ -13,7 +13,7 @@ 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] > + [--depth ] [--[no-]single-branch] [--[no-]-tags] There's an extra '-' : it should read '--[no-]tags' > [--recurse-submodules[=]] [--[no-]shallow-submodules] > [--[no-]remote-submodules] [--jobs ] [--sparse] [-- [no-]reject-shallow] > [--filter=] [--also-filter-submodules]] [--] @@ > -273,8 +273,9 @@ corresponding `--mirror` and `--no-tags` options instead. > branch when `--single-branch` clone was made, no remote-tracking > branch is created. > > -`--no-tags`:: > - Don't clone any tags, and set > +`--[no-]tags`:: > + By default tags are cloned, and passing `--tags` doesn't change that. > + With `--no-tags`, no tags are cloned, and set Better keep and start the description with the imperative mood , as in the previous version and add the "By default,..." at the end of the description. > `remote..tagOpt=--no-tags` in the config, ensuring > that future `git pull` and `git fetch` operations won't follow > any tags. Subsequent explicit tag fetches will still work, > diff --git a/builtin/clone.c b/builtin/clone.c > index