class GitDiffRunner {

    public static List<Diff> diff(Repository repository, RevisionScope<ObjectId> revisionScope) throws SourceControlException {
        String[] command = buildDiffCommand(revisionScope);
        try {
            List<String> diffLines = ProcessRunner.runCommand(getRepositoryBaseFolder(repository), command);
            byte[] diffBytes = pad(diffLines); // workaround for https://github.com/thombergs/diffparser/issues/31
            return new UnifiedDiffParser().parse(diffBytes);
        } catch (IOException e) {
            throw new SourceControlException("Error running git diff command", e);
        }
    }

    private  GitDiffRunner();

}