From: Christian Jaeger <christian@jaeger.mine.nu>
To: "Philippe Bruhat (BooK)" <philippe.bruhat@free.fr>
Cc: git@vger.kernel.org
Subject: Re: Problem with Git.pm bidi_pipe methods
Date: Tue, 28 Oct 2008 10:12:44 +0100 [thread overview]
Message-ID: <4906D78C.4030409@jaeger.mine.nu> (raw)
In-Reply-To: <20081024001446.GE17717@plop>
Philippe Bruhat (BooK) wrote:
> Hi,
>
> To be able to call commit-tree from a Perl program, I had to use
> command_bidi_pipe() to pass the message on standard input, and get the
> new commit id on standard output. The only problem I have is that the
> method doesn't work (or at least, doesn't work like the other
> command_... methods).
Not really an answer on how to fix Git.pm, but: you may want to subclass
Git.pm and add your own methods ad interim. See the thread "[PATCH]
Git.pm: do not break inheritance" [1] about how to subclass (I see that
this patch is actually in {next,pu} already, and anyway you can use the
runtime patching approach I described there).
That approach of using subclasses has two benefits: (a) it will tend to
make your code work with various versions of Git (i.e. one without a
fixed command_bidi_pipe method), and (b) you will be much more free to
extend the code. The drawback will be of course that your inventions
won't necessarily make it back to Git.pm, but I'm tempted to think that
some innovation taking place before settling on what should make it back
to Git.pm (or, if incompatible, possibly a new Git.pm) would be worthwhile.
For an actual example in writing Git subclasses see "[ANNOUNCE] intergit
repository-linking tool (early release)" [2].
Christian.
[1] http://article.gmane.org/gmane.comp.version-control.git/98568
[2] http://article.gmane.org/gmane.comp.version-control.git/99197
next prev parent reply other threads:[~2008-10-28 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 0:14 Problem with Git.pm bidi_pipe methods Philippe Bruhat (BooK)
2008-10-28 9:12 ` Christian Jaeger [this message]
2008-11-23 19:03 ` nadim khemir
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=4906D78C.4030409@jaeger.mine.nu \
--to=christian@jaeger.mine.nu \
--cc=git@vger.kernel.org \
--cc=philippe.bruhat@free.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).