mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
enhance: forbid to rebase interactively if there're local changes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user