Defect #31120 ยป 31120.patch
lib/redmine/scm/adapters/git_adapter.rb | ||
---|---|---|
83 | 83 |
cmd_args = %w|branch --no-color --verbose --no-abbrev| |
84 | 84 |
git_cmd(cmd_args) do |io| |
85 | 85 |
io.each_line do |line| |
86 |
branch_rev = line.match('\s*(\*?)\s*(.*?)\s*([0-9a-f]{40}).*$') |
|
87 |
bran = GitBranch.new(branch_rev[2]) |
|
88 |
bran.revision = branch_rev[3] |
|
89 |
bran.scmid = branch_rev[3] |
|
90 |
bran.is_default = ( branch_rev[1] == '*' ) |
|
91 |
@branches << bran |
|
86 |
if branch_rev = line.match('\s*(\*?)\s*(.*?)\s*([0-9a-f]{40}).*$') |
|
87 |
bran = GitBranch.new(branch_rev[2]) |
|
88 |
bran.revision = branch_rev[3] |
|
89 |
bran.scmid = branch_rev[3] |
|
90 |
bran.is_default = ( branch_rev[1] == '*' ) |
|
91 |
@branches << bran |
|
92 |
end |
|
92 | 93 |
end |
93 | 94 |
end |
94 | 95 |
@branches.sort! |