Re: Branch deletion question / possible bug?
From: Jacob Keller <hidden>
Date: 2018-04-28 07:45:21
On Fri, Apr 27, 2018 at 5:29 PM, Tang (US), Pik S [off-list ref] wrote:
Hi, I discovered that I was able to delete the feature branch I was in, due to some fat fingering on my part and case insensitivity. I never realized this could be done before. A quick google search did not give me a whole lot to work with... Steps to reproduce: 1. Create a feature branch, "editCss" 2. git checkout master 3. git checkout editCSS 4. git checkout editCss 5. git branch -d editCSS
Are you running on a case-insensitive file system? What version of git? I thought I recalled seeing commits to help avoid creating branches of the same name with separate case when we know we're on a file system which is case-insensitive..
Normally, it should have been impossible for a user to delete the branch they're on. And the deletion left me in a weird state that took a while to dig out of. I know this was a user error, but I was also wondering if this was a bug.
If we have not yet done this, I think we should. Long term this would be fixed by using a separate format to store refs than the filesystem, which has a few projects being worked on but none have been put into a release. Thanks, Jake
Thanks, Pik Tang