Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2006-07-02 03:38:56 +0400
committerJunio C Hamano <junkio@cox.net>2006-07-03 04:14:44 +0400
commite6634ac9841f8df3ce1c0c461c677faf2d59af3e (patch)
tree21037803f265201bc6e64b49a05e2821847fea88 /perl/Git.pm
parentb9795608c4d82ba119d78980b479d78bdfe753b6 (diff)
Git.pm: Remove PerlIO usage from Git.xs
PerlIO_*() is not portable before 5.7.3, according to ppport.h, and it's more clear what is going on when we do it in the Perl part of the Git module anyway. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'perl/Git.pm')
-rw-r--r--perl/Git.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 0581447757..b4ee88bdfd 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -511,7 +511,19 @@ are involved.
=cut
-# Implemented in Git.xs.
+sub hash_object {
+ my ($self, $type, $file) = _maybe_self(@_);
+
+ # hash_object_* implemented in Git.xs.
+
+ if (ref($file) eq 'GLOB') {
+ my $hash = hash_object_pipe($type, fileno($file));
+ close $file;
+ return $hash;
+ } else {
+ hash_object_file($type, $file);
+ }
+}