ruby-changes:56003
From: Nobuyoshi <ko1@a...>
Date: Tue, 4 Jun 2019 21:47:43 +0900 (JST)
Subject: [ruby-changes:56003] Nobuyoshi Nakada: 39eae6bf89 (trunk): tool/vcs.rb: return the commit date as the modified time
https://git.ruby-lang.org/ruby.git/commit/?id=39eae6bf89 From 39eae6bf89773ef830b632c02737545ab9eedd35 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 4 Jun 2019 21:27:46 +0900 Subject: tool/vcs.rb: return the commit date as the modified time diff --git a/tool/vcs.rb b/tool/vcs.rb index 6c67b9b..8735d08 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -405,9 +405,9 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L405 def self.get_revisions(path, srcdir = nil) gitcmd = [COMMAND, '-C', srcdir || '.'] last = cmd_read_at(srcdir, [[*gitcmd, 'rev-parse', 'HEAD']]).rstrip - log = cmd_read_at(srcdir, [[*gitcmd, 'log', '-n1', '--date=iso', *path]]) + log = cmd_read_at(srcdir, [[*gitcmd, 'log', '-n1', '--date=iso', '--pretty=fuller', *path]]) changed = log[/\Acommit (\h+)/, 1] - modified = log[/^Date:\s+(.*)/, 1] + modified = log[/^CommitDate:\s+(.*)/, 1] branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short HEAD]]) if branch.empty? branch_list = cmd_read_at(srcdir, [gitcmd + %W[branch --list --contains HEAD]]).lines.to_a -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/