Supersouth
Supersouth

Reputation: 79

How to use JGit to get list of changed files?

Using JGit, I want to get a list of files changed on commits as is possible with git log --name-status.

Is this possible? If so, how do you do it?

Upvotes: 5

Views: 3864

Answers (1)

Sonson123
Sonson123

Reputation: 11427

I use a modified version of the JGitUtils from the great GitBlit-Tool:

Look at the source of the method getFilesInCommit to see how this can work (PathChangeModel is just used to hold the data.)

Upvotes: 3

Related Questions