From: Junio C Hamano Date: Thu, 5 Mar 2015 20:45:45 +0000 (-0800) Subject: Merge branch 'ew/svn-maint-fixes' X-Git-Tag: v2.4.0-rc0~67 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a6f9decbe30318a0fdc4c7cad61e5e20b344d0d4?ds=inline;hp=-c Merge branch 'ew/svn-maint-fixes' Correct a breakage to git-svn around v2.2 era that triggers premature closing of FileHandle. * ew/svn-maint-fixes: Git::SVN::*: avoid premature FileHandle closure git-svn: fix localtime=true on non-glibc environments --- a6f9decbe30318a0fdc4c7cad61e5e20b344d0d4 diff --combined perl/Git/SVN.pm index 8e4af7153e,7006219c0a..f24372645b --- a/perl/Git/SVN.pm +++ b/perl/Git/SVN.pm @@@ -14,6 -14,7 +14,7 @@@ use IPC::Open3 use Memoize; # core since 5.8.0, Jul 2002 use Memoize::Storable; use POSIX qw(:signal_h); + use Time::Local; use Git qw( command @@@ -1332,7 -1333,7 +1333,7 @@@ sub parse_svn_date $ENV{TZ} = 'UTC'; my $epoch_in_UTC = - POSIX::strftime('%s', $S, $M, $H, $d, $m - 1, $Y - 1900); + Time::Local::timelocal($S, $M, $H, $d, $m - 1, $Y - 1900); # Determine our local timezone (including DST) at the # time of $epoch_in_UTC. $Git::SVN::Log::TZ stored the @@@ -2365,7 -2366,7 +2366,7 @@@ sub _new # Older repos imported by us used $GIT_DIR/svn/foo instead of # $GIT_DIR/svn/refs/remotes/foo when tracking refs/remotes/foo - if ($ref_id =~ m{^refs/remotes/(.*)}) { + if ($ref_id =~ m{^refs/remotes/(.+)}) { my $old_dir = "$ENV{GIT_DIR}/svn/$1"; if (-d $old_dir && ! -d $dir) { $dir = $old_dir;