我试图通过提供提交 ID 来获取所有提交的文件。
RevCommit commit = walk.parseCommit(ObjectId.fromString(objId));
FileTreeIterator fileTreeItr = new FileTreeIterator(repository);
Tree tree = new Tree(repository);
IndexDiff indexDiff = new IndexDiff(repository, commit.getId(), fileTreeItr);
System.out.println(indexDiff.getChanged());
System.out.println(indexDiff.getAdded());
上面的代码不起作用,有人可以找出这里出了什么问题或任何其他方法来让它工作吗?