From: Andreas Ericsson <ae@op5.se>
To: Jim Meyering <jim@meyering.net>
Cc: git@vger.kernel.org
Subject: Re: can I remove or move a tag in a remote repository?
Date: Tue, 28 Nov 2006 12:08:01 +0100 [thread overview]
Message-ID: <456C1891.80706@op5.se> (raw)
In-Reply-To: <87wt5rffbm.fsf@rho.meyering.net>
Jim Meyering wrote:
>
> Perhaps I shouldn't push the cvs-head tag at all.
Possibly not, although it's nice to let others that use git to know
where you've cut the release.
> A few questions:
> - is there a way to say "push all tags matching /COREUTILS-*/"
> or to say "push all tags, except the ones on this list"?
Here's a snippet from the default update hook we use on all our repos.
We explicitly deny any non-annotated tags from being pushed to the
central server and let rogue devs know why the push failed by writing
the error message to stderr so that it gets sent over the wire. I
believe this is still the default update-hook shipped with git.
---%<---%<----%<---
ref_type=$(git cat-file -t "$3")
# Only allow annotated tags in a shared repo
# Remove this code to treat dumb tags the same as everything else
case "$1","$ref_type" in
refs/tags/*,commit)
echo "*** Un-annotated tags are not allowed in this repo" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to
propagate." >&2
exit 1;;
---%<---%<---%<---
> - is there a way to remove the cvs-head tag from the remote directory?
> Note: I don't have shell access there. I can request that someone
> with shell access do it, but shouldn't have to resort to that.
> - is there some way to make "git push" do what I want, and update the
> offending tag in the remote repo?
>
I'm not sure if execution reaches the update hook when you're uploading
a tag that already exists. If it is, you could simply remove the
offending tag in the update-hook and exit 0 to make it work properly.
You can test this without shell-access on the remote system by setting
up a repo on your local machine, making some dummy commit, cloning it
and then hacking away on the hook while pushing to it from your local repo.
Other than that, push your tags manually by naming them explicitly on
the push-line, like so:
$ git push $remote_repo $tag_name
This is what I do whenever we cut a release. With a one tag per release,
it's not very troublesome at all, and the update-hook sends a nicely
formatted message of the changes since the last release (last tag
really, but it amounts to the same thing for us) to everyone involved.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
next prev parent reply other threads:[~2006-11-28 11:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-19 18:42 can I remove or move a tag in a remote repository? Jim Meyering
2006-11-19 18:54 ` Jakub Narebski
2006-11-28 11:08 ` Andreas Ericsson [this message]
2006-11-28 21:46 ` Junio C Hamano
2006-11-29 9:54 ` Johannes Schindelin
2006-11-29 10:55 ` Jim Meyering
2006-11-29 11:45 ` Johannes Schindelin
2006-11-29 13:46 ` Jakub Narebski
2006-11-29 11:47 ` Andy Whitcroft
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=456C1891.80706@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=jim@meyering.net \
/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).