Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Marcus Kida
Fair enough, thank you. I’m going to take a look at the previous threads. I’d also be keen to help working on those issues. > On 11 Mar 2016, at 9:41 AM, Jeff King wrote: > > On Fri, Mar 11, 2016 at 05:30:00AM +1100, Marcus Kida wrote: > >> thank you for the feedback. >> I will fix this, test

Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Jeff King
On Fri, Mar 11, 2016 at 05:30:00AM +1100, Marcus Kida wrote: > thank you for the feedback. > I will fix this, test it and send a patch. Unfortunately, I think this issue is a little more complicated. There's some prior discussion in http://thread.gmane.org/gmane.comp.version-control.git/28402

Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Marcus Kida
Hi Johannes, Hi Junio, here you’ll find a patch to hotfix the “delete-a-branch-you’re-on" issue. As Junio already stated there’s many more places where case (in)sensitivity is not handled correctly but this patch would at least prevent you from deleting the branch you’re currently working on (wh

Re: Bug: git branch -D can be used to delete branch which is currently checked out

2016-03-10 Thread Marcus Kida
Thank you, I get your point. Well this proposed solution will exceed my current knowledge of the git code at this point. (Which is basically null because I've never built it before) > On 11 Mar 2016, at 5:23 AM, Junio C Hamano wrote: > > Junio C Hamano writes: > >> It is a possibility to tea

Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Marcus Kida
Hi Johannes, thank you for the feedback. I will fix this, test it and send a patch. Cheers, Marcus > On 10 Mar 2016, at 11:15 PM, Johannes Schindelin > wrote: > > Hi Marcus, > >> On Thu, 10 Mar 2016, Marcus Kida wrote: >> >> Proposed solution: >> >> Use `strcasecmp`, `stricmp`, `strcmpi` h

Re: Bug: git branch -D can be used to delete branch which is currently checked out

2016-03-10 Thread Junio C Hamano
Junio C Hamano writes: > It is a possibility to teach the files backend of refs API that some > filesystems are case insensitive and do something special about them, > but I think in the longer term a more productive solution would be > to use the upcoming "pluggable ref backend" subsystem and ei

Re: Bug: git branch -D can be used to delete branch which is currently checked out

2016-03-10 Thread Junio C Hamano
Marcus Kida writes: > Testes on: > > Mac OS X 10.11.3 (El Capitan) using Git 2.6.4 > > Issue: > > git branch -D can be used to delete branch which is currently checked out There are other limitations a filesystem that is incapable of differentiating two files with names that are only different

Re: Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Johannes Schindelin
Hi Marcus, On Thu, 10 Mar 2016, Marcus Kida wrote: > Proposed solution: > > Use `strcasecmp`, `stricmp`, `strcmpi` here: > https://github.com/git/git/blob/f02fbc4f9433937ee0463d0342d6d7d97e1f6f1e/builtin/branch.c#L218 > > Not sure if/which one of this will work on POSIX as well as MS too thoug

Bug: git branch -D can be used to delete branch which is currently checked out - Part 2

2016-03-10 Thread Marcus Kida
Proposed solution: Use `strcasecmp`, `stricmp`, `strcmpi` here: https://github.com/git/git/blob/f02fbc4f9433937ee0463d0342d6d7d97e1f6f1e/builtin/branch.c#L218 Not sure if/which one of this will work on POSIX as well as MS too though. Thank you. Cheers, Marcus-- To unsubscribe from this list: s

Bug: git branch -D can be used to delete branch which is currently checked out

2016-03-10 Thread Marcus Kida
Testes on: Mac OS X 10.11.3 (El Capitan) using Git 2.6.4 Issue: git branch -D can be used to delete branch which is currently checked out Steps to reproduce: inside a git repository: $ git checkout -b feature/myAwesomeFeature -> you end up in feature/myAwesomeFeature branch $ git checkout