Junio C Hamano wrote:
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html