feature: add CurrentBranch property to ViewModels.Repository

This commit is contained in:
leo 2024-07-24 15:36:26 +08:00
parent f8caeceade
commit 6f317039ab
No known key found for this signature in database
4 changed files with 63 additions and 64 deletions

View file

@ -90,7 +90,7 @@ namespace SourceGit.ViewModels
{
if (SetProperty(ref _useAmend, value) && value)
{
var currentBranch = _repo.Branches.Find(x => x.IsCurrent);
var currentBranch = _repo.CurrentBranch;
if (currentBranch == null)
{
App.RaiseException(_repo.FullPath, "No commits to amend!!!");