If I use queryCommits to get a list of commits and then call getFiles() on any of the commits in the list, it will return 0 files. However if I instead directly get a commit by sha1 and then call getFiles() it will return the appropriate file count. Both commit objects represent the same commit, they should have the same file count:
PagedIterable<GHCommit> commits = ghRepo.queryCommits().path( fullPath + "/" + fileName ).list();
for (GHCommit commit : commits) {
GHCommit testing = ghRepo.getCommit( commit.getSHA1() );
System.out.println( "FileCount = " + commit.getFiles().size() );
System.out.println( "FileCount = " + testing.getFiles().size() );
}
This will print out:
FileCount = 0
FileCount = 1
If I use queryCommits to get a list of commits and then call getFiles() on any of the commits in the list, it will return 0 files. However if I instead directly get a commit by sha1 and then call getFiles() it will return the appropriate file count. Both commit objects represent the same commit, they should have the same file count:
This will print out: