зеркало из https://github.com/github/ruby.git
No last commit when up-to-date
Get the last commit title from the upstream to the head, so that no `last_commit` line will be shown when the branch is up to date with the upstream.
This commit is contained in:
Родитель
2f0f9115d3
Коммит
474af9ee9a
|
@ -402,7 +402,9 @@ class VCS
|
|||
modified = log[/^Date:\s+(.*)/, 1]
|
||||
branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short HEAD]])
|
||||
branch.chomp!
|
||||
title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 FETCH_HEAD..HEAD]])
|
||||
upstream = cmd_read_at(srcdir, [gitcmd + %W[branch --list --format=%(upstream:short) #${branch}]])
|
||||
upstream.chomp!
|
||||
title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 #{upstream}..HEAD]])
|
||||
title = nil if title.empty?
|
||||
[last, changed, modified, branch, title]
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче