enhance: supports --skip while reverting commits

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

View file

@ -491,6 +491,29 @@ namespace SourceGit.ViewModels
}
}
public void SkipMerge()
{
if (_inProgressContext != null)
{
_repo.SetWatcherEnabled(false);
Task.Run(() =>
{
var succ = _inProgressContext.Skip();
Dispatcher.UIThread.Invoke(() =>
{
if (succ)
CommitMessage = string.Empty;
_repo.SetWatcherEnabled(true);
});
});
}
else
{
_repo.MarkWorkingCopyDirtyManually();
}
}
public void AbortMerge()
{
if (_inProgressContext != null)