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

Re: branch description

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 15, 2008, 18:36 UTC
Message-ID
<m3iqyjrmmk.fsf@localhost.localdomain>
In-Reply-To
<f9d2a5e10804151031o1d09c1f9od0ad78dcf9b746c5@mail.gmail.com>
"Russ Dill" <russ.dill@gmail.com> writes:
Show 20 quoted lines
>>  I find it useful to use fairly short names for branches.  However,
>>  sometimes I would like to have a full sentence to actually describe
>>  what the branch is for, without having the peruse the actual commits.
> 
> Me too.
> 
>>  This information could of course be kept on a web page, but it would
>>  be nice to have it in the repo.
> 
> Like, putting your bug number in the branch name.
> 
>>  Is there any such branch annotation command?
>>  Ideally I'd like to see a sentence displayed next to the branch name
>>  when I use "git-branch".
>>  Perhaps, git-branch --info or something.
> 
> 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.

Errr... not exactly. It is true that refs such like branches reside outside object database[1], and that names of refs are purely local matter (see old master -> origin mapping, and new refs/heads/* -> refs/remotes/<remote>/* mapping). But you can examine list of branches in remote repository using e.g. git-ls-remote or its equivalent in the git API.

So I think better solution would be to add this info somewhere outside object database, for example in repository config (assuming that not all branches would have description) as it already stores branch related information, _and_ enhance commands to make use of this info, not only git-branch, but also git-for-each-ref, git-show-refs and git-ls-remote (and its equivalents).

Footnotes: ========== [1] And have to be, Mercurial misdesign nothwithstanding

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jakub Narebski
Message 23 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.