Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2017-06-22 17:04:34 -0400
committerThomas Wolf2017-06-23 03:58:13 -0400
commitc26fa04c9b6d74dc22e1fea422f00f4e6ba7941b (patch)
tree5c3b520c4a7d52cc93bd4de606670a6222e7ce6d /org.eclipse.egit.core.test/src
parent9259942da008a4e754da97c986df4b1084a13601 (diff)
downloadegit-c26fa04c9b6d74dc22e1fea422f00f4e6ba7941b.tar.gz
egit-c26fa04c9b6d74dc22e1fea422f00f4e6ba7941b.tar.xz
egit-c26fa04c9b6d74dc22e1fea422f00f4e6ba7941b.zip
Correct sync info calculation for folders
The folder handling in the git "Team synchonization" support was wrong since commit f46237a (bug 516426). That commit considered folders as supervised -- which is correct since otherwise some changes may be missed. It also tried to compensate for folders without changes showing up in the synchronize view by setting their sync state to IN_SYNC if they had only IN_SYNC descendants. That broke the display of "compacted folders" in the synchronize view. If a file is not IN_SYNC, the synchronize view is able to handle its parent containers fine without needing any SyncInfo for them. When we do supply sync info, the parent containers will be considered changed themselves, and will show up explicitly in the synchronize view. Therefore, simply return IN_SYNC for folders. The state recorded in the GitSyncObjCache is bogus anyway. Bug: 518646 Change-Id: I2970a50b2d11403b84dc1b9a000021f61ca92f90 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberResourceMappingContextTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberResourceMappingContextTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberResourceMappingContextTest.java
index 6e090f2b0..ba49e7546 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberResourceMappingContextTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitSubscriberResourceMappingContextTest.java
@@ -387,9 +387,9 @@ public class GitSubscriberResourceMappingContextTest extends GitTestCase {
assertTrue(hasFile1);
assertFalse(context.hasRemoteChange(iFile1, new NullProgressMonitor()));
assertTrue(context.hasLocalChange(iFile1, new NullProgressMonitor()));
- assertTrue(
+ assertFalse(
context.hasLocalChange(subfolder, new NullProgressMonitor()));
- assertTrue(context.hasLocalChange(sub, new NullProgressMonitor()));
+ assertFalse(context.hasLocalChange(sub, new NullProgressMonitor()));
}
private RevCommit setContentsAndCommit(IFile targetFile,

Back to the top