summaryrefslogtreecommitdiff
path: root/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java')
-rw-r--r--plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java
index f1ab1d476c6f..31e731f44937 100644
--- a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java
+++ b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java
@@ -22,7 +22,7 @@ import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.*;
import com.intellij.openapi.vcs.changes.Change;
-import com.intellij.openapi.vcs.changes.ContentRevision;
+import com.intellij.openapi.vcs.changes.ChangesUtil;
import com.intellij.openapi.vcs.changes.committed.DecoratorManager;
import com.intellij.openapi.vcs.changes.committed.VcsCommittedListsZipper;
import com.intellij.openapi.vcs.changes.committed.VcsCommittedViewAuxiliary;
@@ -199,13 +199,7 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider<
final Collection<Change> changes = commit.getChanges();
if (changes.size() == 1) {
Change change = changes.iterator().next();
- ContentRevision revision = change.getAfterRevision();
- if (revision == null) {
- revision = change.getBeforeRevision();
- }
- assert revision != null : "Revision can't be null in " + change;
- FilePath filePathInRevision = revision.getFile();
- return Pair.create(commit, filePathInRevision);
+ return Pair.create(commit, ChangesUtil.getFilePath(change));
}
for (Change change : changes) {
if (change.getAfterRevision() != null && FileUtil.filesEqual(filePath.getIOFile(), change.getAfterRevision().getFile().getIOFile())) {