I'm using JGit to provide a service that will give information about various remote repositories. I'm trying to use JGit's LogCommand
to do this, however I have been unable to find a way to do this.
I'm trying to achieve something analogous to doing the following:
git log --author="<username>" --pretty=tformat: --shortstat
However, I can't find any functionality that does that. Is there a way I could do this, with or without JGit?
Compared with native Git's
log
command, theLogCommand
if JGit offers only basic options. But there is aRevWalk
in JGit that allows to specify custom filters while iterating over commits.For example:
An example
RevFilter
that includes only commits of 'author' could look like this:To abort the walk, a filter may throws a
StopWalkException
.