Libgit2sharp is throwing a CheckoutConflictException when I try to Pull

32 Views Asked by At

I am trying to deliberately create a merge conflict in my local workdir. I usually do this by modifying a file that has been also remotely modified by another user, and pulling the remote changes. But sometimes the library throws the CheckoutConflictException and I can't create that conflict.

                        PullOptions options = new PullOptions
                        {
                            FetchOptions = new FetchOptions { CredentialsProvider = (url, user, cred) => _credentials },
                            
                        };

                        pullStatus = Commands.Pull(_gitRepo, _authorCommit, options);

This is part of my Pull method. I can't figure out the inconsistency. Are there any properties that I can set in the PullOptions to bypass the exception and always pull the files if there are conflicts or not?

0

There are 0 best solutions below