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

Re: benefits of "/" in branch names other than the obvious?

From
Stefan Beller <sbeller@google.com>
Date
Nov 6, 2017, 17:50 UTC
Message-ID
<CAGZ79kZqRV2Sui5-XRcukZiucKzv+DvRr3x3-=dHaxB5ZC6LyQ@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.21.1711060733510.13383@localhost.localdomain>
On Sun, Nov 5, 2017 at 9:36 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
Show 11 quoted lines
>
>   another picky question ... are there any other benefits of
> supporting slashes in branch names other than the obvious ones i know
> about?
>
> 1) visually, let's you *imagine* a branch hierarchy, and
> 2) allows wildcarding on a full "component" basis
>
>   are there any other benefits of the above? thank you kindly.
>
> rday

Currently refs are stored either in .git/packed_refs, or the refs are taken as a literal filename (refs/heads/master is found in .git/refs/heads/master).

When stored as literal files on disk there are interesting implications:
* File System speed when there are *lots* of refs
  (a lot of files in one dir vs sharding or a tree like structure)
*  Directory/conflicts in the data model:
    What if you want to have a ref foo/bar as well as foo?
    This is not possible as 'foo' must be either a directory
    or a file. This spawns occasional issues such as
https://public-inbox.org/git/20171024082409.smwsd6pla64jjlua@sigill.intra.peff.net/
Previous: Robert P. J. Day
Message 2 of 2 in “benefits of "/" in branch names other than the obvious?”
  1. Robert P. J. DayNov 6, 2017
  2. Stefan BellerNov 6, 2017

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.