Re: [PATCH v4 2/6] clone: make it possible to specify --tags
- From
Jean-Noël AVILA <jn.avila@free.fr>
- Date
- Feb 1, 2025, 16:47 UTC
- 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:
Show 12 quoted lines
> 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
Show 16 quoted lines
> YQ@mail.gmail.com/ > > Signed-off-by: Toon Claes <toon@iotcl.com> > --- > 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=<template-directory>] > [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] > [-o <name>] [-b <name>] [-u <upload-pack>] [--reference
<repository>]
> [--dissociate] [--separate-git-dir <git-dir>] > - [--depth <depth>] [--[no-]single-branch] [--no-tags] > + [--depth <depth>] [--[no-]single-branch] [--[no-]-tags]
There's an extra '-' : it should read '--[no-]tags'
> [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules] > [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--
[no-]reject-shallow]
Show 9 quoted lines
> [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository> @@ > -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.
Show 5 quoted lines
> `remote.<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