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.
Thank you for your help, I included gitective in my program and it works just fine. I read the README, but I could not find any information about how I can find the lines of code that were changed in a commit. Is there already a possibility to collect this information?
include(RevCommit commit, Collection<DiffEntry> diffs, int diffCount)
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.