From: Jakub Narebski <jnareb@gmail.com>
To: "Sverre Rabbelier" <sverre@rabbelier.nl>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: Porcelain/Plumbing
Date: Wed, 11 Jun 2008 13:42:37 -0700 (PDT) [thread overview]
Message-ID: <m3zlprr9fu.fsf@localhost.localdomain> (raw)
In-Reply-To: <bd6139dc0806111250y53cfbdbdj9f00e38bf6e1c912@mail.gmail.com>
"Sverre Rabbelier" <alturin@gmail.com> writes:
> During my efforts gsoc efforts, I stumbled across (or actually, was
> pointed at) 'git branch --contains' to list only branches that contain
> a specific commit. The problem here is that 'git branch' is listed as
> porcelain, and that there seems to be no plumbing equivalent of this
> feature.
I think there isn't. If there were, its place probably would be
either in git-show-ref, or in git-for-each-ref, or in both.
> I have the same problem with 'git log -S', although 'git log'
> is pretty sturdy output wise (if you specify the output with
> '--pretty=format:' that is), the idea is the same.
log = rev-list + diff-tree. The -S (aka. pickaxe) option is option to
git-diff-tree (and friends). You would have to pipe output of
rev-list to diff-tree (via --stdin) to use -S in porcelain.
> My question is, is it intentional that there is no plumbing equivalent
> forsome functionality, and, in such cases, is it 'ok' to use the
> porcelain from a script? (I think it is not.) I've been recommended to
> stick with the plumbing as much as possible from my code, but with the
> above two cases I've been unsure on what to do.
> What is the advised course of action here?
I think using git-log from scripts is O.K., for example qgit uses
git-log to parse revisions, and IIRC it was recommended on git mailing
list to do that (IIRC it was around adding --encoding=<encoding> and
logOutputEncoding to git).
git-branch I think is too much a porcelain...
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2008-06-11 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 19:50 Porcelain/Plumbing Sverre Rabbelier
2008-06-11 20:42 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3zlprr9fu.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sverre@rabbelier.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.