Re: push not resolving commit-ish?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 23, 2013, 21:19 UTC
- Message-ID
- <7v38tde6mr.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130523210920.GB31421@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
Show 10 quoted lines
> On Thu, May 23, 2013 at 11:05:00AM -0700, Junio C Hamano wrote: >> "Michael S. Tsirkin" <mst@redhat.com> writes: >> >> > Looks like push can't resolve tags to commits. >> > Why is that? >> >> How else would you push a tag out? > > Well my reaction is, it seems to figure out it needs a commit and then > instead of just getting it, it errors out. Why not just DWIM?
Ahh, that one.
The local branch name hierarchy refs/heads/ is special in that you cannot have a tag sitting at the tip, so when "push" decides to update something under refs/heads/ on the receiving end, it may not be a bad idea to peel it to a commit (and fail if it does not) before creating a pack and telling the other end what the value of the updated tip should be, and I do not think it will hurt anybody.
Restriction in the other direction (i.e. "if push does not go to refs/tags/, unconditionally unwrap") is a no-no, though.