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

Re: [PATCH] Do not ignore hidden refs

From
Shawn Pearce <spearce@spearce.org>
Date
Nov 18, 2006, 07:41 UTC
Message-ID
<20061118074119.GA2338@spearce.org>
In-Reply-To
<7vzmapdxki.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 9 quoted lines
> Personally I established a convention to treat heads/??/* as
> "private namespace" while using heads/* as public refs for my
> own work (I do that for git.git as people know, and I do that
> for my day job project as well).  I do not think it is a great
> enough convention to be promoted as the official BCP, but it has
> been good enough for me, especially commands like "show-branch"
> and "tag -l" understands the shell-style filegrobs (e.g
> "show-branch master heads/??/*" would show what's yet to be
> polished and merged).
We use refs/heads/??/* as "developer specific" namespaces.

That is we use an update hook in our central repository to control who can push into refs/heads/??/*. If ?? matches the unix account holder's initials then they can push into that name, otherwise they can't. This prevents any sort of naming collisions between developers.

To make things slightly easier I've also suggested that people name their local branches with the same ??/ prefix as they need to use on the central repository, thereby making the branch name the same everywhere. This is actually one reason why git-completion.bash suggests "??/foo:??/foo" when completing a branch name to git-push. :)

So I don't think its a great idea to assume by default that refs/heads/??/* is private to this repository.

Though on second thought maybe we should be using developer private repositories with object alternates pointing at a central repository. But that means users have to manipulate URLs to fetch another developer's branch vs. just using an existing remote.<nick>.url, which is the main reason we put everything into one repository.

Previous: Junio C HamanoNext: Petr Baudis
Message 5 of 14 in “Do not ignore hidden refs”
  1. Do not ignore hidden refsPetr Baudis, Nov 18, 2006
  2. Junio C HamanoNov 18, 2006
  3. Petr BaudisNov 18, 2006
  4. Junio C HamanoNov 18, 2006
  5. Shawn PearceNov 18, 2006
  6. Petr BaudisNov 18, 2006
  7. Junio C HamanoNov 18, 2006
  8. Petr BaudisNov 18, 2006
  9. Junio C HamanoNov 18, 2006
  10. Petr BaudisNov 18, 2006
  11. Junio C HamanoNov 19, 2006
  12. Petr BaudisNov 19, 2006
  13. Linus TorvaldsNov 18, 2006
  14. Junio C HamanoNov 18, 2006

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.