git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Michael S. TsirkinNext: Michael S. Tsirkin
Message 11 of 12 in “push not resolving commit-ish?”
  1. Michael S. TsirkinMay 23, 2013
  2. Michael S. TsirkinMay 23, 2013
  3. Felipe ContrerasMay 23, 2013
  4. Junio C HamanoMay 23, 2013
  5. Michael S. TsirkinMay 23, 2013
  6. Junio C HamanoMay 23, 2013
  7. Michael S. TsirkinMay 23, 2013
  8. Junio C HamanoMay 23, 2013
  9. Junio C HamanoMay 23, 2013
  10. Michael S. TsirkinMay 23, 2013
  11. Junio C HamanoMay 23, 2013
  12. Michael S. TsirkinMay 23, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.