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

Re: branch description

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 16, 2008, 01:33 UTC
Message-ID
<m3abjushvs.fsf@localhost.localdomain>
In-Reply-To
<7vej97x78v.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> Brian Gernhardt <benji@silverinsanity.com> writes:
> 
>> On Apr 15, 2008, at 1:31 PM, Russ Dill wrote:
>>
>>> The problem is that a branch is just a floating name for a line of
>>> development. Its not really a "thing" in the repository like a tag or
>>> a commit. You'd need to make some sort of special tag that describes
>>> the branch or somesuch.
>>
>> No special tags needed.  A simple file that I'll call .git/info/
>> ref_names could be a set of lines that have "<ref>\t<description>",
>> like the following:
>>
>> refs/heads/master	Collection point for all my work
>> refs/heads/ref_names	Add descriptions for branches
>> refs/heads/segfault	Trying to fix bug #12345
[...]
Show 7 quoted lines
>> Now if you want to propagate these descriptions when you push and
>> pull, things get a lot more complicated.
> 
> Not complicated at all.  Put that description in-tree in a known location
> (say, "help-branch") in-tree and your propagation problem is solved.
> 
> And have a scriptlet in $HOME/bin/git-help-branch to grep from that file.

Please, let's don't repeat Mercurial mistake of placing unversioned information (such as branch names in case of Mercurial, or branches descriptions in this case) in-tree, i.e. version it. Think of what would happen if you reset to the state (or checkout to some branch with the state) which is before some branch was created, or before some branch got description. Mercurial deals with this using "special" not lika in-tree treatment of such a file... I don't think it is a good idea.

I think it wouldb be better to put branches descriptions somewhere outside object repository, be it .git/info/ref_names of .git/config.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Brian GernhardtNext: Jeff King
Message 10 of 23 in “branch description”
  1. Stephen SinclairApr 15, 2008
  2. Russ DillApr 15, 2008
  3. Brian GernhardtApr 15, 2008
  4. Junio C HamanoApr 15, 2008
  5. Jeff KingApr 15, 2008
  6. Jeff KingApr 15, 2008
  7. Junio C HamanoApr 15, 2008
  8. Stephen SinclairApr 15, 2008
  9. Brian GernhardtApr 15, 2008
  10. Jakub NarebskiApr 16, 2008
  11. Jeff KingApr 16, 2008
  12. Stephen SinclairApr 16, 2008
  13. Mike HommeyApr 16, 2008
  14. Matt GrahamApr 16, 2008
  15. Johan HerlandApr 16, 2008
  16. Jakub NarebskiApr 18, 2008
  17. Johan HerlandApr 19, 2008
  18. Junio C HamanoApr 19, 2008
  19. Johan HerlandApr 19, 2008
  20. Jakub NarebskiApr 19, 2008
  21. Junio C HamanoApr 16, 2008
  22. Jakub NarebskiApr 16, 2008
  23. Jakub NarebskiApr 15, 2008

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.