Repository navigation
Handle when checkout branch fails - #8076
probablycorey wants to merge 7 commits into
Conversation
Co-Authored-By: Markus Olsson <[email protected]> Co-Authored-By: Corey Johnson <[email protected]>
|
I think there is a problem with some of my assumptions, specifically "Was there an error (maybe a conflict or some other badness)" During my testing I was trying to get a checkout to fail, but I couldn't. I tried checking out a file with conflicts, and checking out a file with unstaged changes, but none of that caused |
|
I moved the logic from @niik's into another method. The only major difference is I removed the The user-facing experience with this is pretty minimal. It would ensure that popups remain open while the reentrant checkoutBranch is run. In my testing this wasn't noticeable, but maybe if it is a giant stash or checkout it would be more noticeable. One thing we did notice is how complicated |
|
Closing based on the findings described in #8099 |
Overview
Addresses #7617
One of the concerns in the issue above was that Desktop wasn't awaiting calls to
checkoutBranchIt turns out it is already awaiting, because
checkoutBranchreturns a promise toperformFailableOperationwhich returns a promise towithAuthenticatingUserwhich is awaited.But there is another concern raised in the issue. When a checking out a branch fails (because of conflicts or some other evil) Desktop should stashing the changes and checkout the branch again. This was happening as a side effect in the error handlers, but now it is handled explicitly in the
AppStore._checkoutBranchmethod.Speaking of the _checkoutBranch method, it's pretty long and tricky to follow. I created this pseudo code story to help me understand what the method is trying to do:
Now that I understand how it works I think I'll be able to clean up the method a bit (like #7609 describes) in a follow up PR.
Closes #7617
Description
Notes:
Hide whitespace changeson.