Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsJGit statistics
https://www.eclipse.org/forums/index.php/mv/msg/261330/754099/#msg_754099
I'm trying to gather some metrics from a git repository. Until now I was parsing the output of the git command, but I would like to have a complete Java implementation without any dependencies to installed programs.
I was able to gather the commits and the associated information like author etc. But how can I find out the lines of code that changed due to a commit? Is there a possibility to do this with JGit?]]>bugzilla2011-10-31T18:37:11-00:00Re: JGit statistics
https://www.eclipse.org/forums/index.php/mv/msg/261330/754103/#msg_754103
I wrote a library on top of JGit with filters to track commit statistics and inspect the differences introduced by each commit.
It is called gitective and is available on GitHub: github.com/kevinsawicki/gitective
It relies purely on JGit and has utilities for diff'ing blobs, creating tree walks, and generating histograms for changes introduced by commits.
The README has many examples of how it can be used.]]>Kevin Sawicki2011-10-31T18:48:27-00:00Re: JGit statistics
https://www.eclipse.org/forums/index.php/mv/msg/261330/754109/#msg_754109
bugzilla2011-10-31T19:47:32-00:00Re: JGit statistics
https://www.eclipse.org/forums/index.php/mv/msg/261330/754561/#msg_754561
org.gitective.core.filter.commit.DiffCountFilter
class and override the
include(RevCommit commit, Collection<DiffEntry> diffs, int diffCount)
method.
This method will be called on each commit visited with the collection of diffs as well as the total number of diffs introduced. You can return true or false if you want to continue the commit walk or stop it for each commit visited. Always returning true for every commit will keep the walk going until all commits have been processed in the repository.]]>Kevin Sawicki2011-11-03T09:54:09-00:00