code_style: use combined expr

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-10 17:09:57 +08:00
parent 5e303d43d4
commit aa1c8b1cc1
No known key found for this signature in database

View file

@ -237,9 +237,9 @@ namespace SourceGit.ViewModels
if (remoteBranch != null) if (remoteBranch != null)
{ {
// If there's a local branch that is tracking on this remote branch and it does not ahead of // If there's a local branch that is tracking on this remote branch and it does not ahead of
// its upstream, show `Create and Fast-Forward` popup. // its upstream, show `Checkout and Fast-Forward` popup.
var localBranch = _repo.Branches.Find(x => x.IsLocal && x.Upstream == remoteBranch.FullName); var localBranch = _repo.Branches.Find(x => x.IsLocal && x.Upstream == remoteBranch.FullName);
if (localBranch is { TrackStatus: { Ahead: { Count: 0 } } }) if (localBranch is { TrackStatus.Ahead.Count: 0 })
{ {
if (_repo.CanCreatePopup()) if (_repo.CanCreatePopup())
_repo.ShowPopup(new CheckoutAndFastForward(_repo, localBranch, remoteBranch)); _repo.ShowPopup(new CheckoutAndFastForward(_repo, localBranch, remoteBranch));