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

Re: [PATCH v2] builtin-branch: improve output when displaying remote branches

From
MKmartin f krafft <madduck@madduck.net>
Date
Feb 13, 2009, 06:47 UTC
Message-ID
<20090213064707.GA17681@piper.oerlikon.madduck.net>
In-Reply-To
<7v7i3ug7y9.fsf@gitster.siamese.dyndns.org>
also sprach Junio C Hamano <gitster@pobox.com> [2009.02.13.0735 +0100]:
> Once you start making each case arm do more things, it might make sense to
> rewrite the above unrolled loop into something like this:
[...]
> 	} ref_kind[] = {
>         	{ REF_LOCAL_BRANCH, "refs/heads/", 11 },
>         	{ REF_REMOTE_BRANCH, "refs/remotes/", 13 },
> 	};
[...]
> Then we can later add new elements more easily, e.g.
> 
>                 { REF_TOPGIT_BASE, "refs/top-base/", 14 },

As soon as TopGit is integrated into Git proper, this could make sense. However, I don't know when this will happen. In the mean time, hardcoding extensions like you suggest might not scale too well. Wouldn't it make more sense to provide an interface that allowed tools to register their own namespaces, and handle those appropriately within Git?

Much of that handling could be taken straight from refs/remotes/*, as they are conceptually the same. refs/remotes/* just has additional treatment inside Git, because it's part of the basic feature set. An external feature's namespace wouldn't be, but Git also doesn't need to know anything about those, or treat them specially.

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"doesn't he know who i think i am?"
                                                     -- phil collins
 
spamtraps: madduck.bogus@madduck.net
Previous: Jay SoffianNext: Junio C Hamano
Message 12 of 14 in “builtin-branch: improve output when displaying remote branches”
  1. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 10, 2009
  2. Jay SoffianFeb 11, 2009
  3. Junio C HamanoFeb 12, 2009
  4. Jay SoffianFeb 12, 2009
  5. Junio C HamanoFeb 12, 2009
  6. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 13, 2009
  7. Junio C HamanoFeb 13, 2009
  8. Jay SoffianFeb 13, 2009
  9. Junio C HamanoFeb 13, 2009
  10. Jay SoffianFeb 13, 2009
  11. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 13, 2009
  12. martin f krafftFeb 13, 2009
  13. Junio C HamanoFeb 13, 2009
  14. Johannes SixtFeb 13, 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.