ruby-changes:57505
From: Nobuyoshi <ko1@a...>
Date: Tue, 3 Sep 2019 11:40:28 +0900 (JST)
Subject: [ruby-changes:57505] 542a1ade80 (master): --date=iso-local does not work with old git
https://git.ruby-lang.org/ruby.git/commit/?id=542a1ade80 From 542a1ade8033d03513647ace64e50dbf31cb5e68 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 3 Sep 2019 11:31:14 +0900 Subject: --date=iso-local does not work with old git diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 620ac1b..65eb774 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -618,9 +618,15 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L618 end def format_changelog(path, arg) - cmd = %W"#{COMMAND} log --format=medium --notes=commits --date=iso-local --topo-order" + env = {'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'} + cmd = %W"#{COMMAND} log --format=medium --notes=commits --topo-order" + date = "--date=iso-local" + unless system(env, *cmd, date, chdir: @srcdir, out: NullDevice, exception: false) + date = "--date=iso" + end + cmd << date cmd.concat(arg) - system({'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'}, *cmd, chdir: @srcdir, out: path) + system(env, *cmd, chdir: @srcdir, out: path) end def upstream -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/