Skip to content

Commit

Permalink
fix: version control panel - show correct state when a push is reject…
Browse files Browse the repository at this point in the history
…ed (#23)
  • Loading branch information
michaelcartner authored Feb 6, 2024
1 parent 8a88290 commit 6e514f2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ export function GitStatusButton({ openGitSettingsPopout }: GitStatusButtonProps)
});
} else {
ToastLayer.showError('Failed to push. ' + error);

// If the error is a rejected push, we need to fetch again to get the latest state where we can pull and rebase
if (error?.toString().includes('rejected')) {
await fetchRemote();
}
}

return;
Expand Down

0 comments on commit 6e514f2

Please sign in to comment.