From c747de99fd1ff6da1e1fe78edac011ab89a00254 Mon Sep 17 00:00:00 2001 From: Nick Tobey Date: Thu, 27 Apr 2023 11:10:53 -0700 Subject: [PATCH] If any table deltas aren't adds, then workingSetContainsOnlyIgnoredTables is false. --- go/cmd/dolt/commands/stashcmds/stash.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/go/cmd/dolt/commands/stashcmds/stash.go b/go/cmd/dolt/commands/stashcmds/stash.go index b69aea1d5b..4bee6335cf 100644 --- a/go/cmd/dolt/commands/stashcmds/stash.go +++ b/go/cmd/dolt/commands/stashcmds/stash.go @@ -296,13 +296,14 @@ func workingSetContainsOnlyIgnoredTables(ctx context.Context, roots doltdb.Roots for _, tableDelta := range unstaged { if !(tableDelta.IsAdd()) { - isIgnored, err := ignorePatterns.IsTableNameIgnored(tableDelta.ToName) - if err != nil { - return false, err - } - if !isIgnored { - return false, nil - } + return false, nil + } + isIgnored, err := ignorePatterns.IsTableNameIgnored(tableDelta.ToName) + if err != nil { + return false, err + } + if !isIgnored { + return false, nil } }