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

Re: [PATCH] Don't create the $GIT_DIR/branches directory on init

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 31, 2009, 18:09 UTC
Message-ID
<20091031180920.GN10505@spearce.org>
In-Reply-To
<200910311902.48317.robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
Show 7 quoted lines
> >   * a remote in the git configuration file: `$GIT_DIR/config`,
> >   * a file in the `$GIT_DIR/remotes` directory, or
> >   * a file in the `$GIT_DIR/branches` directory.
> 
> I, and a few other people, it seems. Seems the purpose of these
> files is a bit different. Git does look in these directories (both)
> when fetch is run. Seems remotes is not created by init though.

Since remotes isn't created by init, branches shouldn't be either. Cogito is dead, and that was the main customer who wanted branches to be present in a repository.

I think its safe to remove branches from the template repository and stop creating it, but continue to read from branches and remotes if they exist.

We might want to consider dropping support for them in 1.7.0 or 1.8.0, because any new tools largely focus on config. E.g. git-remote probably can't edit branches or remotes, git-gui probably doesn't use them, JGit doesn't use them.

-- 
Shawn.
Previous: Robin RosenbergNext: Junio C Hamano
Message 5 of 8 in “Don't create the $GIT_DIR/branches directory on init”
  1. Don't create the $GIT_DIR/branches directory on initRobin Rosenberg, Oct 30, 2009
  2. Junio C HamanoOct 30, 2009
  3. Thomas RastOct 31, 2009
  4. Robin RosenbergOct 31, 2009
  5. Shawn O. PearceOct 31, 2009
  6. Junio C HamanoOct 31, 2009
  7. Shawn O. PearceOct 31, 2009
  8. Junio C HamanoOct 31, 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.