{"thread":{"id":"39924","subject":"git branch -v output ambiguous for parser","startedAt":"2015-07-23T13:29:53Z","lastAt":"2015-07-23T13:44:34Z","messageCount":2,"participants":["Thibault Kruse","Dennis Kaarsemaker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"266656","messageId":"CAByu6UVzsoK=OHkYv_zBCYf2YnBqx268TZ+_pi98N6pMt_NSgw@mail.gmail.com","threadId":"39924","inReplyTo":null,"subject":"git branch -v output ambiguous for parser","fromName":"Thibault Kruse","fromEmail":"tibokruse@googlemail.com","sentAt":"2015-07-23T13:29:53Z","receivedAt":"2015-07-23T13:29:53Z","isPatch":false,"sender":{"key":"tibokruse@googlemail.com","avatar":"https://gravatar.com/avatar/68c46b980bae1554690b4e334db8e5102b7fc25afae6bba2fdf48ce1243cc0c6?d=mp&s=160"},"body":"Hi,\n\ntrying to write a git wrapper, I wanted to parse the output of git branch -v\n\nHowever, I realized that the output prints the last commit message at\nthe end of the line, without any disambigution char, or hyphens.\nThis makes it possible to have these outputs:\n\n  foo                 6d29736 [foo/bar] test123\n  master              9726de6 [ahead 2, behind 2] line 1 line 2 line 3\n\nwhere foo is a branch that does not track another branch, and the last\ncommit message on branch foo is '[foo/bar] test123'.\nThe opening brackets '[' are even aligned in the output, making that\ndistinction also difficult for the human eye.\n\nSo as a small improvement I would suggest some separating char or\nhyphens around the commit message, e.g.:\n\n  foo                 6d29736 '[foo/bar] test123'\n  foo                 6d29736 | [foo/bar] test123\n\nregards,\n  Thibault Kruse\n"},{"id":"266657","messageId":"1437659074.25048.11.camel@kaarsemaker.net","threadId":"39924","inReplyTo":"CAByu6UVzsoK=OHkYv_zBCYf2YnBqx268TZ+_pi98N6pMt_NSgw@mail.gmail.com","subject":"Re: git branch -v output ambiguous for parser","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2015-07-23T13:44:34Z","receivedAt":"2015-07-23T13:44:34Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On do, 2015-07-23 at 15:29 +0200, Thibault Kruse wrote:\n> Hi,\n> \n> trying to write a git wrapper, I wanted to parse the output of git branch -v\n\nThe output of git branch is not meant to be machine-parsed. Try using\ngit for-each-ref :)\n-- \nDennis Kaarsemaker\nhttp://www.kaarsemaker.net\n"}]}