git-fetch: default globally to --no-tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have one main concern, and I can envision a few ways that git could
solve it. I also see that there has been some previous discussion on
reltaed topics over the years, but as far as I can tell, nothing has
actually been implemented to address my concern.

--- My concern ---

When I fetch from a remote repository, the only ways to
prevent fetching tags are:

  1) git fetch --no-tags <name>

  2) git config remote.<name>.tagopt --no-tags; git fetch <name>

The former requires extra typing for a case that (arguably) should be
the default. The latter requires configuration for each repository. This
doesn't scale well, if a user desires this behavior on all repositories
they use.

I'd prefer something like this, to change the default tag-fetching
behavior globally:

  git config --global remote.tagopt --no-tags

The closest I see is that I can disable tag-fetching globally on a
per-remote name basis:

  git config --global remote.<name>.tagopt --no-tags

This brings me to a potential bug report:

--- Bug ---

When trying to use the remote.<name>.tagopt configuration option
globally, I get something like this:

  $ git config --global remote.test.tagopt --no-tags
  $ git remote update
  ...
  Fetching test
  fatal: 'test' does not appear to be a git repository
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: Could not fetch test
  ...

Expected behavior: if the local repository does not have a remote named
'test', then no additional output should be printed. If the local
repository has a remote named test, then it should be fetched with the
--no-tags option.

Actual behavior: git prints warnings about the 'test' remote, just
because there is no remote named 'test.'

--- Motivations ---

This is all motivated by the fact that tag namespacing is completely
broken in git. Tags are globally namespaced, and in a true DVCS
environment, any particular developer has no control over another
developer's tag naming conventions. So this namespace can easily become
polluted, reducing the usefulness of tags as a whole [1]. This problem
seems to have been acknowledged, and proposals appeared a few years ago
[2]. But I don't see any solution for tag namespacing.

So, my current approach is to try to limit the damage done by
accidentally fetching tags. Unfortunately, I can't find any good
supported mechanisms to help me in the previous two sections.

--- TL;DR ---

My email boils down to two questions:

  (A) Has there been progress on implementing a proposal like in [2]?

  (B) Can we allow disabling (auto)tag-fetching globally? Like:

        git config --global remote.tagopt --no-tags

Thanks,
Brian

[1] I could elaborate with some horror stories, to describe how this
    becomes a day-to-day nuisance in using git for me, but I'll avoid
    the details for now. Please accept that this is a usability bug.

[2]
    http://article.gmane.org/gmane.comp.version-control.git/165799
    http://article.gmane.org/gmane.comp.version-control.git/165885
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]