Re: Creating remote branch called HEAD corrupts remote clones
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 27, 2011, 12:26 UTC
- Message-ID
- <BANLkTi=pPtsRMbJpgqMZy0Qq+HqT0uR_wQ@mail.gmail.com>
- In-Reply-To
- <BANLkTikCQkt+e-kA2hbtMh+OFqrrZHt-NQ@mail.gmail.com>
On Wed, Apr 27, 2011 at 2:37 PM, Stephen Kelly <steveire@gmail.com> wrote:
Show 5 quoted lines
> 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