mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tool/vcs.rb: return the commit date as the modified time
This commit is contained in:
parent
2e2cd8297b
commit
39eae6bf89
1 changed files with 2 additions and 2 deletions
|
@ -405,9 +405,9 @@ class VCS
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue