Skip to content

Commit 32bd9e6

Browse files
committed
Drop stash when successfully unstashing files after moving patch to index
1 parent 823aa64 commit 32bd9e6

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

pkg/commands/git_commands/patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func (self *PatchCommands) MovePatchIntoIndex(commits []*models.Commit, commitId
259259
}
260260

261261
if stash {
262-
if err := self.stash.Apply(0); err != nil {
262+
if err := self.stash.Pop(0); err != nil {
263263
return err
264264
}
265265
}

pkg/integration/tests/patch_building/move_to_index_with_modified_file.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ var MoveToIndexWithModifiedFile = NewIntegrationTest(NewIntegrationTestArgs{
5454
t.Views().Secondary().
5555
Content(Contains("-1\n+11\n"))
5656

57-
/* EXPECTED:
5857
t.Views().Stash().IsEmpty()
59-
ACTUAL: */
60-
t.Views().Stash().Lines(
61-
Contains("Auto-stashing changes"),
62-
)
6358
},
6459
})

0 commit comments

Comments
 (0)