diff: check changes for strict equality
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Wed, 25 Feb 2015 15:45:34 +0000 (18:45 +0300)
committerAleksey Pivovarov <AMPivovarov@gmail.com>
Wed, 25 Feb 2015 15:46:00 +0000 (18:46 +0300)
Otherwise there are possible cases, when Change is substituted by another one with same path (therefore equals()), but different content.

platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java

index f115c3c36f3fcf42a0625a719cb328eaeaff6ad5..10a70ea8578114b07bd566e755afa025ab7570e2 100644 (file)
@@ -194,7 +194,7 @@ public abstract class CacheChangeProcessor extends DiffRequestProcessor {
       return;
     }
 
-    if (myCurrentChange.getBeforeRevision() instanceof FakeRevision || myCurrentChange.getAfterRevision() instanceof FakeRevision) {
+    if (!ChangeDiffRequestProducer.isEquals(myCurrentChange, selectedChange)) {
       myCurrentChange = selectedChange;
       updateRequest();
     }