enhance: ignore untracked files when calculate local changes in checkout/create branch/pull (#316)

This commit is contained in:
leo 2024-08-07 15:38:18 +08:00
parent 71c2ad989b
commit 8c16ded6bd
No known key found for this signature in database
5 changed files with 11 additions and 14 deletions

View file

@ -28,11 +28,11 @@ namespace SourceGit.ViewModels
_repo.SetWatcherEnabled(false);
ProgressDescription = $"Checkout '{Branch}' ...";
var hasLocalChanges = _repo.WorkingCopyChangesCount > 0;
return Task.Run(() =>
{
var changes = new Commands.QueryLocalChanges(_repo.FullPath, false).Result();
var needPopStash = false;
if (hasLocalChanges)
if (changes.Count > 0)
{
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
{