Re: branch description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Russ Dill" <russ.dill@xxxxxxxxx> writes:

>>  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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux