fix: discarding changes with selected changes should never be traited as Discard all changes (#904)

This commit is contained in:
leo 2025-01-22 10:51:37 +08:00
parent 90c04f1db2
commit cb4ad63ba3
No known key found for this signature in database

View file

@ -417,12 +417,7 @@ namespace SourceGit.ViewModels
public void Discard(List<Models.Change> changes) public void Discard(List<Models.Change> changes)
{ {
if (_repo.CanCreatePopup()) if (_repo.CanCreatePopup())
{ _repo.ShowPopup(new Discard(_repo, changes));
if (changes.Count == _unstaged.Count && _staged.Count == 0)
_repo.ShowPopup(new Discard(_repo));
else
_repo.ShowPopup(new Discard(_repo, changes));
}
} }
public async void UseTheirs(List<Models.Change> changes) public async void UseTheirs(List<Models.Change> changes)