Accessing modified files in repository using JGit

Viewed 440

I am using JGit to access a local repository using Java. I need to access the changed files of a repository which is typically executed using the git status command in git. What is the JGit implementation for this command?

So basically I need the JGit representation of a typical:

git status

My current implementation:

private void initRepository(String path){
    try {
        File workTree = new File(path);
        Git git = Git.open(workTree);
        //I need to get all the modified/changed files here     
    } catch (IOException ex) {
        //handle exception
    }
}
1 Answers
Related