Re: push not resolving commit-ish?
On Thu, May 23, 2013 at 02:19:40PM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>
> > 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.
Yes, that would help my case.
>
> Restriction in the other direction (i.e. "if push does not go to
> refs/tags/, unconditionally unwrap") is a no-no, though.