As a heads up, the CDT team got into a mess by pushing a change to git (i.e. not through Gerrit) with a ref of refs/for/master. This prevented other changes from being pushed to Gerrit.
Since this was a mistake (resolved by deleting the offending branch) I wonder what we could do to prevent it from recurring, or find out if Gerrit can be coded defensively against this condition.
One thought is we could add a hook to prevent anyone trying to push a refs/for reference to Git directly or have some daily cleanup that removes */*.git/refs/for/ in case they get inadvertently added.
Alex
Sent from my iPhone 4S Begin forwarded message:
Thanks Vladimir for figuring this out!You were right that EGit fetches refs/heads branches and not refs/for.When I added that spec manually, I got to see the bad branch.I then did the git push origin :refs/for/masterwhich got rid of the branch (thanks Alex for making me feel safe to do it :))... and Gerrit works again :)BTW, the bad branch could not be seen straight from the Git repo on the web(I had looked for it).How did you find the for/master branch? Did you type it in directly in the URL box?Thanks again!Marc________________________________________From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alex Blewitt [alex.blewitt@xxxxxxxxx]Sent: September 6, 2012 5:06 PMTo: CDT General developers list.Subject: Re: [cdt-dev] Any problems pushing to Gerrit?On 6 Sep 2012, at 22:04, Vladimir Prus wrote:I actually believe anybody with commit access can do this:git push origin :refs/for/masterto delete this ref on the server. Anybody wants to give it a try?Yes, this should have the desired effect - but it will leave an empty direction 'refs/for' on the server. Whether that has an impact or not I don't know.The Git log shows the push being incorrectly applied to the Git repo rather than Gerrit:http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/log/?h=for/masterAlex_______________________________________________cdt-dev mailing listcdt-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/cdt-dev
|