Skip to content

Commit

Permalink
Merge pull request #17950 from GengShengJia/Fix-redundant-merge-statu…
Browse files Browse the repository at this point in the history
…s-updates

Fix redundant merge status updates
  • Loading branch information
tidy-dev authored Jan 3, 2024
2 parents 4a60eed + 931b826 commit 32e3525
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ export class MergeChooseBranchDialog extends BaseChooseBranchDialog {
return { kind: ComputedAction.Clean }
})

this.updateMergeStatusPreview(branch)
if (
this.mergeStatus.kind === ComputedAction.Conflicts ||
this.mergeStatus.kind === ComputedAction.Invalid
) {
this.updateMergeStatusPreview(branch)
// Because the clean status is the only one that needs the ahead/Behind count
// So if mergeState is conflicts or invalid, update the UI here and end the function
return
}
}

const range = revSymmetricDifference('', branch.name)
Expand Down

0 comments on commit 32e3525

Please sign in to comment.