From: Felipe Contreras Date: Wed, 27 Apr 2011 12:26:00 GMT Subject: Re: Creating remote branch called HEAD corrupts remote clones Message-ID: In-Reply-To: On Wed, Apr 27, 2011 at 2:37 PM, Stephen Kelly wrote: > It is not expected. > > Alices repo is fubar'd. gitk doesn't work. The info about master being > ahead of remote etc is wrong or git push tells me it worked, though it > doesn't seem to. gitk --all works fine, and gitk show a precise warning explaining the problem. Also, the 'git push' worked fine. Perhaps what you didn't expect is that when push.default=current, instead of pushing the current branch, the 'HEAD' branch is being pushed. So the test can be simplified to: mkdir remote cd remote/ git init --bare cd ../ git clone remote/ alice cd alice/ echo test >> file git add file git commit -am w git push origin master echo test >> file git commit -am w git branch HEAD git push origin HEAD git -c push.default=current push git diff master origin/master And the diff should be empty. With that in mind, it should be easy to create a test script that does something similar, and add it to the suite. -- Felipe Contreras