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