有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何在git中使用旧提交?

我正在使用git和JavaGit库制作java项目。我需要对以前提交的文件执行一些操作。我指定存储库的路径。如何获取到以前提交的路径

public static void main(String[] args) throws JavaGitException, IOException {
    File repositoryDirectory = new File("\\Library\\build\\jar\\");

    FindBugs fb = new FindBugs(repositoryDirectory);
    fb.findBugs();

    for (Commit c : fb.getDotGit().getLog()) {
        //here i need to execute findBugs() method to every commit
        //how could I do this?
        System.out.println(c.getMessage());
    }
}

共 (0) 个答案