diff --git a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java index c40db0b1a54c..3bb55f4829aa 100644 --- a/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java +++ b/plugins/git4idea/src/git4idea/history/GitHistoryUtils.java @@ -529,12 +529,14 @@ public class GitHistoryUtils { for (GitLogRecord record : records) { if (record == null) continue; - Pair> pair = convert(record, factory, root); + Hash hash = HashImpl.build(record.getHash()); + List parents = getParentHashes(factory, record); + commitConsumer.consume(factory.createTimedCommit(hash, parents, record.getCommitTime())); - commitConsumer.consume(pair.first); - for (VcsRef ref : pair.second) { + for (VcsRef ref : parseRefs(record.getRefs(), hash, factory, root)) { refConsumer.consume(ref); } + userConsumer.consume(factory.createUser(record.getAuthorName(), record.getAuthorEmail())); } }, 1000); @@ -542,16 +544,6 @@ public class GitHistoryUtils { handlerListener.reportErrors(); } - @NotNull - private static Pair> convert(@NotNull GitLogRecord rec, - @NotNull VcsLogObjectsFactory factory, - @NotNull VirtualFile root) { - Hash hash = HashImpl.build(rec.getHash()); - List parents = getParentHashes(factory, rec); - TimedVcsCommit commit = factory.createTimedCommit(hash, parents, rec.getCommitTime()); - return Pair.create(commit, parseRefs(rec.getRefs(), hash, factory, root)); - } - @NotNull private static Collection parseRefs(@NotNull Collection refs, @NotNull Hash hash,