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>
This commit is contained in:
Robin Rosenberg 2011-05-01 23:17:57 +02:00 committed by Shawn O. Pearce
parent 18b7e9400e
commit 5f22d67270
1 changed files with 6 additions and 0 deletions

View File

@ -417,7 +417,13 @@ public boolean checkout() throws IOException {
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);
}