mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-15 07:35:04 +00:00
fix: prevent exception on repo with no commits/branches
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
406ace9e79
commit
f04b0c5d97
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue