summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2011-05-01 23:17:57 +0200
committerShawn O. Pearce <spearce@spearce.org>2011-05-05 10:45:57 -0700
commit5f22d67270466097713a0757e4f0f9f06cb06807 (patch)
treec7b90a97039180da19f382acb2423632e2a19fc5 /org.eclipse.jgit
parent18b7e9400e5282bd3c47ec2d4772e4b1cae68683 (diff)
downloadjgit-5f22d67270466097713a0757e4f0f9f06cb06807.tar.gz
jgit-5f22d67270466097713a0757e4f0f9f06cb06807.zip
Ignore submodule commits during checkout
Submodules are supposed to be handled by separate operations, so we should ignore them on checkout, just like C Git does. This fix does not add submodule support. We just try harder to ignore them. Bug: 343566 Change-Id: I2c5ae1024ea7bb57adf27072da6acc9643018eda Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index e3c225ff6d..9a99408981 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -417,7 +417,13 @@ public class DirCacheCheckout {
if (!file.getParentFile().mkdirs()) {
// ignore
}
+
DirCacheEntry entry = dc.getEntry(path);
+
+ // submodules are handled with separate operations
+ if (FileMode.GITLINK.equals(entry.getRawMode()))
+ continue;
+
checkoutEntry(repo, file, entry);
}