threads / discuss / 23028

FEATURE REQUEST: Comment assignment on branches

Subject: FEATURE REQUEST: Comment assignment on branches

## tl;dr

13 messages between Mar 15, 2010 and Mar 16, 2010.

replies: 12people: 9as markdown or json

Maxim Treskin· Mar 15, 2010, 08:33 UTC · lore
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· Mar 15, 2010, 21:10 UTC · re: Maxim Treskin · lore

Re: FEATURE REQUEST: Comment assignment on branches

Am 15.03.2010 09:33, schrieb Maxim Treskin:
Show 17 quoted lines
> 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· Mar 15, 2010, 21:32 UTC · re: René Scharfe · lore

Re: FEATURE REQUEST: Comment assignment on branches

René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 23 quoted lines
> 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.

Mark Lodato· Mar 16, 2010, 00:35 UTC · re: Junio C Hamano · lore

Re: FEATURE REQUEST: Comment assignment on branches

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· Mar 16, 2010, 01:49 UTC · re: Mark Lodato · lore

Re: FEATURE REQUEST: Comment assignment on branches

Mark Lodato <lodatom@gmail.com> writes:
Show 7 quoted lines
> 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.

Nguyen Thai Ngoc Duy· Mar 16, 2010, 14:36 UTC · re: René Scharfe · lore

Re: FEATURE REQUEST: Comment assignment on branches

On 3/16/10, René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:
Show 25 quoted lines
> 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
Junio C Hamano· Mar 15, 2010, 21:34 UTC · re: Nicolas Sebrecht · lore

Re: FEATURE REQUEST: Comment assignment on branches

Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:
Show 6 quoted lines
> 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.

Miles Bader· Mar 16, 2010, 04:45 UTC · re: Junio C Hamano · lore

Re: FEATURE REQUEST: Comment assignment on branches

Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> 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· Mar 16, 2010, 06:03 UTC · re: Miles Bader · lore

Re: FEATURE REQUEST: Comment assignment on branches

Miles Bader <miles@gnu.org> writes:
Show 10 quoted lines
> 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· Mar 16, 2010, 06:20 UTC · re: Junio C Hamano · lore

Re: FEATURE REQUEST: Comment assignment on branches

On Tue, Mar 16, 2010 at 3:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>> 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· Mar 16, 2010, 06:26 UTC · re: Miles Bader · lore

Re: FEATURE REQUEST: Comment assignment on branches

Heya,
On Tue, Mar 16, 2010 at 07:20, Miles Bader <miles@gnu.org> wrote:
Show 8 quoted lines
> 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· Mar 16, 2010, 07:33 UTC · re: Sverre Rabbelier · lore

Re: FEATURE REQUEST: Comment assignment on branches

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/

← back to recent threads