@Test public void testGetChangeScopeResolver() { ObjectId from = ObjectId.fromString("0d96512867985be6c9ee555dbccd68d53374af0d"); ObjectId to = ObjectId.fromString("9c83f948d27326fb3750afbc3d023876d9320482"); SourceControlFilter[] finders = new SourceControlFilter[0]; GitRepository gitRepository = new GitRepository(GitHelper.openCurrentFolder(), finders); ChangeScopeResolver changeScopeResolver = gitRepository.getChangeScopeResolver(from, to); assertTrue(changeScopeResolver instanceof JGitChangeScopeResolver); }
public ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit) { return useCliDiff || fromCommit.equals(toCommit) ? new CliChangeScopeResolver(repository) : new JGitChangeScopeResolver(repository, filters); }
GitRepository implements GitInterface { public ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit) { return useCliDiff || fromCommit.equals(toCommit) ? new CliChangeScopeResolver(repository) : new JGitChangeScopeResolver(repository, filters); } }
GitRepository implements GitInterface { public ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit) { return useCliDiff || fromCommit.equals(toCommit) ? new CliChangeScopeResolver(repository) : new JGitChangeScopeResolver(repository, filters); } GitRepository(String repositoryPath, SourceControlFilter... filters);  GitRepository(String repositoryPath, boolean useCliDiff, SourceControlFilter... filters); }
GitRepository implements GitInterface { public ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit) { return useCliDiff || fromCommit.equals(toCommit) ? new CliChangeScopeResolver(repository) : new JGitChangeScopeResolver(repository, filters); } GitRepository(String repositoryPath, SourceControlFilter... filters);  GitRepository(String repositoryPath, boolean useCliDiff, SourceControlFilter... filters); @Override ChangeScope<Change> getChanges(String fromRev, String toRev); ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit); @Override Set<RevInfo> getJiraSet(String packagePath, List<Integer> lineNumbers); static Repository buildRepository(String repositoryPath); }
GitRepository implements GitInterface { public ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit) { return useCliDiff || fromCommit.equals(toCommit) ? new CliChangeScopeResolver(repository) : new JGitChangeScopeResolver(repository, filters); } GitRepository(String repositoryPath, SourceControlFilter... filters);  GitRepository(String repositoryPath, boolean useCliDiff, SourceControlFilter... filters); @Override ChangeScope<Change> getChanges(String fromRev, String toRev); ChangeScopeResolver getChangeScopeResolver(ObjectId fromCommit, ObjectId toCommit); @Override Set<RevInfo> getJiraSet(String packagePath, List<Integer> lineNumbers); static Repository buildRepository(String repositoryPath);  }