I think there is nothing like a "path of a commit". Commits have ID's. But you can ask the commit about the pathes of all the files in the repository (all version controlled files at the moment that commit was created). Something like:
RevCommit commit=...
final TreeWalk walk = new TreeWalk(db);
walk.setRecursive(recursive);
walk.addTree(commit.getTree());
while (walk.next())
outw.print(walk.getPathString());
Thank you very much for the reply. You've gotten me most of the way there I think.
I am looking to cycle through each commit and find commit information such as commiter,commit time etc.... I am also looking to get the names of all the associated files with the commit. I am able to get the commiter info, but not the names of all the files. Here is my code.
Thanks for the help
CommitListFilter block = new CommitListFilter();
CommitFilter limit = new CommitLimitFilter(1).setStop(true);
AndCommitFilter filters = new AndCommitFilter(limit, block);
CommitCursorFilter cursor = new CommitCursorFilter(filters);
Repository repo = new FileRepository(gitPath);
CommitFinder finder = new CommitFinder(repo);
finder.setFilter(cursor);
RevCommit commit = CommitUtils.getHead(repo);