Re: BUG or FEATURE? Use of '/' in branch names

2014-05-03 Thread Dennis Kaarsemaker
On vr, 2014-05-02 at 15:16 -0700, Jonathan Nieder wrote: $ git checkout -b hotfix/b2 error: unable to resolve reference refs/heads/hotfix/b2: Not a directory fatal: Failed to lock ref for update: Not a directory $ That's an ugly message. I think we can do better. (hint

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-03 Thread Michael Haggerty
On 05/03/2014 09:35 AM, Dennis Kaarsemaker wrote: On vr, 2014-05-02 at 15:16 -0700, Jonathan Nieder wrote: $ git checkout -b hotfix/b2 error: unable to resolve reference refs/heads/hotfix/b2: Not a directory fatal: Failed to lock ref for update: Not a directory $ That's an

BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Keith Derrick
According to https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html a '/' is character to use in a branch name. git imposes the following rules on how references are named: 1. They can include slash / for hierarchical (directory) grouping, but no slash-separated component

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Junio C Hamano
Keith Derrick keith.derr...@lge.com writes: The problem arises when a branch already exists with a name matching the stem of the new branch name. ... But, for the reverse reason, I can't now create the branch named 'hotfix' All correct. Allowing '/' in branch names came about not with a

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Jonathan Nieder
Hi Keith, Keith Derrick wrote: $ git checkout -b hotfix Switched to a new branch 'hotfix' $ git checkout -b hotfix/b2 error: unable to resolve reference refs/heads/hotfix/b2: Not a directory fatal: Failed to lock ref for update: Not a directory $ That's an ugly

RE: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Felipe Contreras
Keith Derrick wrote: I can see the value in grouping branches in a directory tree under refs/heads, but wouldn't it make more sense to simply escape the '/' in the branch name so that 'hotfix/b1' is stored on disk as 'hotfix\/b1'? This would be nice for remote helpers: Mercurial can have

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Keith Derrick
Yes, I've since found some discussion on this, and had already changed to use '-' to append the classifier. But the other problem is that I can't easily find this restriction documented anywhere - which means it comes as a suprise to people. As it stands, the documentation implies that what I

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Jonathan Nieder
Hi, Keith Derrick wrote: Yes, I've since found some discussion on this, and had already changed to use '-' to append the classifier. But the other problem is that I can't easily find this restriction documented anywhere - which means it comes as a suprise to people. That sounds like