зеркало из https://github.com/github/ruby.git
tool/vcs.rb: return the commit date as the modified time
This commit is contained in:
Родитель
2e2cd8297b
Коммит
39eae6bf89
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче