From: Michael Haggerty <mhagger@alum•mit.edu>
To: Robert Dailey <rcdailey.lists@gmail•com>, Git <git@vger•kernel.org>
Subject: Re: Proposal for pruning tags
Date: Wed, 11 Jun 2014 11:25:56 +0200 [thread overview]
Message-ID: <539820A4.6090708@alum.mit.edu> (raw)
In-Reply-To: <CAHd499BLX3q2FHLfFpq_14w2mmosywfRqMHVjkke0BRhAAjx7g@mail.gmail.com>
On 06/05/2014 04:51 PM, Robert Dailey wrote:
> I've never contributed to the Git project before. I'm a Windows user,
> so I use msysgit, but I'd be happy to install linux just so I can help
> implement this feature if everyone feels it would be useful.
>
> Right now AFAIK, there is no way to prune tags through Git. The way I
> currently do it is like so:
>
> $ git tag -l | xargs git tag -d
> $ git fetch --all
Junio explained some limitations of tags (namely that there is only one
tags namespace that is shared project-wide) that makes your wish
impossible to implement the way it works for branches.
Local tags are awkward for the same reason. It is too easy to push them
accidentally to a central repository and too hard to delete them after
that has happened. They kindof spread virally, as you have noticed. I
recommend against using local tags in general.
Recent Git does have a feature that might help you. *If* you have a
central repository that is "authoritative" WRT tags, then you can sync
the tags in your local repository to the tags in the central repo using
git fetch --prune $REMOTE +refs/tags/*:refs/tags/*
You might also be able to use a pre-receive hook on the central repo to
prevent tags from being pushed by people who shouldn't be doing so, or
to require that tags have an approved format (like
refs/tags/release-\d+\.\d+\.\d+ or whatever) to try to prevent a
recurrence of the problem.
Michael
--
Michael Haggerty
mhagger@alum•mit.edu
http://softwareswirl.blogspot.com/
prev parent reply other threads:[~2014-06-11 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 14:51 Proposal for pruning tags Robert Dailey
2014-06-05 20:50 ` Junio C Hamano
2014-06-06 13:54 ` Robert Dailey
2014-06-06 17:18 ` Junio C Hamano
2014-06-11 9:25 ` Michael Haggerty [this message]
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=539820A4.6090708@alum.mit.edu \
--to=mhagger@alum$(echo .)mit.edu \
--cc=git@vger$(echo .)kernel.org \
--cc=rcdailey.lists@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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