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

Re: branch description

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 22, 2008, 18:59 UTC
Message-ID
<m33apdra0w.fsf@localhost.localdomain>
In-Reply-To
<alpine.DEB.1.10.0804221945060.3452@pollux.milkiway.cos>
Michael Dressel <MichaelTiloDressel@t-online.de> writes:
> On Friday 18 April 2008, Jakub Narebski wrote:
Show 17 quoted lines
> > Let me sum up here proposals where to put branch description:
> >
> > [...]
> 
> what's the opinion of having a new branch object? Actually the tag
> object probably already does the job? This would spoil the elegant
> light weight current branch references. But tags are not that heavy.
> 
> In this approach the tags would not reference commits but tags. And
> tags have annotation. The difference to the normal tags would be that
> these tags are referenced from refs/heads/<branch> instead of
> refs/tags.
> 
> I have no clue how involved this change would become and if the
> benefit would justify the effort. I guess using proper objects for
> branches would only be justified if additional advantages could be
> achieved.
This won't work.  With described (annotated) branches, there are two
pieces of data associated with a branch:
 * commit it points to (branch head)
 * description of a branch

Branch head changes frequently (commit, reset, bisect, rebase), while description should change rarely. Those two pieces of data are independent. Tag object would unnecessary join/fuse those two together.

Also, for exach commit on a branch, or for each moving of branch ref (reset, amend, bisect), you would have to create tag object, which would accumulate only to be garbage collected some time in the future...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Johan Herland
Message 3 of 3 in “Re: branch description”
  1. Michael DresselApr 22, 2008
  2. Johan HerlandApr 22, 2008
  3. Jakub NarebskiApr 22, 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.