-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-sync: need to define behavior #228
Comments
I would say it works as intended. "abort" is supposed to get me out of the current mess, and back into a consistent state. The scenario you describe is consistent, although I agree not very nice. The better thing to do in this situation is "undo", which would do what you describe (reset the local branch back to its state before merging), or "continue", which would do the push and finish the sync. The first alternative (pushing to remote when aborting) seems counterintuitive to me, I wouldn't want to do it. This makes me think whether "abort" is something we want to support at all. I think "undo" and "continue" are better in most situations. |
To me you I agree pushing when aborting is weird, I think abort should reset the branch to how it then. |
To make "abort" consistent with how it works on Git, we could change it so that it tries to undo the currently running command as much as possible. I could see value in that, and even that this is better than the current behavior of leaving the user somewhere in the middle. The new command pattern implementation with undo list would make this trivial as well. |
Here is the test case:
This will run and I will end up with conflicts when merging the tracking branch.
If I abort the command, I am left with the feature branch being ahead of its remote branch (because it has the changes from the main branch brought in).
I think we either need to
or
The text was updated successfully, but these errors were encountered: