RevCommit topic = git.commit().setMessage("topic-1").call();
assertIndex(mkmap("f", "f()\nside", "G/i", "i()"));
+ writeTrashFile("untracked", "untracked");
+
resetHard(master);
assertIndex(mkmap("f", "f()\nmaster", "D/g", "g()\ng2()", "E/h", "h()"));
resetHard(topic);
assertIndex(mkmap("f", "f()\nside", "G/i", "i()"));
- assertWorkDir(mkmap("f", "f()\nside", "G/i", "i()"));
+ assertWorkDir(mkmap("f", "f()\nside", "G/i", "i()", "untracked",
+ "untracked"));
assertEquals(MergeStatus.CONFLICTING, git.merge().include(master)
.call().getMergeStatus());
resetHard(master);
assertIndex(mkmap("f", "f()\nmaster", "D/g", "g()\ng2()", "E/h", "h()"));
assertWorkDir(mkmap("f", "f()\nmaster", "D/g", "g()\ng2()", "E/h",
- "h()"));
+ "h()", "untracked", "untracked"));
}
private DirCacheCheckout resetHard(RevCommit commit)
remove(i.getEntryPathString());
conflicts.remove(i.getEntryPathString());
} else {
- // We are about to remove an untracked file. Check that
- // it is ignored - otherwise that's an conflict
- if (!f.isEntryIgnored())
- conflicts.add(walk.getPathString());
- else
- remove(f.getEntryPathString());
+ // untracked file, neither contained in tree to merge
+ // nor in index
}
}
} else {