1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use git describe --contains for tags

This commit is contained in:
Nobuyoshi Nakada 2019-09-07 01:02:37 +09:00
parent 3890c9eeee
commit 5118aa2d58
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -482,7 +482,7 @@ class VCS
end
branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short #{ref}]])
if branch.empty?
branch = cmd_read_at(srcdir, [gitcmd + %W[tag --list #{ref}]]).strip
branch = cmd_read_at(srcdir, [gitcmd + %W[describe --contains #{ref}]]).strip
end
if branch.empty?
branch_list = cmd_read_at(srcdir, [gitcmd + %W[branch --list --contains #{ref}]]).lines.to_a