git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Git.pm: release hash and blob handles

From
Ray Chuan <rctay89@gmail.com>
Date
Oct 11, 2008, 19:29 UTC
Message-ID
<be6fef0d0810111229u60c28671w1afd952200c6fa23@mail.gmail.com>
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
Next: Petr Baudis
Message 1 of 2 in “Git.pm: release hash and blob handles”
  1. Git.pm: release hash and blob handlesRay Chuan, Oct 11, 2008
  2. Petr BaudisOct 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.