Project

General

Profile

Actions

Patch #9498

closed

[git adapter] git doesn't show all the branches

Added by Alexander Jipa over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2011-10-31
Due date:
% Done:

0%

Estimated time:
0.25 h

Description

Git is not showing all the branches for the repo.
For example it won't show the remote branches at all.

The workaround is to patch git_adapter.rb file like so:

def branches
          return @branches if @branches
          @branches = []
-         cmd_args = %w|branch --no-color|
+         cmd_args = %w|branch -a --no-color|
          scm_cmd(*cmd_args) do |io|
            io.each_line do |line|
              @branches << line.match('\s*\*?\s*(.*)$')[1]
            end
          end
          @branches.sort!
        rescue ScmCommandAborted
          nil
        end

That way after next changesets fetch all the branches with their revisions will be available in the Repository tab.

Affected versions:
Redmine 1.2.1.stable.7547 (MySQL)

Actions

Also available in: Atom PDF