git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] scalar: add --no-tags option

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 5, 2024, 16:12 UTC
Message-ID
<xmqq7cbq3wqx.fsf@gitster.g>
In-Reply-To
<pull.1780.git.1725545614416.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 16 quoted lines
> From: Derrick Stolee <stolee@gmail.com>
>
> Some large repositories use tags to track a huge list of release
> versions. While this is choice is costly on the ref advertisement, it is
> further wasteful for clients who do not need those tags. Allow clients
> to optionally skip the tag advertisement.
>
> This behavior is similar to that of 'git clone --no-tags' implemented in
> 0dab2468ee5 (clone: add a --no-tags option to clone without tags,
> 2017-04-26), including the modification of the remote.origin.tagOpt
> config value to include "--no-tags".
>
> One thing that is opposite of the 'git clone' implementation is that
> this allows '--tags' as an assumed option, which can be naturally negated
> with '--no-tags'. The clone command does not accept '--tags' but allows
> "--no-no-tags" as the negation of its '--no-tags' option.

Yuck. The loophole may be something we may want to close later, though (and replaced with a proper "--tags" support).

Show 6 quoted lines
> While testing this option, combine the test with the previously untested
> '--no-src' option introduced in 4527db8ff8c (scalar: add --[no-]src
> option, 2023-08-28).
>
> Signed-off-by: Derrick Stolee <stolee@gmail.com>
> ---
Makes sense.

This is a tangent, but the "--[no-]tags" option in "git fetch" is misdesigned; the default is to auto-follow tags that would annotate objects that are being fetched, and "--no-tags" is a way to decline the auto-following. But "--tags" is to say that all tags must be fetched. There is no obvious way to say "I want the auto-following behaviour" (e.g., to override an earlier "--no-tags" or "--tags").

Previous: Derrick Stolee via GitGitGadgetNext: Junio C Hamano
Message 2 of 7 in “scalar: add --no-tags option”
  1. scalar: add --no-tags optionDerrick Stolee via GitGitGadget, Sep 5, 2024
  2. Junio C HamanoSep 5, 2024
  3. Junio C HamanoSep 5, 2024
  4. Johannes SchindelinSep 6, 2024
  5. Junio C HamanoSep 6, 2024
  6. Derrick StoleeSep 6, 2024
  7. scalar: add --no-tags option to 'scalar clone'Derrick Stolee via GitGitGadget, Sep 6, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.