]> git.ipfire.org Git - thirdparty/git.git/commit
scalar: add --no-tags option to 'scalar clone'
authorDerrick Stolee <stolee@gmail.com>
Fri, 6 Sep 2024 20:21:41 +0000 (20:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Sep 2024 21:13:48 +0000 (14:13 -0700)
commitce31b82ca95ba13aba424a1e3d09a292637f6f1d
treee92748b798dc8a61647d545614e80fabdb6609f7
parent2e7b89e038c0c888acf61f1b4ee5a43d4dd5e94c
scalar: add --no-tags option to 'scalar clone'

Some large repositories use tags to track a huge list of release
versions. While this 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.

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/scalar.txt
scalar.c
t/t9210-scalar.sh