31120.patch

Fix by Chad Petersen - Go MAEDA, 2019-03-31 06:39

Download (1.09 KB)

View differences:

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!