summaryrefslogtreecommitdiff
path: root/perl/Git/SVN/Fetcher.pm
diff options
context:
space:
mode:
authorLibravatar Ryuichi Kokubo <ryu1kkb@gmail.com>2015-02-26 01:04:41 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-02-26 14:02:34 -0800
commit45c956b35731fcbda4cf29fcd1658d9418bec2d1 (patch)
tree95bc676bdde07ec7883abb7ee75fc4e73e770498 /perl/Git/SVN/Fetcher.pm
parentGit 2.2.2 (diff)
downloadtgif-45c956b35731fcbda4cf29fcd1658d9418bec2d1.tar.xz
git-svn: fix localtime=true on non-glibc environments
git svn uses POSIX::strftime('%s', $sec, $min, ...) to make unix epoch time. But lowercase %s formatting character is a GNU extention. This causes problem in git svn fetch --localtime on non-glibc systems, such as msys or cygwin. Using Time::Local::timelocal($sec, $min, ...) fixes it. Signed-off-by: Ryuichi Kokubo <ryu1kkb@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Notes: lowercase %s format character in strftime is a GNU extension and not widely supported. POSIX::strftime affected by underlying crt's strftime because POSIX::strftime just calls crt's one. Time::Local is good function to replace POSIX::strftime because it's a perl core module function. Document about Time::Local. http://perldoc.perl.org/Time/Local.html These are specifications of strftime. The GNU C Library Reference Manual. http://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html perl POSIX module's strftime document. It does not have '%s'. http://perldoc.perl.org/POSIX.html strftime document of Microsort Windows C Run-Time library. https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx The Open Group's old specification does not have '%s' too. http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html On my environment, following problems happened. - msys : git svn fetch does not progress at all with perl.exe consuming CPU. - cygwin : git svn fetch progresses but time stamp information is dropped. Every commits have unix epoch timestamp. I would like to thank git developer and contibutors. git helps me so much everyday. Thank you. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl/Git/SVN/Fetcher.pm')
0 files changed, 0 insertions, 0 deletions