Issue 690: Gerrit should warn if refs/for/<branch> is a real ref instead of complaining that the change is "non-fast-forward"
Status:  Released
Owner: ----
Closed:  Aug 2010
Reported by tsuna...@gmail.com, Aug 26, 2010
Affected Version: All up to and including 2.1.5

What steps will reproduce the problem?
1. Mistakenly create a branch named refs/for/master
2. Try to push something to Gerrit.  It'll always fail with:
 ! [rejected]        HEAD -> refs/for/master (non-fast-forward)

What is the expected output? What do you see instead?
It took me about 2 months to realize that someone had bypassed Gerrit somehow to create this branch.  Gerrit became unusable for this repository because this file existed.  I had to strace Gerrit to understand that this was the problem.

I think Gerrit doesn't expect that there be real refs under `refs/for/`.  I think it should warn the user or at least log a warning if the directory exists of if it attempts to read an actual ref from it.
Aug 26, 2010
#1 sop@google.com
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-2.1.6
Aug 28, 2010
#2 sop@google.com
Fixed in I518405fb54ff2f03e8f4dfee3346f607d88b92b9
Status: Submitted
Labels: -Milestone-2.1.6 FixedIn-2.1.6
Aug 30, 2010
#3 tsuna...@gmail.com
Thanks for the quick fix!  Sorry for the n00b question but where is Gerrit's own Gerrit instance?  I'd like to see how you fixed this so I can try to fix it myself next time this kind of problem crops up (I've never actually dug into Gerrit's source code, but I'm curious now).
Dec 15, 2010
#5 sop@google.com
(No comment was entered for this change.)
Status: Released