mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fallback to an invalid branch name if no branch found
This commit is contained in:
parent
eb84b33c86
commit
025206d0dd
1 changed files with 1 additions and 0 deletions
|
@ -403,6 +403,7 @@ class VCS
|
|||
(branch = branch_list[0]).strip! unless branch_list.empty?
|
||||
end
|
||||
branch.chomp!
|
||||
branch = ":detached:" if branch.empty?
|
||||
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]])
|
||||
|
|
Loading…
Add table
Reference in a new issue