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

Re: [PATCH] Use the template mechanism to set up refs/ hierarchy as well.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 5, 2005, 00:20 UTC
Message-ID
<7vll3hqlo6.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.62.0508041804120.23721@iabervon.org>
barkalow@iabervon.org writes:
> ... I seem to recall a patch to create subdirectories of
> .git/refs on demand (needed for tags/v99/1). I'd say just
> .git/objects/(everything), .git/refs, and .git/info.

Having thought about this a bit more, I am inclined to drop this. I see the template mechanism to be something that lets site and project policy makers set up the repositories to suit their taste, by having their users point their own template directory via the GIT_TEMPLATE_DIRECTORY environment variable. How $GIT_DIR/refs/heads/ and $GIT_DIR/refs/tags/ are used are quite deeply ingrained in the core tools, and there is no point pretending as if they can be overridden; they are not.

As Daniel says, refs/*/ are created mostly on-demand [*1*], so it is not strictly necessary to create "heads" and "tags" upfront, but they are so basic that I'd feel comfortable to keep them part of what are done by git-init-db.

[Footnote]

*1* I fixed one in receive-pack recently, but please fix things if you find any of the core tools assume that the leading paths already exist.

Previous: barkalow@iabervon.org
Message 10 of 10 in “Use the template mechanism to set up refs/ hierarchy as well.”
  1. Use the template mechanism to set up refs/ hierarchy as well.Junio C Hamano, Aug 3, 2005
  2. Johannes SchindelinAug 4, 2005
  3. Junio C HamanoAug 4, 2005
  4. Johannes SchindelinAug 4, 2005
  5. Junio C HamanoAug 4, 2005
  6. Johannes SchindelinAug 4, 2005
  7. Junio C HamanoAug 4, 2005
  8. Johannes SchindelinAug 5, 2005
  9. barkalow@iabervon.orgAug 4, 2005
  10. Junio C HamanoAug 5, 2005

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.