{"thread":{"id":"13901","subject":"Porcelain/Plumbing","startedAt":"2008-06-11T19:50:24Z","lastAt":"2008-06-11T20:42:37Z","messageCount":2,"participants":["Sverre Rabbelier","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"79488","messageId":"bd6139dc0806111250y53cfbdbdj9f00e38bf6e1c912@mail.gmail.com","threadId":"13901","inReplyTo":null,"subject":"Porcelain/Plumbing","fromName":"Sverre Rabbelier","fromEmail":"alturin@gmail.com","sentAt":"2008-06-11T19:50:24Z","receivedAt":"2008-06-11T19:50:24Z","isPatch":false,"sender":{"key":"alturin@gmail.com","avatar":null},"body":"Heya,\n\nDuring my efforts gsoc efforts, I stumbled across (or actually, was\npointed at) 'git branch --contains' to list only branches that contain\na specific commit. The problem here is that 'git branch' is listed as\nporcelain, and that there seems to be no plumbing equivalent of this\nfeature. I have the same problem with 'git log -S', although 'git log'\nis pretty sturdy output wise (if you specify the output with\n'--pretty=format:' that is), the idea is the same.\nMy question is, is it intentional that there is no plumbing equivalent\nforsome functionality, and, in such cases, is it 'ok' to use the\nporcelain from a script? (I think it is not.) I've been recommended to\nstick with the plumbing as much as possible from my code, but with the\nabove two cases I've been unsure on what to do.\nWhat is the advised course of action here?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"79490","messageId":"m3zlprr9fu.fsf@localhost.localdomain","threadId":"13901","inReplyTo":"bd6139dc0806111250y53cfbdbdj9f00e38bf6e1c912@mail.gmail.com","subject":"Re: Porcelain/Plumbing","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-11T20:42:37Z","receivedAt":"2008-06-11T20:42:37Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Sverre Rabbelier\" <alturin@gmail.com> writes:\n\n> During my efforts gsoc efforts, I stumbled across (or actually, was\n> pointed at) 'git branch --contains' to list only branches that contain\n> a specific commit. The problem here is that 'git branch' is listed as\n> porcelain, and that there seems to be no plumbing equivalent of this\n> feature. \n\nI think there isn't.  If there were, its place probably would be\neither in git-show-ref, or in git-for-each-ref, or in both.\n\n> I have the same problem with 'git log -S', although 'git log'\n> is pretty sturdy output wise (if you specify the output with\n> '--pretty=format:' that is), the idea is the same.\n\nlog = rev-list + diff-tree.  The -S (aka. pickaxe) option is option to\ngit-diff-tree (and friends).  You would have to pipe output of\nrev-list to diff-tree (via --stdin) to use -S in porcelain.\n\n> My question is, is it intentional that there is no plumbing equivalent\n> forsome functionality, and, in such cases, is it 'ok' to use the\n> porcelain from a script? (I think it is not.) I've been recommended to\n> stick with the plumbing as much as possible from my code, but with the\n> above two cases I've been unsure on what to do.\n> What is the advised course of action here?\n\nI think using git-log from scripts is O.K., for example qgit uses\ngit-log to parse revisions, and IIRC it was recommended on git mailing\nlist to do that (IIRC it was around adding --encoding=<encoding> and\nlogOutputEncoding to git).\n\ngit-branch I think is too much a porcelain...\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}