* [PATCH] Git.pm: release hash and blob handles
@ 2008-10-11 19:29 Ray Chuan
2008-10-11 21:23 ` Petr Baudis
0 siblings, 1 reply; 2+ messages in thread
From: Ray Chuan @ 2008-10-11 19:29 UTC (permalink / raw)
To: git
the methods
* hash_and_insert_object
* cat_blob
use bidirectional pipes to pull/push data from the various git
utilities, but they don't close them after this is complete. this
denies Git's subsequent attempts to use these resources, leading to
failure.
a simple, reproducible test case can be seen at
http://rctay.spaces.live.com/blog/cns!59D3BFCD027B09E5!792.entry.
Signed-off-by: Tay Ray Chuan <rctay89 <at> gmail.com>
---
perl/Git.pm | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index 6aab712..7e17f38 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -821,6 +821,7 @@ sub hash_and_insert_object {
throw Error::Simple("in pipe went bad");
}
+ $self->_close_hash_and_insert_object();
return $hash;
}
@@ -910,6 +911,7 @@ sub cat_blob {
throw Error::Simple("couldn't write to passed in filehandle");
}
+ $self->_close_cat_blob();
return $size;
}
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Git.pm: release hash and blob handles
2008-10-11 19:29 [PATCH] Git.pm: release hash and blob handles Ray Chuan
@ 2008-10-11 21:23 ` Petr Baudis
0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2008-10-11 21:23 UTC (permalink / raw)
To: Ray Chuan; +Cc: git
On Sun, Oct 12, 2008 at 03:29:28AM +0800, Ray Chuan wrote:
> the methods
>
> * hash_and_insert_object
> * cat_blob
>
> use bidirectional pipes to pull/push data from the various git
> utilities, but they don't close them after this is complete. this
> denies Git's subsequent attempts to use these resources, leading to
> failure.
>
> a simple, reproducible test case can be seen at
> http://rctay.spaces.live.com/blog/cns!59D3BFCD027B09E5!792.entry.
Hmm, I don't understand why git-svn does not work for you, but this
patch is not correct. The whole point of the infrastructure is to leave
the pipes open so that subsequent calls _reuse_ these pipes. This leads
to substantial speedup as you do not need to re-fork git all the time.
--
Petr "Pasky" Baudis
People who take cold baths never have rheumatism, but they have
cold baths.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-11 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11 19:29 [PATCH] Git.pm: release hash and blob handles Ray Chuan
2008-10-11 21:23 ` Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox