// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/head/GitHubSCMHead.java
// public abstract class GitHubSCMHead<T extends GitHubCause<T>> extends SCMHead {
//     private static final long serialVersionUID = 1L;
// 
//     private final String sourceId;
// 
//     public GitHubSCMHead(@NonNull String name, String sourceId) {
//         super(name);
//         this.sourceId = sourceId;
//     }
// 
//     public String getSourceId() {
//         return sourceId;
//     }
// 
//     public abstract String fetchHeadSha(GHRepository remoteRepo) throws IOException;
// 
//     public abstract String getHeadSha(T cause);
// 
//     public GitHubSCMRevision createSCMRevision(T cause) {
//         return new GitHubSCMRevision(this, getHeadSha(cause), cause);
//     }
// }


import com.github.kostyasha.github.integration.multibranch.head.GitHubSCMHead;
import com.github.kostyasha.github.integration.multibranch.revision.GitHubSCMRevision;
import jenkins.scm.api.SCMFile;
import jenkins.scm.api.SCMFileSystem;
import org.kohsuke.github.GHCommit;
import org.kohsuke.github.GHRepository;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
package com.github.kostyasha.github.integration.multibranch.fs;



/**
 * @author Kanstantsin Shautsou
 */
public class GitHubSCMFileSystem extends SCMFileSystem {
    private final GHRepository remoteRepo;
    private final GHCommit commit;
    private volatile TreeCache tree;

// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/head/GitHubSCMHead.java
// public abstract class GitHubSCMHead<T extends GitHubCause<T>> extends SCMHead {
//     private static final long serialVersionUID = 1L;
// 
//     private final String sourceId;
// 
//     public GitHubSCMHead(@NonNull String name, String sourceId) {
//         super(name);
//         this.sourceId = sourceId;
//     }
// 
//     public String getSourceId() {
//         return sourceId;
//     }
// 
//     public abstract String fetchHeadSha(GHRepository remoteRepo) throws IOException;
// 
//     public abstract String getHeadSha(T cause);
// 
//     public GitHubSCMRevision createSCMRevision(T cause) {
//         return new GitHubSCMRevision(this, getHeadSha(cause), cause);
//     }
// }


// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/fs/GitHubSCMFileSystem.java
import com.github.kostyasha.github.integration.multibranch.head.GitHubSCMHead;
import com.github.kostyasha.github.integration.multibranch.revision.GitHubSCMRevision;
import jenkins.scm.api.SCMFile;
import jenkins.scm.api.SCMFileSystem;
import org.kohsuke.github.GHCommit;
import org.kohsuke.github.GHRepository;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;

package com.github.kostyasha.github.integration.multibranch.fs;



/**
 * @author Kanstantsin Shautsou
 */
public class GitHubSCMFileSystem extends SCMFileSystem {
    private final GHRepository remoteRepo;
    private final GHCommit commit;
    private volatile TreeCache tree;

    protected GitHubSCMFileSystem(@NonNull GHRepository remoteRepo, GitHubSCMHead<?> head, GitHubSCMRevision rev) throws IOException {