enhance: pop stash directly instead of apply+drop

This commit is contained in:
leo 2024-08-07 15:59:35 +08:00
parent 3bcf4e128e
commit 3609d46c1f
No known key found for this signature in database
2 changed files with 2 additions and 10 deletions

View file

@ -59,11 +59,7 @@ namespace SourceGit.ViewModels
if (needPopStash)
{
SetProgressDescription("Re-apply local changes...");
rs = new Commands.Stash(_repo.FullPath).Apply("stash@{0}");
if (rs)
{
rs = new Commands.Stash(_repo.FullPath).Drop("stash@{0}");
}
rs = new Commands.Stash(_repo.FullPath).Pop("stash@{0}");
}
CallUIThread(() => _repo.SetWatcherEnabled(true));

View file

@ -59,11 +59,7 @@ namespace SourceGit.ViewModels
if (needPopStash)
{
SetProgressDescription("Re-apply local changes...");
rs = new Commands.Stash(_repo.FullPath).Apply("stash@{0}");
if (rs)
{
rs = new Commands.Stash(_repo.FullPath).Drop("stash@{0}");
}
rs = new Commands.Stash(_repo.FullPath).Pop("stash@{0}");
}
CallUIThread(() => _repo.SetWatcherEnabled(true));