From: Junio C Hamano <gitster@pobox.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-fetch: default globally to --no-tags
Date: Wed, 19 Nov 2014 10:45:48 -0800 [thread overview]
Message-ID: <xmqqr3wzrpur.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141119030523.GO22361@norris-Latitude-E6410> (Brian Norris's message of "Tue, 18 Nov 2014 19:05:23 -0800")
Brian Norris <computersforpeace@gmail.com> writes:
> --- TL;DR ---
You usually have TL;DR at the beginning to help people save time;
having it at the end forces the whole thing to be read and would not
help anybody. ;-)
> My email boils down to two questions:
>
> (A) Has there been progress on implementing a proposal like in [2]?
I do not think so, and also I do not agree that "mirror everybody
else's ref hierarchy into separate namespaces" is necessarily a good
idea, especially for tags, whose reason of existence is to give
people a way to have anchoring points they agree on to have a shared
world view necessary to move things forward.
In other words, talks in [2] are attempting to solve a wrong
problem. The problem people want to solve is to have a mechanism to
keep private anchoring points that are not necessarily shared
project wide, which tags in refs/tags hierarchy is *not*.
Like it or not, tags are meant to be used for globally shared
anchoring points and the whole machinery (e.g. "fetch" that
auto-follows tags, "clone" that gives refs/tags*:refs/tags/*
refspec) is geared towards supporting that use pattern, which will
be broken by moving tags to per-remote namespace.
I can see "git tag --local foo" that creates refs/local-tags/foo
and also adding a mechanism to propagate local-tags/ hierarchy just
like heads/ hierarchy is propagated per-remote as a solution to that
problem that does not break the "release tags" use case, though.
> (B) Can we allow disabling (auto)tag-fetching globally? Like:
>
> git config --global remote.tagopt --no-tags
Using remote.<variable> as a fallback for remote.<remote>.<variable>
may be a useful addition, not limited to <variable>==tagopt case.
This is a tangent, but it is an important one because we are talking
about "tagopt" specifically. I think we should start deprecating
"*.tagopt --[no-]tags". It started as a quick-and-dirty hack back
when "git fetch" was a shell script Porcelain, where it made it easy
to write things like this in its implementation:
tagOpt=$(git config "remote.$name.tagopt")
git fetch $tagOpt $name $args
which gives an impression that any command line option can go there
(e.g. as if you could set "remote.*.tagopt = --frotz --no-tags")
and "git fetch" implementation, even after it is redone in C, must
forever parse it as if it is part of a shell command line
(e.g. splitting at $IFS, unquoting the shell quotes and interpreting
as if they came in argv[]).
This is ugly and simply unmaintainable, and we should transition
away from that, by doing something like:
(1) Add remote.*.tags configuration, which defaults to 'follow',
but can be set to 'true' or 'false'. Accept '--tags' as a
synonym to 'true' and '--no-tags' as a synonym to 'false'.
* when set to 'follow', allow auto-following tags (the default).
* when set to 'true', act as if --tags is given.
* when set to 'false', act as if --no-tags is given.
(2) Deprecate remote.*.tagopt configuration. When it is used, give
a warning about deprecation and encourage users to move to
remote.*.tags setting.
(3) Wait for several release cycles.
(4) Remove remote.*.tags configuration support at a major version
boundary.
Needless to say, support for remote.<variable> as a fallback for
remote.<remote>.<variable> for any <variable> can be done in
parallel to this tangent topic.
next prev parent reply other threads:[~2014-11-19 18:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 3:05 git-fetch: default globally to --no-tags Brian Norris
2014-11-19 18:42 ` Jeff King
2014-11-19 18:45 ` Junio C Hamano [this message]
2014-11-19 18:57 ` Jeff King
2014-11-19 20:22 ` Junio C Hamano
2014-11-19 20:32 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr3wzrpur.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=computersforpeace@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).