From: Jacob Helwig Date: Sun, 15 Nov 2009 05:36:47 GMT Subject: Re: PEBKAC or bug: unable to create path-like branch names Message-ID: <8c9a060911142136s68a08892ifa27989f3a5bfdfb@mail.gmail.com> In-Reply-To: <20091115050227.GD5934@penguin.codegnome.org> On Sat, Nov 14, 2009 at 21:02, Todd A. Jacobs wrote: > I want to create a nested feature branch, but git keeps complaining if I > nest more than one level deep: > >    $ git checkout -b dev/feature/foo >    error: unable to resolve reference refs/heads/dev/feature/foo: >    Not a directory >    fatal: Failed to lock ref for update: Not a directory > > Based on my reading of the manual pages, it seems like I should be able > to nest branch names as long as it conforms to certain rules. I read > git-branch(1), which points me to git-check-ref-format(1), which seems > to say that the rules are being followed. > > On the other hand, running: > >    $ git check-ref-format foo; echo $? > > always results in a non-zero error code, even with a literal 'foo' as a > branch name, so clearly it isn't saying what I think it's saying. > *shrug* > > Can someone provide a little clarity here? > > -- > "Oh, look: rocks!" >        -- Doctor Who, "Destiny of the Daleks" > What version of git are you using? git checkout -b foo/bar/baz works for me on 1.6.5.2. As far as git check-ref-format, it works (returns 0) if I do 'refs/heads/foo', but returns 1 on 'foo'. This makes sense, given rule 2 from the manpage: They must contain at least one /. This enforces the presence of a category like heads/, tags/ etc. but the actual names are not restricted. Hope this helps. -Jacob