mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: popup will be closed when cherry-pick
or revert
failed
This commit is contained in:
parent
0dd6692cd8
commit
a10f9e0dd0
2 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue