# FEATURE REQUEST: Comment assignment on branches

13 messages from 2010-03-15 to 2010-03-16. Participants: Maxim Treskin, René Scharfe, Junio C Hamano, Nicolas Sebrecht, Mark Lodato, Miles Bader, Sverre Rabbelier, Matthieu Moy, Nguyen Thai Ngoc Duy.
Thread: https://gitlist.dev/t/23028

## Maxim Treskin, 2010-03-15 08:33

Subject: FEATURE REQUEST: Comment assignment on branches
Message-ID: <be8f531d1003150133n3ea64109u7d573dbd533ffa48@mail.gmail.com>
URL: https://gitlist.dev/e/be8f531d1003150133n3ea64109u7d573dbd533ffa48%40mail.gmail.com

```
Hello

Is it possible to add comments assignment to branches?
Something like:

$ git branch --comment="New branch with implementation of some features" br14

$ git branch
  br14
* master

$ git branch --comments
  br14           (New branch with implementation of some features)
* master

and when configuration variable branch.comments == true, this behavior
is default.

Thank you

-- 
Maxim Treskin

```

## René Scharfe, 2010-03-15 21:10

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <4B9EA22E.1010103@lsrfire.ath.cx>
URL: https://gitlist.dev/e/4B9EA22E.1010103%40lsrfire.ath.cx
In-Reply-To: <be8f531d1003150133n3ea64109u7d573dbd533ffa48@mail.gmail.com>

```
Am 15.03.2010 09:33, schrieb Maxim Treskin:
> Hello
> 
> Is it possible to add comments assignment to branches?
> Something like:
> 
> $ git branch --comment="New branch with implementation of some features" br14
> 
> $ git branch
>   br14
> * master
> 
> $ git branch --comments
>   br14           (New branch with implementation of some features)
> * master
> 
> and when configuration variable branch.comments == true, this behavior
> is default.

Hmm.  You could name your branch
"br14/new-branch-with-implementation-of-some-features" instead of
"br14".  With command line completion you would only have to hit two
extra keys (slash tab) and could enjoy a meaningful branch name everywhere.

René

```

## Junio C Hamano, 2010-03-15 21:32

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <7v3a01jmp9.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v3a01jmp9.fsf%40alter.siamese.dyndns.org
In-Reply-To: <4B9EA22E.1010103@lsrfire.ath.cx>

```
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:

> Am 15.03.2010 09:33, schrieb Maxim Treskin:
>> Hello
>> 
>> Is it possible to add comments assignment to branches?
>> Something like:
>> 
>> $ git branch --comment="New branch with implementation of some features" br14
>> 
>> $ git branch
>>   br14
>> * master
>> 
>> $ git branch --comments
>>   br14           (New branch with implementation of some features)
>> * master
>> 
>> and when configuration variable branch.comments == true, this behavior
>> is default.
>
> Hmm.  You could name your branch
> "br14/new-branch-with-implementation-of-some-features" instead of
> "br14".  With command line completion you would only have to hit two
> extra keys (slash tab) and could enjoy a meaningful branch name everywhere.

Another thing to worry about is how "--comments" and "-v" would interact
with each other.

```

## Nicolas Sebrecht, 2010-03-15 21:32

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <20100315213221.GA12941@vidovic>
URL: https://gitlist.dev/e/20100315213221.GA12941%40vidovic
In-Reply-To: <be8f531d1003150133n3ea64109u7d573dbd533ffa48@mail.gmail.com>

```
The 15/03/10, Maxim Treskin wrote:

> Is it possible to add comments assignment to branches?
> Something like:

Aren't you looking for 'git notes'?

-- 
Nicolas Sebrecht

```

## Junio C Hamano, 2010-03-15 21:34

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <7vhbohi80n.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vhbohi80n.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20100315213221.GA12941@vidovic>

```
Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:

> The 15/03/10, Maxim Treskin wrote:
>
>> Is it possible to add comments assignment to branches?
>> Something like:
>
> Aren't you looking for 'git notes'?

I don't think so.  Notes are fundamentally per-commit.

My understanding is that it is more like:

    [branch "frotz"]
    	comment = "This is to add frotz command to the system"

I do not have a fundamental objection to such a feature, but the
presentation needs to be well thought out.

```

## Mark Lodato, 2010-03-16 00:35

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <ca433831003151735u697c5e3fm431dd98bcf48f7bf@mail.gmail.com>
URL: https://gitlist.dev/e/ca433831003151735u697c5e3fm431dd98bcf48f7bf%40mail.gmail.com
In-Reply-To: <7v3a01jmp9.fsf@alter.siamese.dyndns.org>

```
On Mon, Mar 15, 2010 at 5:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Another thing to worry about is how "--comments" and "-v" would interact
> with each other.

What about putting the comment on the line below, with the same level
of indentation?

  maint    8fcaca3 don't use default revision if a rev was specified
           (preparation for the next maintenance release)
* master   c24138b Merge branch 'sd/format-patch-to'
           (preparation for the next feature release)
  next     0ae494e Merge branch 'pb/log-first-parent-p-m' into next
           (semi-stable test branch for integration into master)

```

## Junio C Hamano, 2010-03-16 01:49

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <7vk4tdxcgt.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vk4tdxcgt.fsf%40alter.siamese.dyndns.org
In-Reply-To: <ca433831003151735u697c5e3fm431dd98bcf48f7bf@mail.gmail.com>

```
Mark Lodato <lodatom@gmail.com> writes:

> On Mon, Mar 15, 2010 at 5:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Another thing to worry about is how "--comments" and "-v" would interact
>> with each other.
>
> What about putting the comment on the line below, with the same level
> of indentation?

That, or in an order that is the other way around.

I think eventually people realize that "branch -v" and "tag -l -n $n" are
similar and start making noises about "branch -v -n $n" to internally run
"log --oneline".  To prepare for such a feature creep, comment first then
commit would probably be a better idea, but I dunno.

```

## Miles Bader, 2010-03-16 04:45

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <buovdcw6fjj.fsf@dhlpc061.dev.necel.com>
URL: https://gitlist.dev/e/buovdcw6fjj.fsf%40dhlpc061.dev.necel.com
In-Reply-To: <7vhbohi80n.fsf@alter.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:
> My understanding is that it is more like:
>
>     [branch "frotz"]
>     	comment = "This is to add frotz command to the system"
>
> I do not have a fundamental objection to such a feature, but the
> presentation needs to be well thought out.

This would seem especially useful for publicly visible branches...

-Miles

-- 
Absurdity, n. A statement or belief manifestly inconsistent with one's own
opinion.

```

## Junio C Hamano, 2010-03-16 06:03

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <7vljdsu7kc.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vljdsu7kc.fsf%40alter.siamese.dyndns.org
In-Reply-To: <buovdcw6fjj.fsf@dhlpc061.dev.necel.com>

```
Miles Bader <miles@gnu.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>> My understanding is that it is more like:
>>
>>     [branch "frotz"]
>>     	comment = "This is to add frotz command to the system"
>>
>> I do not have a fundamental objection to such a feature, but the
>> presentation needs to be well thought out.
>
> This would seem especially useful for publicly visible branches...

If you mean by "publicly visible" branches in public repositories, I
suspect not.  At places like repo.or.cz, github, or installations managed
by gitosis, you typically do not have direct access to $GIT_DIR/config
files (they belong to site administrators) in your repositories, and that
is not likely to change for security reasons.

```

## Miles Bader, 2010-03-16 06:20

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <fc339e4a1003152320i12a7d4b2p711f6b5d0eda9bcd@mail.gmail.com>
URL: https://gitlist.dev/e/fc339e4a1003152320i12a7d4b2p711f6b5d0eda9bcd%40mail.gmail.com
In-Reply-To: <7vljdsu7kc.fsf@alter.siamese.dyndns.org>

```
On Tue, Mar 16, 2010 at 3:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> This would seem especially useful for publicly visible branches...
>
> If you mean by "publicly visible" branches in public repositories, I
> suspect not.  At places like repo.or.cz, github, or installations managed
> by gitosis, you typically do not have direct access to $GIT_DIR/config
> files (they belong to site administrators) in your repositories, and that
> is not likely to change for security reasons.

Hm, ok you're right... which is a shame... :(

'cause a "pushable branch description" would be ace!

[I take it git has no "limited remote metadata change" function...?]

-Miles

-- 
Do not taunt Happy Fun Ball.

```

## Sverre Rabbelier, 2010-03-16 06:26

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <fabb9a1e1003152326m4d67f48bkc207ba7368cb54e4@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e1003152326m4d67f48bkc207ba7368cb54e4%40mail.gmail.com
In-Reply-To: <fc339e4a1003152320i12a7d4b2p711f6b5d0eda9bcd@mail.gmail.com>

```
Heya,

On Tue, Mar 16, 2010 at 07:20, Miles Bader <miles@gnu.org> wrote:
> On Tue, Mar 16, 2010 at 3:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> If you mean by "publicly visible" branches in public repositories, I
>> suspect not.  At places like repo.or.cz, github, or installations managed
>> by gitosis, you typically do not have direct access to $GIT_DIR/config
>> files (they belong to site administrators) in your repositories, and that
>> is not likely to change for security reasons.
>
> Hm, ok you're right... which is a shame... :(

Which is also why I think it would be nice if we could teach notes to
annotate branches/tags/the whole shaboodle. I really think that a
generic way to annotate something under /refs/ would be useful.

-- 
Cheers,

Sverre Rabbelier

```

## Matthieu Moy, 2010-03-16 07:33

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <vpq4okgd8kp.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpq4okgd8kp.fsf%40bauges.imag.fr
In-Reply-To: <fabb9a1e1003152326m4d67f48bkc207ba7368cb54e4@mail.gmail.com>

```
Sverre Rabbelier <srabbelier@gmail.com> writes:

> Which is also why I think it would be nice if we could teach notes to
> annotate branches/tags/the whole shaboodle. I really think that a
> generic way to annotate something under /refs/ would be useful.

meetoo.

Today, we have .git/description which is used by gitweb (and others?)
to say what the repository contains. That would be nice to have the
same thing for branches. Take
http://git.kernel.org/?p=git/git.git;a=summary for example: commits
have a comment, tag have a comment, and branches just say:

10 hours ago 	man 	shortlog | log | tree
10 hours ago 	html 	shortlog | log | tree
22 hours ago 	pu 	shortlog | log | tree
22 hours ago 	next 	shortlog | log | tree
23 hours ago 	master 	shortlog | log | tree
2 days ago 	maint 	shortlog | log | tree
5 days ago 	todo 	shortlog | log | tree

A newbie will have a hard time understanding what "pu" means, while a
one-liner saying (proposed update, may be rewound at any time) would
give most of the required information. Actually, ideally, this could
be a message like commit message (i.e. one-liner, blank line, and
body).

(My 2 cents)

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Nguyen Thai Ngoc Duy, 2010-03-16 14:36

Subject: Re: FEATURE REQUEST: Comment assignment on branches
Message-ID: <fcaeb9bf1003160736w7749f358p6ee8f86e6c3a32c6@mail.gmail.com>
URL: https://gitlist.dev/e/fcaeb9bf1003160736w7749f358p6ee8f86e6c3a32c6%40mail.gmail.com
In-Reply-To: <4B9EA22E.1010103@lsrfire.ath.cx>

```
On 3/16/10, René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:
> Am 15.03.2010 09:33, schrieb Maxim Treskin:
>
> > Hello
>  >
>  > Is it possible to add comments assignment to branches?
>  > Something like:
>  >
>  > $ git branch --comment="New branch with implementation of some features" br14
>  >
>  > $ git branch
>  >   br14
>  > * master
>  >
>  > $ git branch --comments
>  >   br14           (New branch with implementation of some features)
>  > * master
>  >
>  > and when configuration variable branch.comments == true, this behavior
>  > is default.
>
>
> Hmm.  You could name your branch
>  "br14/new-branch-with-implementation-of-some-features" instead of
>  "br14".  With command line completion you would only have to hit two
>  extra keys (slash tab) and could enjoy a meaningful branch name everywhere.

If only completion works across shells. Another idea: put notes in a
blob, tagged with "notes/branchname" or another convention.

Then if you want to see description of branch "br14", do "git show
notes/br14". Teaching "git branch" to show it is easy.
-- 
Duy

```
