mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 18:30:34 +08:00
fix: prevent exception on repo with no commits/branches
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -1120,7 +1120,8 @@ namespace SourceGit.ViewModels
|
||||
if (_workingCopy != null)
|
||||
_workingCopy.HasRemotes = remotes.Count > 0;
|
||||
|
||||
GetOwnerPage()?.ChangeDirtyState(Models.DirtyState.HasPendingPullOrPush, !CurrentBranch.TrackStatus.IsVisible);
|
||||
var hasPendingPullOrPush = CurrentBranch?.TrackStatus.IsVisible ?? false;
|
||||
GetOwnerPage()?.ChangeDirtyState(Models.DirtyState.HasPendingPullOrPush, !hasPendingPullOrPush);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user