@@ -33,21 +33,22 module Redmine | |||
|
33 | 33 | end |
|
34 | 34 | |
|
35 | 35 | def branches |
|
36 |
|
|
|
36 | return @branches if @branches | |
|
37 | @branches = [] | |
|
37 | 38 | cmd = "#{GIT_BIN} --git-dir #{target('')} branch" |
|
38 | 39 | shellout(cmd) do |io| |
|
39 | 40 | io.each_line do |line| |
|
40 | branches << line.match('\s*\*?\s*(.*)$')[1] | |
|
41 | @branches << line.match('\s*\*?\s*(.*)$')[1] | |
|
41 | 42 | end |
|
42 | 43 | end |
|
43 | branches.sort! | |
|
44 | @branches.sort! | |
|
44 | 45 | end |
|
45 | 46 | |
|
46 | 47 | def tags |
|
47 |
|
|
|
48 | return @tags if @tags | |
|
48 | 49 | cmd = "#{GIT_BIN} --git-dir #{target('')} tag" |
|
49 | 50 | shellout(cmd) do |io| |
|
50 | io.readlines.sort!.map{|t| t.strip} | |
|
51 | @tags = io.readlines.sort!.map{|t| t.strip} | |
|
51 | 52 | end |
|
52 | 53 | end |
|
53 | 54 |
General Comments 0
You need to be logged in to leave comments.
Login now