|
18 | 18 | import org.variantsync.diffdetective.diff.result.CommitDiffResult;
|
19 | 19 | import org.variantsync.diffdetective.diff.result.DiffError;
|
20 | 20 | import org.variantsync.diffdetective.diff.result.DiffParseException;
|
21 |
| -import org.variantsync.diffdetective.preliminary.GitDiff; |
22 | 21 | import org.variantsync.diffdetective.util.Assert;
|
23 | 22 | import org.variantsync.diffdetective.util.StringUtils;
|
24 | 23 | import org.variantsync.diffdetective.variation.DiffLinesLabel;
|
@@ -71,38 +70,6 @@ public GitDiffer(final Repository repository) {
|
71 | 70 | this.parseOptions = repository.getParseOptions();
|
72 | 71 | }
|
73 | 72 |
|
74 |
| - /** |
75 |
| - * Creates a GitDiff object. |
76 |
| - * For this, each commit is iterated to create CommitDiffs |
77 |
| - * |
78 |
| - * @return The GitDiff object created from the Git object of this GitDiffer |
79 |
| - */ |
80 |
| - @Deprecated |
81 |
| - public GitDiff createGitDiff() { |
82 |
| - final GitDiff gitDiff = new GitDiff(); |
83 |
| - |
84 |
| - final Iterable<RevCommit> commitsIterable; |
85 |
| - try { |
86 |
| - commitsIterable = git.log().call(); |
87 |
| - } catch (GitAPIException e) { |
88 |
| - Logger.warn("Could not get log for git repository {}", git.toString()); |
89 |
| - return null; |
90 |
| - } |
91 |
| - |
92 |
| - // we specifically count the commits here because the amount of unfiltered commits is |
93 |
| - // otherwise lost |
94 |
| - final int[] commitAmount = {0}; |
95 |
| - final Iterator<RevCommit> commitIterator = new SideEffectIterator<>( |
96 |
| - commitsIterable.iterator(), |
97 |
| - r -> ++commitAmount[0]); |
98 |
| - for (CommitDiffResult commitDiff : yieldAllValidIn(commitIterator).map(this::createCommitDiff)) { |
99 |
| - commitDiff.diff().ifPresent(gitDiff::addCommitDiff); |
100 |
| - } |
101 |
| - gitDiff.setCommitAmount(commitAmount[0]); |
102 |
| - |
103 |
| - return gitDiff; |
104 |
| - } |
105 |
| - |
106 | 73 | /**
|
107 | 74 | * Returns all commits in the repository's history.
|
108 | 75 | */
|
|
0 commit comments