{"thread":{"id":"23273","subject":"git branch -a prefixes origin/ branches with remotes/","startedAt":"2010-03-31T17:26:27Z","lastAt":"2010-04-01T09:17:40Z","messageCount":7,"participants":["layer","Jakub Narebski","Jay Soffian","Jeff King","Andreas Schwab","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138297","messageId":"18137.1270056387@relay.known.net","threadId":"23273","inReplyTo":null,"subject":"git branch -a prefixes origin/ branches with remotes/","fromName":"layer","fromEmail":"layer@known.net","sentAt":"2010-03-31T17:26:27Z","receivedAt":"2010-03-31T17:26:27Z","isPatch":false,"sender":{"key":"layer@known.net","avatar":null},"body":"In git 1.6.6.1 & 1.6.3.3, \"git branch -a\" output is like this\n\n* master\n  remotes/origin/foo\n  ...\n\ninstead of like this for 1.6.1.3\n\n* master\n  origin/foo\n  ...\n\n\nIs this a feature or bug?  I searched the mailing list archives and\nannouncements couldn't find any reference to this change.\n\nThis is important to me because I use the output of \"git branch -a\" in\nscripts.\n\nThanks.\n\nKevin\n"},{"id":"138301","messageId":"m3aatoidl9.fsf@localhost.localdomain","threadId":"23273","inReplyTo":"18137.1270056387@relay.known.net","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-03-31T17:52:34Z","receivedAt":"2010-03-31T17:52:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"layer <layer@known.net> writes:\n\n> In git 1.6.6.1 & 1.6.3.3, \"git branch -a\" output is like this\n> \n> * master\n>   remotes/origin/foo\n>   ...\n> \n> instead of like this for 1.6.1.3\n> \n> * master\n>   origin/foo\n>   ...\n> \n> \n> Is this a feature or bug?  I searched the mailing list archives and\n> announcements couldn't find any reference to this change.\n> \n> This is important to me because I use the output of \"git branch -a\" in\n> scripts.\n\nDon't use git-branch output in scripts; git-branch is porcelain and\nits output is meant for end user and is subject to change!  Use either\ngit-show-ref, or powerfull git-for-each-ref.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"138305","messageId":"k2r76718491003311459u4bbaeb4ax5b2e550acdd14c88@mail.gmail.com","threadId":"23273","inReplyTo":"18137.1270056387@relay.known.net","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-03-31T21:59:49Z","receivedAt":"2010-03-31T21:59:49Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Wed, Mar 31, 2010 at 1:26 PM, layer <layer@known.net> wrote:\n> In git 1.6.6.1 & 1.6.3.3, \"git branch -a\" output is like this\n>\n> * master\n>  remotes/origin/foo\n>  ...\n>\n> instead of like this for 1.6.1.3\n>\n> * master\n>  origin/foo\n>  ...\n>\n> Is this a feature or bug?  I searched the mailing list archives and\n> announcements couldn't find any reference to this change.\n\nFeature. Introduced in 1.6.3:\n\nhttp://article.gmane.org/gmane.comp.version-control.git/116404\n\nSee \"builtin-branch: improve output when displaying remote branches\"\n\n> This is important to me because I use the output of \"git branch -a\" in\n> scripts.\n>\n> I should add that the scripts are merely testing for the existence of\n> remote tracking branches in the local repo.  If there's a better way\n> to do this, I'm game.  Thanks.\n\ngit branch is a so-called porcelain command, and as you've now been\nbitten by, the output of porcelain's is subject to change.\n\nYou probably want git for-each-ref.\n\nAside, the only list of plumbing vs porcelain commands I'm aware of is\nin the bash-completion script under contrib. See\n__git_list_porcelain_commands here:\n\nhttp://git.kernel.org/?p=git/git.git;a=blob;f=contrib/completion/git-completion.bash\n\nThose are generally commands whose output you do not want to be\nparsing. All the other git commands installed under git-core are\nmostly plumbing upon which you can build additional functionality.\n\n(Note to git list: there should be a man page that has a single-line\nsummary of each command and states whether the command is plumbing or\nporcelain. Maybe there is and I just don't know it.)\n\nj.\n"},{"id":"138307","messageId":"20100331220340.GA4564@coredump.intra.peff.net","threadId":"23273","inReplyTo":"k2r76718491003311459u4bbaeb4ax5b2e550acdd14c88@mail.gmail.com","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-03-31T22:03:40Z","receivedAt":"2010-03-31T22:03:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 31, 2010 at 05:59:49PM -0400, Jay Soffian wrote:\n\n> Aside, the only list of plumbing vs porcelain commands I'm aware of is\n> in the bash-completion script under contrib. See\n> __git_list_porcelain_commands here:\n> \n> http://git.kernel.org/?p=git/git.git;a=blob;f=contrib/completion/git-completion.bash\n\nTry command-list.txt, which is meant to be authoritative.\n\n> (Note to git list: there should be a man page that has a single-line\n> summary of each command and states whether the command is plumbing or\n> porcelain. Maybe there is and I just don't know it.)\n\nTry \"man git\", which splits the command list by porcelain and plumbing\n(and further by subcategory).\n\n-Peff\n"},{"id":"138308","messageId":"m2iq8c2ln9.fsf@igel.home","threadId":"23273","inReplyTo":"k2r76718491003311459u4bbaeb4ax5b2e550acdd14c88@mail.gmail.com","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-03-31T22:04:26Z","receivedAt":"2010-03-31T22:04:26Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Jay Soffian <jaysoffian@gmail.com> writes:\n\n> (Note to git list: there should be a man page that has a single-line\n> summary of each command and states whether the command is plumbing or\n> porcelain. Maybe there is and I just don't know it.)\n\ngit(1)\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"138309","messageId":"q2y76718491003311509z9c2f83c2t4a217f7c68b4ff4f@mail.gmail.com","threadId":"23273","inReplyTo":"m2iq8c2ln9.fsf@igel.home","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-03-31T22:09:51Z","receivedAt":"2010-03-31T22:09:51Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Wed, Mar 31, 2010 at 6:04 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> Jay Soffian <jaysoffian@gmail.com> writes:\n>\n>> (Note to git list: there should be a man page that has a single-line\n>> summary of each command and states whether the command is plumbing or\n>> porcelain. Maybe there is and I just don't know it.)\n>\n> git(1)\n\nYes, I'm an idiot. Anyone else wanna pile on? :-)\n\nj.\n"},{"id":"138335","messageId":"4BB464B4.1080109@drmicha.warpmail.net","threadId":"23273","inReplyTo":"q2y76718491003311509z9c2f83c2t4a217f7c68b4ff4f@mail.gmail.com","subject":"Re: git branch -a prefixes origin/ branches with remotes/","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-04-01T09:17:40Z","receivedAt":"2010-04-01T09:17:40Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jay Soffian venit, vidit, dixit 01.04.2010 00:09:\n> On Wed, Mar 31, 2010 at 6:04 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n>> Jay Soffian <jaysoffian@gmail.com> writes:\n>>\n>>> (Note to git list: there should be a man page that has a single-line\n>>> summary of each command and states whether the command is plumbing or\n>>> porcelain. Maybe there is and I just don't know it.)\n>>\n>> git(1)\n> \n> Yes, I'm an idiot. Anyone else wanna pile on? :-)\n\nJust blame it on April fool's day, you fooled everyone who took your\nremark seriously ;)\n\nMichael\n"}]}