From 0b6ca9ab8c47879c516d16b2aa177909331242fa Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 30 Apr 2021 14:32:57 +0800 Subject: [PATCH] optimize: only run stash command when it's needed --- src/Views/Popups/Stash.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Popups/Stash.xaml.cs b/src/Views/Popups/Stash.xaml.cs index 0a48044e..17d7b649 100644 --- a/src/Views/Popups/Stash.xaml.cs +++ b/src/Views/Popups/Stash.xaml.cs @@ -44,7 +44,7 @@ namespace SourceGit.Views.Popups { } } - new Commands.Stash(repo).Push(changes, message); + if (jobs.Count > 0) new Commands.Stash(repo).Push(changes, message); Models.Watcher.SetEnabled(repo, true); return true; });