| | |
| | |
|
| | | private final String commitId;
|
| | |
|
| | | public DiffStat(String commitId) {
|
| | | private final Repository repository;
|
| | |
|
| | | public DiffStat(String commitId, Repository repository) {
|
| | | this.commitId = commitId;
|
| | | this.repository = repository;
|
| | | }
|
| | |
|
| | | public PathChangeModel addPath(DiffEntry entry) {
|
| | | PathChangeModel pcm = PathChangeModel.from(entry, commitId);
|
| | | PathChangeModel pcm = PathChangeModel.from(entry, commitId, repository);
|
| | | paths.add(pcm);
|
| | | return pcm;
|
| | | }
|
| | |
| | | DiffFormatter df;
|
| | | switch (outputType) {
|
| | | case HTML:
|
| | | df = new GitBlitDiffFormatter(commit.getName(), path, handler, tabLength);
|
| | | df = new GitBlitDiffFormatter(commit.getName(), repository, path, handler, tabLength);
|
| | | break;
|
| | | case PLAIN:
|
| | | default:
|
| | |
| | | DiffStat stat = null;
|
| | | try {
|
| | | RawTextComparator cmp = RawTextComparator.DEFAULT;
|
| | | DiffStatFormatter df = new DiffStatFormatter(commit.getName());
|
| | | DiffStatFormatter df = new DiffStatFormatter(commit.getName(), repository);
|
| | | df.setRepository(repository);
|
| | | df.setDiffComparator(cmp);
|
| | | df.setDetectRenames(true);
|