Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit obtained by queryCommits does not contain files #230

Closed
SaintDubious opened this issue Nov 6, 2015 · 1 comment
Closed

Commit obtained by queryCommits does not contain files #230

SaintDubious opened this issue Nov 6, 2015 · 1 comment

Comments

@SaintDubious
Copy link

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
@kohsuke
Copy link
Collaborator

kohsuke commented Dec 10, 2015

Fixed in 1.72.

@kohsuke kohsuke closed this as completed Dec 10, 2015
kohsuke added a commit that referenced this issue Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants