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, 07:48 UTC
Message-ID
<20130208074813.GA7337@elie.Belkin>
In-Reply-To
<7v38x766b2.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 5 quoted lines
> I'd actually see this as Gerrit being weird.
>
> If it wants to quarantine a commit destined to the "master" branch,
> couldn't it just let people push to "master" and then internally
> update "for/master" instead?

It is because pushing doesn't update refs/heads/master. Instead, it starts a code review.

Suppose Gerrit allows starting a new code review by pushing to refs/heads/master. It sounds okay if I squint --- it's just a very slow asynchronous ref update, right? Let's see:

	$ git clone <gerrit server> test
	Cloning into 'test'...
	$ echo hi >greeting
	$ git add greeting
	$ git commit -q -m 'hello'
	$ git push origin master
[...]
	remote: New Changes:
	remote:   <gerrit server>/r/1234
	remote: 
	To <url>
	   ea4cb77b..9117390e  master -> master
	$ : walk away, forget what I was doing
	$ git fetch origin
	From <url>
	 + 9117390...ea4cb77 master     -> origin/master  (forced update)
"Wait, why did the remote rewind?"

Regards, Jonathan

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.