mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
enhance: auto stash and re-apply local changes before squashing (#1141)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
67fb0b300f
commit
3275dd07d2
2 changed files with 20 additions and 13 deletions
|
@ -419,12 +419,6 @@ namespace SourceGit.ViewModels
|
|||
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
|
||||
squash.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_repo.CanCreatePopup())
|
||||
_repo.ShowPopup(new Squash(_repo, commit, commit.SHA));
|
||||
|
||||
|
@ -458,12 +452,6 @@ namespace SourceGit.ViewModels
|
|||
squash.IsEnabled = commit.Parents.Count == 1;
|
||||
squash.Click += (_, e) =>
|
||||
{
|
||||
if (_repo.LocalChangesCount > 0)
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (commit.Parents.Count == 1)
|
||||
{
|
||||
var parent = _commits.Find(x => x.SHA == commit.Parents[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue