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

Re: [PATCH 4/5] Add --remote option to send-pack

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 29, 2007, 06:10 UTC
Message-ID
<20070429061006.GU5942@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0704290152410.28708@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 5 quoted lines
> We're not pretending anything; remote has confirmed that the head that the 
> ref tracks has a particular new value (which we provided), so we should be 
> able to update the tracking ref to that value. I don't think it's 
> particularly important that we came by this information in the course of 
> an exchange that wasn't a fetch.
s/remote has confirmed/remote has claimed/

The only way to know the remote really did remember that refs/heads/foo is now at 3c1718... is to perform some sort of operation against it that makes it dump its refs back. Trying to push again, or trying to fetch does that.

There is also the possibility that a post-update or post-receive hook will actually modify the ref *after* the push is "complete". But that's like so crazy that I really don't think anyone has a workflow that does that. They might have such a hook that creates a new ref however, or updates a totally unrelated ref (e.g. compile the code and then update a "last-built" ref).

So in this particular case I have to agree with Daniel, its probably OK to do what Cogito does and update the tracking branch after the push was claimed to be successful by the remote.

-- 
Shawn.
Previous: Daniel BarkalowNext: Junio C Hamano
Message 4 of 15 in “Add --remote option to send-pack”
  1. 4/5 Add --remote option to send-packDaniel Barkalow, Apr 28, 2007
  2. Junio C HamanoApr 29, 2007
  3. Daniel BarkalowApr 29, 2007
  4. Shawn O. PearceApr 29, 2007
  5. Junio C HamanoApr 29, 2007
  6. Daniel BarkalowMay 3, 2007
  7. Junio C HamanoMay 3, 2007
  8. Daniel BarkalowMay 3, 2007
  9. Junio C HamanoMay 3, 2007
  10. Daniel BarkalowMay 5, 2007
  11. Junio C HamanoMay 5, 2007
  12. Daniel BarkalowMay 5, 2007
  13. Junio C HamanoMay 5, 2007
  14. Daniel BarkalowMay 5, 2007
  15. Loeliger Jon-LOELIGERMay 7, 2007

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.