How to get the list of files as a part of commit in Jgit
问题 I want to get the list of all the files which were part of a commit. I have the commit id available with me. I looked into the following link How to get the file list for a commit with JGit and tried the following code. TreeWalk treeWalk = new TreeWalk( repository ); treeWalk.reset( commit.getId() ); while( treeWalk.next() ) { String path = treeWalk.getPathString(); // ... } treeWalk.close(); and following code try( RevWalk walk = new RevWalk( git.getRepository() ) ) { RevCommit commit = walk