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

Re: Proposal: branch.<name>.remotepush

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 8, 2013, 18:36 UTC
Message-ID
<20130208183629.GA8461@google.com>
In-Reply-To
<5114D5B0.5080906@drmicha.warpmail.net>
Michael J Gruber wrote:
> Junio C Hamano venit, vidit, dixit 08.02.2013 09:16:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 11 quoted lines
>>> "Wait, why did the remote rewind?"
>>
>> Oh, I am very well aware of that glitch.
>>
>> "git push" has this hack to pretend as if the pusher immediately
>> turned around and fetched from the remote.
>> 
>> It shouldn't have been made to do so unconditionally; instead it
>> should have been designed to give the pushee a way to optionally
>> tell you "I acccept this push, but you may not see it to be updated
>> to that exact value you pushed when you fetched from me right now".
Yes, I agree with this.

The "git push" hack does seem to be useful in practice for helping people just starting to use git. If they have a separate "gitk --all" window open, they can refresh it and see the remote-tracking branch corresponding to the branch that has been pushed advancing. It matches a model in which remote-tracking refs represent "git's idea of where these branches are in the remote repository".

And in that model, a remote being able to respond to a push with "ref update queued, but please keep in mind that it may take me a while to chew through that queue" should be perfectly reasonable.

[...]
> And this seems to be more natural, too. It can keep the internals (the
> auxiliary ref on the server side) hidden from the user.

Just to clarify: this is not an internal ref being exposed. No auxiliary refs/for/master ref actually exists. The ref Gerrit users push to is a UI fiction.

That's important because otherwise two developers could not propose changes for the same branch at the same time.

Jonathan
Previous: Junio C HamanoNext: Ramkumar Ramachandra
Message 15 of 25 in “Proposal: branch.<name>.remotepush”
  1. Ramkumar RamachandraFeb 7, 2013
  2. Michael SchubertFeb 7, 2013
  3. Ramkumar RamachandraFeb 7, 2013
  4. Ramkumar RamachandraFeb 7, 2013
  5. Ramkumar RamachandraFeb 7, 2013
  6. Jonathan NiederFeb 7, 2013
  7. Junio C HamanoFeb 7, 2013
  8. Jonathan NiederFeb 8, 2013
  9. Junio C HamanoFeb 8, 2013
  10. Michael J GruberFeb 8, 2013
  11. Junio C HamanoFeb 8, 2013
  12. Junio C HamanoFeb 8, 2013
  13. Ramkumar RamachandraFeb 8, 2013
  14. Junio C HamanoFeb 8, 2013
  15. Jonathan NiederFeb 8, 2013
  16. Ramkumar RamachandraFeb 8, 2013
  17. Junio C HamanoFeb 8, 2013
  18. Ramkumar RamachandraFeb 9, 2013
  19. Jeff KingFeb 8, 2013
  20. Junio C HamanoFeb 8, 2013
  21. Jeff KingFeb 8, 2013
  22. Junio C HamanoFeb 8, 2013
  23. Jeff KingFeb 8, 2013
  24. Junio C HamanoFeb 8, 2013
  25. Ramkumar RamachandraFeb 8, 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.