optimize<Stash>: only run stash command when it's needed

This commit is contained in:
leo 2021-04-30 14:32:57 +08:00
parent 5f5510e6d8
commit 0b6ca9ab8c

View file

@ -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;
});