mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -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.IsVisible = current.Head != commit.SHA;
|
||||||
interactiveRebase.Click += (o, e) =>
|
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) };
|
var dialog = new Views.InteractiveRebase() { DataContext = new InteractiveRebase(_repo, current, commit) };
|
||||||
dialog.ShowDialog(App.GetTopLevel() as Window);
|
dialog.ShowDialog(App.GetTopLevel() as Window);
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
|
Loading…
Reference in a new issue