Subject: Re: branch description

From: Jakub Narebski <[email-masked]>
Date: Tue, 15 Apr 2008 18:33:48 -0700 (PDT)

Junio C Hamano <[email-masked]> writes:

> Brian Gernhardt <[email-masked]> 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
[...]
>> 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