From: Junio C Hamano Date: Tue, 15 Apr 2008 19:12:16 GMT Subject: Re: branch description Message-ID: <7vej97x78v.fsf@gitster.siamese.dyndns.org> In-Reply-To: Brian Gernhardt 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 "\t", > 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 > > Simple, no tags, new object types or anything. All you have to do is > add the bits to git-branch to add, edit, and remove the description > alongside the branch itself. > > 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.