diff --git a/pkg/commands/git_commands/patch.go b/pkg/commands/git_commands/patch.go index c43dc0561..495d50ad6 100644 --- a/pkg/commands/git_commands/patch.go +++ b/pkg/commands/git_commands/patch.go @@ -259,7 +259,7 @@ func (self *PatchCommands) MovePatchIntoIndex(commits []*models.Commit, commitId } if stash { - if err := self.stash.Apply(0); err != nil { + if err := self.stash.Pop(0); err != nil { return err } } diff --git a/pkg/integration/tests/patch_building/move_to_index_with_modified_file.go b/pkg/integration/tests/patch_building/move_to_index_with_modified_file.go index b9af98d15..93aba6d41 100644 --- a/pkg/integration/tests/patch_building/move_to_index_with_modified_file.go +++ b/pkg/integration/tests/patch_building/move_to_index_with_modified_file.go @@ -54,11 +54,6 @@ var MoveToIndexWithModifiedFile = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Secondary(). Content(Contains("-1\n+11\n")) - /* EXPECTED: t.Views().Stash().IsEmpty() - ACTUAL: */ - t.Views().Stash().Lines( - Contains("Auto-stashing changes"), - ) }, })