enhance: popup will be closed when cherry-pick or revert failed

This commit is contained in:
leo 2024-12-11 15:27:00 +08:00
parent 0dd6692cd8
commit a10f9e0dd0
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View file

@ -72,10 +72,9 @@ namespace SourceGit.ViewModels
return Task.Run(() =>
{
var succ = false;
if (IsMergeCommit)
{
succ = new Commands.CherryPick(
new Commands.CherryPick(
_repo.FullPath,
Targets[0].SHA,
!AutoCommit,
@ -84,7 +83,7 @@ namespace SourceGit.ViewModels
}
else
{
succ = new Commands.CherryPick(
new Commands.CherryPick(
_repo.FullPath,
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
!AutoCommit,
@ -93,7 +92,7 @@ namespace SourceGit.ViewModels
}
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
return true;
});
}

View file

@ -31,9 +31,9 @@ namespace SourceGit.ViewModels
return Task.Run(() =>
{
var succ = new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
return true;
});
}