Re: branch description
- From
Matt Graham <mdg149@gmail.com>
- Date
- Apr 16, 2008, 03:46 UTC
- Message-ID
- <1c5969370804152046h8d67630m697ca71b523b04d9@mail.gmail.com>
- In-Reply-To
- <m3abjushvs.fsf@localhost.localdomain>
On Tue, Apr 15, 2008 at 9:33 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 39 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > 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 > [...] > > >> 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.
I agree that outside the object repository would be better. Propogating branch descriptions doesn't seem all that useful. I wouldn't usually expect to want a branch for the same purpose as the upstream repository and it would seem weird to get a default description of it coming along with the branch. Just like I give my branches my own name, I would expect to have to give them my own description.