mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
enhance: forbid to rebase interactively if there're local changes
This commit is contained in:
parent
2d4f8709ca
commit
bf44c0d8cc
1 changed files with 6 additions and 0 deletions
|
@ -296,6 +296,12 @@ namespace SourceGit.ViewModels
|
|||
interactiveRebase.IsVisible = current.Head != commit.SHA;
|
||||
interactiveRebase.Click += (o, e) =>
|
||||
{
|
||||
if (_repo.WorkingCopyChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
var dialog = new Views.InteractiveRebase() { DataContext = new InteractiveRebase(_repo, current, commit) };
|
||||
dialog.ShowDialog(App.GetTopLevel() as Window);
|
||||
e.Handled = true;
|
||||
|
|
Loading…
Reference in a new issue