the IOException which we currently throw. Good catch.
The checkout which you try needs to update the file f/a. But we can't
data. And overwriting unsaved data without asking the user is a no-go.
Please, commit your changes or stash them before you can switch branches.
On Sun, Jun 12, 2016 at 3:50 PM, R�diger Herrmann
<
ruediger.herrmann@xxxxxx> wrote:
> 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
>
> sounds good
>
> On Thu, Jun 9, 2016 at 5:57 PM, R�diger Herrmann <
ruediger.herrmann@xxxxxx>
> wrote:
>
> Hi,
>
> thanks for your feedback. The use case for this extension is to more easily
> deal with conflicting checkouts in a Git GUI tool. Currently, either the
> whole operation is rejected or it will override/delete all conflicting work
> directory entries, With a partially checked out conflicting commit where
> only the conflicting files are not checked out, users should be able to
> resolve the remaining conflicts in a compare/synchronize view if necessary.
>
> The workflow could be something like this:
> 1. user attempts to check out commit x
> 2. the tool figures out that there are conflicts and asks to check out all
> non-conflicting files
> 3. if the user agrees, the tool provides a compare/synchronize UI to resolve
> the remaining conflicts
>
> If you agree, I will work on the comments you gave and upload another patch
> for review.
>
> Best,
> 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 9:39 AM
> Subject: Re: [jgit-dev] Extend DirCacheCheckout to skip conflicts
>
> On Tue, Jun 7, 2016 at 7:36 PM, R�diger Herrmann <
ruediger.herrmann@xxxxxx>
> wrote:
>
> Dear JGit developers,
>
> I would like to extend the DirCacheCheckout so that it skips conflicting
> files during checkout. Given, the new property _skipConflicts_ is set to
> true, a conflicting file in the work directory would remain untouched. The
> entire checkout operation would be considered successful and getConflicts()
> would return the conflicting (not checked out) files.
>
> To better illustrate what the change is about, I have uploaded a draft patch
> to Gerrit:
>
https://git.eclipse.org/r/74814 [draft] Extend DirCacheCheckout to skip
> conflicting files
>
> Would you consider such an enhancement as generally useful and accept a
> patch therefore?
>
>
> sounds like a reasonable enhancement, I added comments on your change
>
> -Matthias
>
>
>
> _______________________________________________
> jgit-dev mailing list
>
jgit-dev@xxxxxxxxxxx> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
>
https://dev.eclipse.org/mailman/listinfo/jgit-dev>
>
>
>
>
> _______________________________________________
> jgit-dev mailing list
>
jgit-dev@xxxxxxxxxxx> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
>
https://dev.eclipse.org/mailman/listinfo/jgit-dev