mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -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(() =>
|
return Task.Run(() =>
|
||||||
{
|
{
|
||||||
var succ = false;
|
|
||||||
if (IsMergeCommit)
|
if (IsMergeCommit)
|
||||||
{
|
{
|
||||||
succ = new Commands.CherryPick(
|
new Commands.CherryPick(
|
||||||
_repo.FullPath,
|
_repo.FullPath,
|
||||||
Targets[0].SHA,
|
Targets[0].SHA,
|
||||||
!AutoCommit,
|
!AutoCommit,
|
||||||
|
@ -84,7 +83,7 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
succ = new Commands.CherryPick(
|
new Commands.CherryPick(
|
||||||
_repo.FullPath,
|
_repo.FullPath,
|
||||||
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
|
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
|
||||||
!AutoCommit,
|
!AutoCommit,
|
||||||
|
@ -93,7 +92,7 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
return succ;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
return Task.Run(() =>
|
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));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
return succ;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue