Skip to content

Instantly share code, notes, and snippets.

@demelziraptor
Created May 21, 2012 14:53
Show Gist options
  • Save demelziraptor/2762756 to your computer and use it in GitHub Desktop.
Save demelziraptor/2762756 to your computer and use it in GitHub Desktop.
Fix gitlab network graph without master branch
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