threads / discuss / 15824

Feature Request: Branch Annotations

Subject: Feature Request: Branch Annotations

## tl;dr

10 messages between Oct 8, 2008 and Oct 10, 2008.

replies: 9people: 9as markdown or json

Rotem Yaari· Oct 8, 2008, 10:49 UTC · lore
Hi,

I usually work with many branches in git, each of which represents a different state of development/stability, but also development tasks assigned to me. Sometimes, besides the name of the branch, it could be useful to have a short description of a branch which quickly reminds me what that branch is intended for.

Currently I see no way in git to achieve this (there's a description for a repository, but not for individual branches).

Any opinions on this?
Thanks in advance,

-- Rotem

Thomas Adam· Oct 8, 2008, 10:55 UTC · re: Rotem Yaari · lore

Re: Feature Request: Branch Annotations

2008/10/8 Rotem Yaari <vmalloc@gmail.com>:
Show 13 quoted lines
> Hi,
>
> I usually work with many branches in git, each of which represents a
> different state of development/stability, but also development tasks
> assigned to me.
> Sometimes, besides the name of the branch, it could be useful to have
> a short description of a branch which quickly reminds me what that
> branch is intended for.
>
> Currently I see no way in git to achieve this (there's a description
> for a repository, but not for individual branches).
>
> Any opinions on this?

Wasn't this discussed here before, with a prototype? ISTR it was, but dropped due to lack of interest? Have a look through the archives.

-- Thomas Adam
Baz· Oct 8, 2008, 11:41 UTC · re: Thomas Adam · lore

Re: Feature Request: Branch Annotations

2008/10/8 Thomas Adam <thomas.adam22@gmail.com>:
Show 17 quoted lines
> 2008/10/8 Rotem Yaari <vmalloc@gmail.com>:
>> Hi,
>>
>> I usually work with many branches in git, each of which represents a
>> different state of development/stability, but also development tasks
>> assigned to me.
>> Sometimes, besides the name of the branch, it could be useful to have
>> a short description of a branch which quickly reminds me what that
>> branch is intended for.
>>
>> Currently I see no way in git to achieve this (there's a description
>> for a repository, but not for individual branches).
>>
>> Any opinions on this?
>
> Wasn't this discussed here before, with a prototype?  ISTR it was, but
> dropped due to lack of interest?  Have a look through the archives.

The most recent thread was 'branch description' back in April, which discussed alternatives, but petered out: http://kerneltrap.org/mailarchive/git/2008/4/15/1442684/thread

An older thread on 'topic descriptions' where Junio described his use of the config file for this: http://kerneltrap.org/mailarchive/git/2006/12/6/232466/thread

And there's a similar feature in stgit, which uses the same config setting that Junio did: http://kerneltrap.org/mailarchive/git/2007/5/14/246358 http://kerneltrap.org/mailarchive/git/2007/4/12/243404

-Baz
Show 7 quoted lines
>
> -- Thomas Adam
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Marc Weber· Oct 8, 2008, 12:08 UTC · re: Baz · lore

Re: Feature Request: Branch Annotations

On Wed, Oct 08, 2008 at 12:41:43PM +0100, Baz wrote:
Show 15 quoted lines
> 2008/10/8 Thomas Adam <thomas.adam22@gmail.com>:
> > 2008/10/8 Rotem Yaari <vmalloc@gmail.com>:
> >> Hi,
> >>
> >> I usually work with many branches in git, each of which represents a
> >> different state of development/stability, but also development tasks
> >> assigned to me.
> >> Sometimes, besides the name of the branch, it could be useful to have
> >> a short description of a branch which quickly reminds me what that
> >> branch is intended for.
> >>
> >> Currently I see no way in git to achieve this (there's a description
> >> for a repository, but not for individual branches).
> >>
> >> Any opinions on this?

[...] Probably I've missed something. but doesn't top git add some special files to remember branch relations? I guess it removes them before merging upstream ? I would have to reread the README or topGit source to confirm this.

Marc Weber
Junio C Hamano· Oct 8, 2008, 23:12 UTC · re: David Soria Parra · lore

Re: Feature Request: Branch Annotations

David Soria Parra <sn_@gmx.net> writes:
Show 7 quoted lines
>> Any opinions on this?
>
> would be great to have something like that build in git-core like
>
> git branch -i 'Fix bla' ds/fix next
> git branch -i
>  ds/fix (Fix Bla)

Haven't people watched Linus on google tech talk? Here is an excerpt from the transcript (http://git.or.cz/gitwiki/LinusTalk200705Transcript):

    ... well actually you shouldn't call it "test", you should basically
    name your branches the way you name your functions, you should call
    them something short and sweet and to the point -- What is that branch
    doing.
IOW, why did you name the branch "ds/fix" and not "ds/fix-bla"?
David Soria Parra· Oct 8, 2008, 23:20 UTC · re: Junio C Hamano · lore

Re: Feature Request: Branch Annotations

Show 9 quoted lines
> Haven't people watched Linus on google tech talk?  Here is an excerpt from
> the transcript (http://git.or.cz/gitwiki/LinusTalk200705Transcript):
> 
>     ... well actually you shouldn't call it "test", you should basically
>     name your branches the way you name your functions, you should call
>     them something short and sweet and to the point -- What is that branch
>     doing.
> 
> IOW, why did you name the branch "ds/fix" and not "ds/fix-bla"?

Okay I just choosed a bad example. Actually I call it ds/fix-function, but nevertheless more additional description can be useful when dealing with a lot of branches. But yes, there might be porcelains that can do that.

Avery Pennarun· Oct 8, 2008, 23:21 UTC · re: Junio C Hamano · lore

Re: Feature Request: Branch Annotations

On 10/8/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> David Soria Parra <sn_@gmx.net> writes:
>
>  >> Any opinions on this?
>  >
>  > would be great to have something like that build in git-core like
>  >
>  > git branch -i 'Fix bla' ds/fix next
>  > git branch -i
>  >  ds/fix (Fix Bla)
>
> Haven't people watched Linus on google tech talk?  Here is an excerpt from
>  the transcript (http://git.or.cz/gitwiki/LinusTalk200705Transcript):
>
>     ... well actually you shouldn't call it "test", you should basically
>     name your branches the way you name your functions, you should call
>     them something short and sweet and to the point -- What is that branch
>     doing.
>
>  IOW, why did you name the branch "ds/fix" and not "ds/fix-bla"?

Because it would be excessive typing every time you want to do something to that branch?

I guess bash completions would help with this (if you're using bash), but even then it's kind of unreasonable to name branches something like "bug-111234-widget-performance-improvements-for-customer-x", which is the sort of information that would be awfully helpful two months later when you're looking at old unmerged branches.

Avery
Miklos Vajna· Oct 9, 2008, 00:20 UTC · re: Avery Pennarun · lore

Re: Feature Request: Branch Annotations

On Wed, Oct 08, 2008 at 07:21:33PM -0400, Avery Pennarun <apenwarr@gmail.com> wrote:
> I guess bash completions would help with this (if you're using bash),
> but even then it's kind of unreasonable to name branches something
> like "bug-111234-widget-performance-improvements-for-customer-x",
I think you haven't read the links mentioned in the previous mail.

IIRC the thread had a suggestion about creating such a 'desc' branch, then you could just have a branch named 'fix' and you could do git show desc:fix to see its description.

Just use git as a filesystem, as it was originally designed... ;-)
Peter Krefting· Oct 10, 2008, 08:24 UTC · re: Avery Pennarun · lore

Re: Feature Request: Branch Annotations

Avery Pennarun:
Show 5 quoted lines
> I guess bash completions would help with this (if you're using bash),
> but even then it's kind of unreasonable to name branches something
> like "bug-111234-widget-performance-improvements-for-customer-x",
> which is the sort of information that would be awfully helpful two
> months later when you're looking at old unmerged branches.

That's exactly what I do for one of the projects I am working on (well, minus the "bug-" prefix, that's implied). Bash completion works quite well for that, and the merge commits do give meaningful information.

But I would still like to be able to annotate it. Especially for long-living bug-fix branches, it could be useful to be able to add describe a branch with what state it is in, for instance.

-- 
\\// Peter - http://www.softwolves.pp.se/

← back to recent threads