{"thread":{"id":"35401","subject":"branch annotations?","startedAt":"2013-11-25T14:46:44Z","lastAt":"2013-11-25T18:29:56Z","messageCount":5,"participants":["Tim Chase","Johan Herland","Jeff King","Ramkumar Ramachandra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"231065","messageId":"20131125084644.350bd4f7@bigbox.christie.dr","threadId":"35401","inReplyTo":null,"subject":"branch annotations?","fromName":"Tim Chase","fromEmail":"git@tim.thechases.com","sentAt":"2013-11-25T14:46:44Z","receivedAt":"2013-11-25T14:46:44Z","isPatch":false,"sender":{"key":"git@tim.thechases.com","avatar":null},"body":"Is there any way to associate some sort of note with a branch that\nwould be shown when listing them?  While I currently have things like\n\"issue/QA-42\", it would be nice to have a note associated with it so\nI could do something like\n\n  $ git branch --show-notes\n    issue/CR-88: make sure NoSQL engines support .CSV file backends\n    issue/QA-31: add missile launch codes\n  * issue/QA-42: support flying cars\n    master\n\nas I currently need to flip back and forth between my git/terminal\nand my issue-tracker to know that, if I need to be adding missile\nlaunch codes, I need to be working on QA-31.  I know there are \"note\"\nfeatures elsewhere for commits, and I know that git-branch supports\nshowing the most recent commit (that's not always enough info to\ndiscern the branch's purpose).\n\nThanks for any ideas on how to ease this pain-point, :-)\n\n-tkc\n"},{"id":"231067","messageId":"CALKQrgdTxYmy2ncXNB29B0-05g8CK=-jxWfDVPbUjHTPsm1yOw@mail.gmail.com","threadId":"35401","inReplyTo":"20131125084644.350bd4f7@bigbox.christie.dr","subject":"Re: branch annotations?","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2013-11-25T14:55:29Z","receivedAt":"2013-11-25T14:55:29Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Mon, Nov 25, 2013 at 3:46 PM, Tim Chase <git@tim.thechases.com> wrote:\n> Is there any way to associate some sort of note with a branch that\n> would be shown when listing them?  While I currently have things like\n> \"issue/QA-42\", it would be nice to have a note associated with it so\n> I could do something like\n>\n>   $ git branch --show-notes\n>     issue/CR-88: make sure NoSQL engines support .CSV file backends\n>     issue/QA-31: add missile launch codes\n>   * issue/QA-42: support flying cars\n>     master\n>\n> as I currently need to flip back and forth between my git/terminal\n> and my issue-tracker to know that, if I need to be adding missile\n> launch codes, I need to be working on QA-31.  I know there are \"note\"\n> features elsewhere for commits, and I know that git-branch supports\n> showing the most recent commit (that's not always enough info to\n> discern the branch's purpose).\n>\n> Thanks for any ideas on how to ease this pain-point, :-)\n\n\"git branch --edit-description\" allows you to write a descriptive\nstring for your branch. AFAICS, however, it currently only shows up\nwhen using request-pull. It does not show up in any git branch\ncommand. IMHO that should be fixed.\n\nAs a workaround, you can use this one-liner:\n\n  git for-each-ref --format \"%(refname:short)\" refs/heads/ | while\nread branch; do echo \"$branch - $(git config\nbranch.$branch.description)\"; done\n\nI guess that could even be turned into an alias...\n\n\nHope this helps,\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"231068","messageId":"20131125145644.GB23802@sigill.intra.peff.net","threadId":"35401","inReplyTo":"20131125084644.350bd4f7@bigbox.christie.dr","subject":"Re: branch annotations?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-11-25T14:56:44Z","receivedAt":"2013-11-25T14:56:44Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 25, 2013 at 08:46:44AM -0600, Tim Chase wrote:\n\n> Is there any way to associate some sort of note with a branch that\n> would be shown when listing them?  While I currently have things like\n> \"issue/QA-42\", it would be nice to have a note associated with it so\n> I could do something like\n> \n>   $ git branch --show-notes\n>     issue/CR-88: make sure NoSQL engines support .CSV file backends\n>     issue/QA-31: add missile launch codes\n>   * issue/QA-42: support flying cars\n>     master\n\nThere is a \"branch description\" config entry that you can edit with \"git\nbranch --edit-description\" (or by simply tweaking the config file\nyourself). However, it is currently only used by git-request-pull when\ngenerating the request.\n\nI think it makes sense to be able to show it as part of \"git branch\",\nbut the verbose branch listing there is a bit of a mess. Doing it\ncleanly would probably involve refactoring the branch-display code to\nallow users to specify more flexible formats.\n\nRamkumar (cc'd) was looking into that refactoring a while back, but I\ndid not follow it closely (it looks like some of the underlying\nfor-each-ref refactoring is on the 'next' branch?).\n\n-Peff\n"},{"id":"231070","messageId":"20131125090845.24ed43e3@bigbox.christie.dr","threadId":"35401","inReplyTo":"CALKQrgdTxYmy2ncXNB29B0-05g8CK=-jxWfDVPbUjHTPsm1yOw@mail.gmail.com","subject":"Re: branch annotations?","fromName":"Tim Chase","fromEmail":"git@tim.thechases.com","sentAt":"2013-11-25T15:08:45Z","receivedAt":"2013-11-25T15:08:45Z","isPatch":false,"sender":{"key":"git@tim.thechases.com","avatar":null},"body":"On 2013-11-25 15:55, Johan Herland wrote:\n> \"git branch --edit-description\" allows you to write a descriptive\n> string for your branch. AFAICS, however, it currently only shows up\n> when using request-pull. It does not show up in any git branch\n> command. IMHO that should be fixed.\n> \n> As a workaround, you can use this one-liner:\n> \n>   git for-each-ref --format \"%(refname:short)\" refs/heads/ | while\n> read branch; do echo \"$branch - $(git config\n> branch.$branch.description)\"; done\n\nThat works like a charm.  Thanks!\n\n-tkc\n"},{"id":"231080","messageId":"CALkWK0nfSMSOnEXxoRfvvorrc-goDJFbbgcQDm1gKwiZEKQTuQ@mail.gmail.com","threadId":"35401","inReplyTo":"20131125145644.GB23802@sigill.intra.peff.net","subject":"Re: branch annotations?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-11-25T18:29:56Z","receivedAt":"2013-11-25T18:29:56Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jeff King wrote:\n> I think it makes sense to be able to show it as part of \"git branch\",\n> but the verbose branch listing there is a bit of a mess. Doing it\n> cleanly would probably involve refactoring the branch-display code to\n> allow users to specify more flexible formats.\n\nCertainly. I'm quite unhappy with the current 'git branch', and am\nlooking to improve it. Branch descriptions will definitely be useful\nto display as well.\n\n> Ramkumar (cc'd) was looking into that refactoring a while back, but I\n> did not follow it closely (it looks like some of the underlying\n> for-each-ref refactoring is on the 'next' branch?).\n\nThe previous effort in collaboration with Duy fell apart,\nunfortunately. Currently, there are a few small patches enhancing\nf-e-r from the original series in 'next'. Once they graduate, the plan\nis to refactor f-e-r a bit so that 'git branch' can slowly be moved\ninto using its machinery.\n"}]}