threads / discuss / 2143

Pushing a single tag (ref + object)?

Subject: Pushing a single tag (ref + object)?

## tl;dr

4 messages between Oct 19, 2005 and Oct 19, 2005.

replies: 3people: 3as markdown or json

Martin Langhoff· Oct 19, 2005, 06:05 UTC · lore

While we are using a repo which holds all our branches (dev/test/prod), locally we have a group of developers that checkout one repo-per-branch, working on it with a cg-clone/cg-update/cg-commit/cg-push workcycle. So far it's working great.

Now, I am at a loss on how to push a _tag_ object+ref to the repo, without doing a git-push --all, which I naturally don't want to do. I managed to push the object itself, doing

    git-push repository tagrefname
But that ddn't create the ref on the repo. So I had to do
    scp .git/refs/tags/refname repostory/refs/tags/

I'm feeling a tad lost here. Surely there's a way? Or should I be crafting a patch against git-push-script? Problem is, git-push script doesn't do any parsing of the params. Grmbl.

martin
Linus Torvalds· Oct 19, 2005, 14:13 UTC · re: Martin Langhoff · lore

Re: Pushing a single tag (ref + object)?

On Wed, 19 Oct 2005, Martin Langhoff wrote:
Show 6 quoted lines
> 
> Now, I am at a loss on how to push a _tag_ object+ref to the repo,
> without doing a git-push --all, which I naturally don't want to do. I
> managed to push the object itself, doing
> 
>     git-push repository tagrefname
This really should work. 
Can you try with
	git-send-pack repository tagname
first? 

If that works for you (it really really should, since that's what I do all the time), then the problem is in "get_remote_refs_for_push"..

Oh. Looking at "git-push.sh", I think it is just really really buggy.

It does all this magic to set "x", but then it never uses it, and uses "$@" instead after all. Which it has shifted all away.

How does that thing work at all? Me, I've always used the raw git-send-pack program, so I've never tested it, but obviously others are using it.

		Linus
Junio C Hamano· Oct 19, 2005, 16:58 UTC · re: Linus Torvalds · lore

Re: Pushing a single tag (ref + object)?

Linus Torvalds <torvalds@osdl.org> writes:
> It does all this magic to set "x", but then it never uses it, and uses 
> "$@" instead after all. Which it has shifted all away. 

Your /bin/sh scripting is rotting ;-) That is not a variable. If you saw the script actually used the value 'x' then you have spotted a bug.

That 'x' is not a magic but an old idiom to protect 'set' from getting confused by "$1" that happens to begin with a '-'. Setting random things is done by "set x random things" immediately followed by shifting that x away.

Linus Torvalds· Oct 19, 2005, 20:23 UTC · re: Junio C Hamano · lore

Re: Pushing a single tag (ref + object)?

On Wed, 19 Oct 2005, Junio C Hamano wrote:
> 
> Your /bin/sh scripting is rotting ;-) That is not a variable.

Ahh. No. My /bin/sh scripting just has never been that good to begin with, since there's little reason to do so inside the kernel ;)

I literally didn't understand what "set" does. Thx. man-pages to the rescue.

		Linus

← back to recent threads