while reworking the draft patch, I think I've found a bug that is unrelated to skipping conflicts. Could you run this snippet within the DirCacheCheckoutTest?
@Test
public void testSkipConflictsWithFolderFileConflict() throws Exception {
RevCommit headCommit = commitFile("f/a", "initial content", "master");
RevCommit checkoutCommit = commitFile("f/a", "side content", "side");
FileUtils.delete(new File(db.getWorkTree(), "f"), RECURSIVE);
writeTrashFile("f", "file instead of folder");
dco = new DirCacheCheckout(db, headCommit.getTree(), db.lockDirCache(),
checkoutCommit.getTree());
boolean checkoutOk = dco.checkout();
assertTrue(checkoutOk);
}
The outcome should probably be a CheckoutConflictException or silently override file 'f' depending on setFailOnConfict().
- Rüdiger
From: Matthias Sohn <matthias.sohn@xxxxxxxxx>
To: R�diger Herrmann <ruediger.herrmann@xxxxxx>
Cc: JGit Developers List <jgit-dev@xxxxxxxxxxx>
Sent: Thursday, June 9, 2016 8:53 PM
Subject: Re: [jgit-dev] Extend DirCacheCheckout to skip conflicts