Patch #9498
closed[git adapter] git doesn't show all the branches
0%
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)
Updated by Toshi MARUYAMA over 13 years ago
- Status changed from New to Closed
I can not accept this patch.
Redmine requires bare repository.
And Redmine must treat only normal branches.
ChiliProject (Redmine 1.1) repository browser is very dirty.
https://www.chiliproject.org/issues/527
Updated by Alexander Jipa over 13 years ago
- Assignee set to Toshi MARUYAMA
Still it works perfectly for bare repository with that change.
BTW what do you mean by the normal branches? They are ALL normal because the branch is just a reference to the latest commit hence they are still there.
There could have been at least an option for turning this functionality on in the repository settings.
Updated by Toshi MARUYAMA over 13 years ago
Alexander Jipa wrote:
BTW what do you mean by the normal branches?
refs/heads/*
Updated by Toshi MARUYAMA over 13 years ago
As I described at https://www.chiliproject.org/issues/527 ,
Chili repository browser has many garbage revisions.
Not bare repository (with working tree) has many garbage revisions.
So, git users need to run "git gc".
Redmine is project management software.
It should use shared repository.
Git shared repository is bare repository.