bugspots
bugspots copied to clipboard
Add No Merges Option
Removing merges from the commit history should give more relevant results for a given depth.
Grit allows native git commands, so this can be done by just passing options to rev-list and then parsing the list of commits.
Hmm, do you have some example code for this? Admittedly, not all that familiar with the grit API yet..
I can add this, it is only a few lines. Here is what I have been using
commit_list = g.git.rev_list({:max_count => false, :no_merges => true, :pretty => "raw", :timeout => false}, branch)
commits = Commit.list_from_string(g, commit_list)
In a Grit::Repo there is a git command line interface object called git. The method_missing method, https://github.com/mojombo/grit/blob/master/lib/grit/git.rb#L371, allows you to execute any native git command.