Created
May 21, 2012 14:53
-
-
Save demelziraptor/2762756 to your computer and use it in GitHub Desktop.
Fix gitlab network graph without master branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gitlab uses Grit for the network graph, and Grit relies on the master branch for this functionality. Without a master branch the graph shows up blank, however, you can get it to show the graph for your default branch only (instead of all branches as it would normally show) by changing the following line in lib/graph_commit.rb: | |
commits = Grit::Commit.find_all(@repo, nil, {:max_count => 650}) | |
With this: | |
commits = Grit::Commit.find_all(@repo, project.root_ref, {:max_count => 650}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment