git/list[1] front-page[2] threads[3] people[4] search[5] about
 

PEBKAC or bug: unable to create path-like branch names

From
TJTodd A. Jacobs <nospam@codegnome.org>
Date
Nov 15, 2009, 05:02 UTC
Message-ID
<20091115050227.GD5934@penguin.codegnome.org>
In-Reply-To
<20091115020605.GE15966@cl.cam.ac.uk>

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"
Previous: Steven J. MurdochNext: Jacob Helwig
Message 2 of 7 in “Preserving empty directories when doing a git-svn clone/rebase”
  1. Steven J. MurdochNov 15, 2009
  2. PEBKAC or bug: unable to create path-like branch namesTodd A. Jacobs, Nov 15, 2009
  3. Jacob HelwigNov 15, 2009
  4. Todd A. JacobsNov 15, 2009
  5. Jacob HelwigNov 15, 2009
  6. Daniel BarkalowNov 15, 2009
  7. Eric WongNov 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.