mirror of
https://github.com/desktop/desktop
synced 2024-09-19 08:02:22 +00:00
Merge pull request #11243 from desktop/something-about-einstein-and-doing-the-same-thing-over-and-over-again
Don't attempt to check out the currently checked out branch
This commit is contained in:
commit
2f6de415d3
|
@ -3060,6 +3060,11 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
const { tip } = branchesState
|
||||
const hasChanges = changesState.workingDirectory.files.length > 0
|
||||
|
||||
// No point in checking out the currently checked out branch.
|
||||
if (tip.kind === TipState.Valid && tip.branch.name === branch.name) {
|
||||
return repository
|
||||
}
|
||||
|
||||
let strategy = explicitStrategy ?? this.uncommittedChangesStrategy
|
||||
|
||||
// The user hasn't been presented with an explicit choice
|
||||
|
|
Loading…
Reference in a new issue