JGitTestUtil.writeTrashFile(submodule_db, "fileInSubmodule", "2");
Git submoduleGit = Git.wrap(submodule_db);
submoduleGit.add().addFilepattern("fileInSubmodule").call();
IndexDiff indexDiff = new IndexDiff(db, Constants.HEAD,
new FileTreeIterator(db));
indexDiff.setIgnoreSubmoduleMode(mode);
if (mode.equals(IgnoreSubmoduleMode.ALL)
|| mode.equals(IgnoreSubmoduleMode.DIRTY))
assertFalse("diff should be false with mode=" + mode,
indexDiff.diff());