Closed jdmansour closed 2 years ago
@jdmansour omg no such thing as too many tests! thank you so much for this, and apologies it took a while for me to get to it.
I've pushed a change that stops using Exceptions for flow control, but otherwise this Looks Great to me. I'll leave this open for a day or two to see if you (or others) have objections to my changes, but if not I'll merge!
@yuvipanda No problem, and thanks for getting back to this! Your change looks good, the original code was trying to be a bit too clever with the exception.
Thanks a lot, @jdmansour!
This pull request deals with the case where you have diverged branches - you delete a file remotely, and edit the same file locally, or vice versa. If the local change was committed previously, the sync will fail with
CONFLICT (modify/delete)
. See also https://github.com/jupyterhub/nbgitpuller/issues/265.What this does is, it checks for that error, and resolves it via
commit -a
(keeping all the local changes). This should be in line with the sync policy. We have tested this for about a week in production and so far it seems to work well.Please let me know if I'm adding too many tests :-) I think maybe I could squash some together if it is getting too much.