Merge branch 'svn-maint-fixes' into svn-fixes

* svn-maint-fixes:
  Git::SVN::*: avoid premature FileHandle closure
  git-svn: fix localtime=true on non-glibc environments
This commit is contained in:
Junio C Hamano
2015-02-26 14:03:57 -08:00
3 changed files with 13 additions and 1 deletions

View File

@ -321,6 +321,14 @@ sub apply_textdelta {
# (but $base does not,) so dup() it for reading in close_file
open my $dup, '<&', $fh or croak $!;
my $base = $::_repository->temp_acquire("git_blob_${$}_$suffix");
# close_file may call temp_acquire on 'svn_hash', but because of the
# call chain, if the temp_acquire call from close_file ends up being the
# call that first creates the 'svn_hash' temp file, then the FileHandle
# that's created as a result will end up in an SVN::Pool that we clear
# in SVN::Ra::gs_fetch_loop_common. Avoid that by making sure the
# 'svn_hash' FileHandle is already created before close_file is called.
my $tmp_fh = $::_repository->temp_acquire('svn_hash');
$::_repository->temp_release($tmp_fh, 1);
if ($fb->{blob}) {
my ($base_is_link, $size);