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>
This commit is contained in:

committed by
Junio C Hamano

parent
b9795608c4
commit
e6634ac984
14
perl/Git.pm
14
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user