diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md
index f37326fe4..5fe50cfd8 100644
--- a/docs/keybindings/Keybindings_en.md
+++ b/docs/keybindings/Keybindings_en.md
@@ -125,7 +125,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
o: open file
i: add to .gitignore
r: refresh files
- s: stash changes
+ s: stash all changes
S: view stash options
a: stage/unstage all
enter: stage individual hunks/lines for file, or collapse/expand for directory
diff --git a/pkg/commands/git_commands/stash.go b/pkg/commands/git_commands/stash.go
index d20024aa9..c479d8610 100644
--- a/pkg/commands/git_commands/stash.go
+++ b/pkg/commands/git_commands/stash.go
@@ -38,7 +38,6 @@ func (self *StashCommands) Apply(index int) error {
}
// Save save stash
-// TODO: before calling this, check if there is anything to save
func (self *StashCommands) Save(message string) error {
return self.cmd.New("git stash save " + self.cmd.Quote(message)).Run()
}
@@ -49,6 +48,23 @@ func (self *StashCommands) ShowStashEntryCmdObj(index int) oscommands.ICmdObj {
return self.cmd.New(cmdStr).DontLog()
}
+func (self *StashCommands) StashAndKeepIndex(message string) error {
+ return self.cmd.New(fmt.Sprintf("git stash save %s --keep-index", self.cmd.Quote(message))).Run()
+}
+
+func (self *StashCommands) StashUnstagedChanges(message string) error {
+ if err := self.cmd.New("git commit --no-verify -m \"[lazygit] stashing unstaged changes\"").Run(); err != nil {
+ return err
+ }
+ if err := self.Save(message); err != nil {
+ return err
+ }
+ if err := self.cmd.New("git reset --soft HEAD^").Run(); err != nil {
+ return err
+ }
+ return nil
+}
+
// SaveStagedChanges stashes only the currently staged changes. This takes a few steps
// shoutouts to Joe on https://stackoverflow.com/questions/14759748/stashing-only-staged-changes-in-git-is-it-possible
func (self *StashCommands) SaveStagedChanges(message string) error {
diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go
index 764c9753b..26c6e131f 100644
--- a/pkg/gui/controllers/files_controller.go
+++ b/pkg/gui/controllers/files_controller.go
@@ -559,23 +559,46 @@ func (self *FilesController) createStashMenu() error {
{
DisplayString: self.c.Tr.LcStashAllChanges,
OnPress: func() error {
- return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges)
+ return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges, self.c.Tr.NoFilesToStash)
},
- Key: 's',
+ Key: 'a',
+ },
+ {
+ DisplayString: self.c.Tr.LcStashAllChangesKeepIndex,
+ OnPress: func() error {
+ // if there are no staged files it behaves the same as Stash.Save
+ return self.handleStashSave(self.git.Stash.StashAndKeepIndex, self.c.Tr.Actions.StashAllChangesKeepIndex, self.c.Tr.NoFilesToStash)
+ },
+ Key: 'i',
},
{
DisplayString: self.c.Tr.LcStashStagedChanges,
OnPress: func() error {
- return self.handleStashSave(self.git.Stash.SaveStagedChanges, self.c.Tr.Actions.StashStagedChanges)
+ // there must be something in staging otherwise the current implementation mucks the stash up
+ if !self.helpers.WorkingTree.AnyStagedFiles() {
+ return self.c.ErrorMsg(self.c.Tr.NoTrackedStagedFilesStash)
+ }
+ return self.handleStashSave(self.git.Stash.SaveStagedChanges, self.c.Tr.Actions.StashStagedChanges, self.c.Tr.NoTrackedStagedFilesStash)
},
- Key: 'S',
+ Key: 's',
+ },
+ {
+ DisplayString: self.c.Tr.LcStashUnstagedChanges,
+ OnPress: func() error {
+ if self.helpers.WorkingTree.AnyStagedFiles() {
+ return self.handleStashSave(self.git.Stash.StashUnstagedChanges, self.c.Tr.Actions.StashUnstagedChanges, self.c.Tr.NoFilesToStash)
+ }
+ // ordinary stash
+ return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashUnstagedChanges, self.c.Tr.NoFilesToStash)
+ },
+ Key: 'u',
},
},
})
}
func (self *FilesController) stash() error {
- return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges)
+ return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges, self.c.Tr.NoTrackedStagedFilesStash)
}
func (self *FilesController) createResetToUpstreamMenu() error {
@@ -603,9 +626,9 @@ func (self *FilesController) toggleTreeView() error {
return self.c.PostRefreshUpdate(self.context())
}
-func (self *FilesController) handleStashSave(stashFunc func(message string) error, action string) error {
+func (self *FilesController) handleStashSave(stashFunc func(message string) error, action string, errorMsg string) error {
if !self.helpers.WorkingTree.IsWorkingTreeDirty() {
- return self.c.ErrorMsg(self.c.Tr.NoTrackedStagedFilesStash)
+ return self.c.ErrorMsg(errorMsg)
}
return self.c.Prompt(types.PromptOpts{
diff --git a/pkg/i18n/chinese.go b/pkg/i18n/chinese.go
index 4dc2f9761..65436eaeb 100644
--- a/pkg/i18n/chinese.go
+++ b/pkg/i18n/chinese.go
@@ -282,7 +282,7 @@ func chineseTranslationSet() TranslationSet {
PressEnterToReturn: "按下 Enter 键返回 lazygit",
LcViewStashOptions: "查看贮藏选项",
LcStashAllChanges: "将所有更改加入贮藏",
- LcStashStagedChanges: "将已暂存的更改加入贮藏",
+ LcStashAllChangesKeepIndex: "将已暂存的更改加入贮藏",
LcStashOptions: "贮藏选项",
NotARepository: "错误:必须在 git 仓库中运行",
LcJump: "跳到面板",
diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go
index b8605b839..e069d1be1 100644
--- a/pkg/i18n/dutch.go
+++ b/pkg/i18n/dutch.go
@@ -245,7 +245,7 @@ func dutchTranslationSet() TranslationSet {
PressEnterToReturn: "Press om terug te gaan naar lazygit",
LcViewStashOptions: "bekijk stash opties",
LcStashAllChanges: "stash-bestanden",
- LcStashStagedChanges: "stash staged wijzigingen",
+ LcStashAllChangesKeepIndex: "stash staged wijzigingen",
LcStashOptions: "Stash opties",
NotARepository: "Fout: moet in een git repository uitgevoerd worden",
LcJump: "ga naar paneel",
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index aa3de764b..8b2837ef2 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -119,6 +119,7 @@ type TranslationSet struct {
StashApply string
SureApplyStashEntry string
NoTrackedStagedFilesStash string
+ NoFilesToStash string
StashChanges string
OpenConfig string
EditConfig string
@@ -276,6 +277,8 @@ type TranslationSet struct {
LcViewStashOptions string
LcStashAllChanges string
LcStashStagedChanges string
+ LcStashAllChangesKeepIndex string
+ LcStashUnstagedChanges string
LcStashOptions string
NotARepository string
LcJump string
@@ -550,7 +553,9 @@ type Actions struct {
Pull string
OpenFile string
StashAllChanges string
+ StashAllChangesKeepIndex string
StashStagedChanges string
+ StashUnstagedChanges string
GitFlowFinish string
GitFlowStart string
CopyToClipboard string
@@ -724,6 +729,7 @@ func EnglishTranslationSet() TranslationSet {
StashApply: "Stash apply",
SureApplyStashEntry: "Are you sure you want to apply this stash entry?",
NoTrackedStagedFilesStash: "You have no tracked/staged files to stash",
+ NoFilesToStash: "You have no files to stash",
StashChanges: "Stash changes",
OpenConfig: "open config file",
EditConfig: "edit config file",
@@ -880,8 +886,10 @@ func EnglishTranslationSet() TranslationSet {
LcResetTo: `reset to`,
PressEnterToReturn: "Press enter to return to lazygit",
LcViewStashOptions: "view stash options",
- LcStashAllChanges: "stash changes",
+ LcStashAllChanges: "stash all changes",
LcStashStagedChanges: "stash staged changes",
+ LcStashAllChangesKeepIndex: "stash all changes and keep index",
+ LcStashUnstagedChanges: "stash unstaged changes",
LcStashOptions: "Stash options",
NotARepository: "Error: must be run inside a git repository",
LcJump: "jump to panel",
@@ -1139,7 +1147,9 @@ func EnglishTranslationSet() TranslationSet {
Pull: "Pull",
OpenFile: "Open file",
StashAllChanges: "Stash all changes",
+ StashAllChangesKeepIndex: "Stash all changes and keep index",
StashStagedChanges: "Stash staged changes",
+ StashUnstagedChanges: "Stash unstaged changes",
GitFlowFinish: "Git flow finish",
GitFlowStart: "Git Flow start",
CopyToClipboard: "Copy to clipboard",
diff --git a/pkg/i18n/polish.go b/pkg/i18n/polish.go
index 61962c525..6b5026717 100644
--- a/pkg/i18n/polish.go
+++ b/pkg/i18n/polish.go
@@ -207,7 +207,7 @@ func polishTranslationSet() TranslationSet {
PressEnterToReturn: "Wciśnij enter żeby wrócić do lazygit",
LcViewStashOptions: "wyświetl opcje schowka",
LcStashAllChanges: "przechowaj zmiany",
- LcStashStagedChanges: "przechowaj zmiany z poczekalni",
+ LcStashAllChangesKeepIndex: "przechowaj zmiany z poczekalni",
LcStashOptions: "Opcje schowka",
NotARepository: "Błąd: nie jesteś w repozytorium",
LcJump: "przeskocz do panelu",
diff --git a/test/integration/stash/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stash/expected/repo/.git_keep/ORIG_HEAD
index 78e4eb58e..70b2d64a5 100644
--- a/test/integration/stash/expected/repo/.git_keep/ORIG_HEAD
+++ b/test/integration/stash/expected/repo/.git_keep/ORIG_HEAD
@@ -1 +1 @@
-f348ff60bdbb3695f2f519db6bc115b1b8d50886
+6b1f87e5b74cd77d755d213e0850f4de02b3cdce
diff --git a/test/integration/stash/expected/repo/.git_keep/config b/test/integration/stash/expected/repo/.git_keep/config
index 8ae104545..596ebaeb3 100644
--- a/test/integration/stash/expected/repo/.git_keep/config
+++ b/test/integration/stash/expected/repo/.git_keep/config
@@ -3,8 +3,6 @@
filemode = true
bare = false
logallrefupdates = true
- ignorecase = true
- precomposeunicode = true
[user]
email = CI@example.com
name = CI
diff --git a/test/integration/stash/expected/repo/.git_keep/index b/test/integration/stash/expected/repo/.git_keep/index
index daebfa4ef..1e08e2596 100644
Binary files a/test/integration/stash/expected/repo/.git_keep/index and b/test/integration/stash/expected/repo/.git_keep/index differ
diff --git a/test/integration/stash/expected/repo/.git_keep/info/exclude b/test/integration/stash/expected/repo/.git_keep/info/exclude
index 8e9f2071f..a5196d1be 100644
--- a/test/integration/stash/expected/repo/.git_keep/info/exclude
+++ b/test/integration/stash/expected/repo/.git_keep/info/exclude
@@ -4,4 +4,3 @@
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
-.DS_Store
diff --git a/test/integration/stash/expected/repo/.git_keep/logs/HEAD b/test/integration/stash/expected/repo/.git_keep/logs/HEAD
index f95cf06ac..d7185f04d 100644
--- a/test/integration/stash/expected/repo/.git_keep/logs/HEAD
+++ b/test/integration/stash/expected/repo/.git_keep/logs/HEAD
@@ -1,6 +1,5 @@
-0000000000000000000000000000000000000000 a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b CI 1643011553 +1100 commit (initial): file0
-a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b 4cc838ea1466afc5be1d3bc3e7a937641ec84d7d CI 1643011553 +1100 commit: file1
-4cc838ea1466afc5be1d3bc3e7a937641ec84d7d f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011553 +1100 commit: file2
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011556 +1100 reset: moving to HEAD
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011556 +1100 reset: moving to HEAD
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011558 +1100 reset: moving to HEAD
+0000000000000000000000000000000000000000 8c3123f6f4cee663b57398072df088c6f2dfeb9b CI 1650002552 +0200 commit (initial): file0
+8c3123f6f4cee663b57398072df088c6f2dfeb9b f7114350b59290905115d7918efe144eb2c62a76 CI 1650002552 +0200 commit: file1
+f7114350b59290905115d7918efe144eb2c62a76 6b1f87e5b74cd77d755d213e0850f4de02b3cdce CI 1650002552 +0200 commit: file2
+6b1f87e5b74cd77d755d213e0850f4de02b3cdce 6b1f87e5b74cd77d755d213e0850f4de02b3cdce CI 1650002559 +0200 reset: moving to HEAD
+6b1f87e5b74cd77d755d213e0850f4de02b3cdce 6b1f87e5b74cd77d755d213e0850f4de02b3cdce CI 1650002567 +0200 reset: moving to HEAD
diff --git a/test/integration/stash/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stash/expected/repo/.git_keep/logs/refs/heads/master
index d1bf421f8..cacae4d5c 100644
--- a/test/integration/stash/expected/repo/.git_keep/logs/refs/heads/master
+++ b/test/integration/stash/expected/repo/.git_keep/logs/refs/heads/master
@@ -1,3 +1,3 @@
-0000000000000000000000000000000000000000 a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b CI 1643011553 +1100 commit (initial): file0
-a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b 4cc838ea1466afc5be1d3bc3e7a937641ec84d7d CI 1643011553 +1100 commit: file1
-4cc838ea1466afc5be1d3bc3e7a937641ec84d7d f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011553 +1100 commit: file2
+0000000000000000000000000000000000000000 8c3123f6f4cee663b57398072df088c6f2dfeb9b CI 1650002552 +0200 commit (initial): file0
+8c3123f6f4cee663b57398072df088c6f2dfeb9b f7114350b59290905115d7918efe144eb2c62a76 CI 1650002552 +0200 commit: file1
+f7114350b59290905115d7918efe144eb2c62a76 6b1f87e5b74cd77d755d213e0850f4de02b3cdce CI 1650002552 +0200 commit: file2
diff --git a/test/integration/stash/expected/repo/.git_keep/logs/refs/stash b/test/integration/stash/expected/repo/.git_keep/logs/refs/stash
index 3f07cf22e..bcf0a385b 100644
--- a/test/integration/stash/expected/repo/.git_keep/logs/refs/stash
+++ b/test/integration/stash/expected/repo/.git_keep/logs/refs/stash
@@ -1,2 +1 @@
-0000000000000000000000000000000000000000 e09b4dfcd66bfa1c81feeaf67e04d55368a2b065 CI 1643011556 +1100 On master: asd
-e09b4dfcd66bfa1c81feeaf67e04d55368a2b065 2efac8148440778cbddcd80ac7477981277dcffe CI 1643011558 +1100 On master: asd
+0000000000000000000000000000000000000000 be485112173592dea7b39c7efc3a6f52f43b71b9 CI 1650002559 +0200 On master: asd
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc b/test/integration/stash/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc
deleted file mode 100644
index aab767a08..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe b/test/integration/stash/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe
deleted file mode 100644
index 54545b630..000000000
--- a/test/integration/stash/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe
+++ /dev/null
@@ -1 +0,0 @@
-xAj14v)%UV=$˴Pgątg{bOpF[`X,`L
˶eQMl,y.5\FTeHJ3H:!5ER[.nj|^/׳H
g2B@\:O'_o1ȣK
\ No newline at end of file
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a b/test/integration/stash/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a
deleted file mode 100644
index 1b8805172..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d b/test/integration/stash/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d
deleted file mode 100644
index bc099c320..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/4f/9ff661c6c81b54d631d6d7c71399972e5c7a58 b/test/integration/stash/expected/repo/.git_keep/objects/4f/9ff661c6c81b54d631d6d7c71399972e5c7a58
new file mode 100644
index 000000000..258a8ab01
--- /dev/null
+++ b/test/integration/stash/expected/repo/.git_keep/objects/4f/9ff661c6c81b54d631d6d7c71399972e5c7a58
@@ -0,0 +1,2 @@
+xK
+1D]I0aƽۢKֹѼxX\r6K068o%#cd-ev5ltpQBm̙ѓ',&N)'QmηU>O9V/!!ǰqF:YWm^cuYAbaA
\ No newline at end of file
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/6b/1f87e5b74cd77d755d213e0850f4de02b3cdce b/test/integration/stash/expected/repo/.git_keep/objects/6b/1f87e5b74cd77d755d213e0850f4de02b3cdce
new file mode 100644
index 000000000..51688c4dc
Binary files /dev/null and b/test/integration/stash/expected/repo/.git_keep/objects/6b/1f87e5b74cd77d755d213e0850f4de02b3cdce differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/81/f9f45d5eca6c23bf25b4a53172bcfb5ceb3963 b/test/integration/stash/expected/repo/.git_keep/objects/81/f9f45d5eca6c23bf25b4a53172bcfb5ceb3963
new file mode 100644
index 000000000..b2cb857d0
--- /dev/null
+++ b/test/integration/stash/expected/repo/.git_keep/objects/81/f9f45d5eca6c23bf25b4a53172bcfb5ceb3963
@@ -0,0 +1,2 @@
+x
+0E]+f/$c*"BW<&X0Mfvf6H8s"b!I@HZkd&Ǧ191IɁfUb,=i~KDTƌpF(:QŲ&>P*ˋBf
\ No newline at end of file
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/8c/3123f6f4cee663b57398072df088c6f2dfeb9b b/test/integration/stash/expected/repo/.git_keep/objects/8c/3123f6f4cee663b57398072df088c6f2dfeb9b
new file mode 100644
index 000000000..0ae4c30f4
--- /dev/null
+++ b/test/integration/stash/expected/repo/.git_keep/objects/8c/3123f6f4cee663b57398072df088c6f2dfeb9b
@@ -0,0 +1,3 @@
+xA
+0Fa9ԀU4)znպtdqR!'hP6'z{YY0?)
+6֒+
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6 b/test/integration/stash/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6
similarity index 100%
rename from test/integration/stashPop/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6
rename to test/integration/stash/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c b/test/integration/stash/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c
deleted file mode 100644
index 539f97919..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844 b/test/integration/stash/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844
deleted file mode 100644
index 0cdd88ea0..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844 and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b b/test/integration/stash/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b
deleted file mode 100644
index 9dcd075d6..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/be/485112173592dea7b39c7efc3a6f52f43b71b9 b/test/integration/stash/expected/repo/.git_keep/objects/be/485112173592dea7b39c7efc3a6f52f43b71b9
new file mode 100644
index 000000000..59e0babdb
Binary files /dev/null and b/test/integration/stash/expected/repo/.git_keep/objects/be/485112173592dea7b39c7efc3a6f52f43b71b9 differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/be/be684962b7b3a4d751f95173b31a051c7d46e7 b/test/integration/stash/expected/repo/.git_keep/objects/be/be684962b7b3a4d751f95173b31a051c7d46e7
new file mode 100644
index 000000000..99d6b4097
Binary files /dev/null and b/test/integration/stash/expected/repo/.git_keep/objects/be/be684962b7b3a4d751f95173b31a051c7d46e7 differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065 b/test/integration/stash/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065
deleted file mode 100644
index f57ce417b..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065 and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886 b/test/integration/stash/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886
deleted file mode 100644
index 8faee1fcd..000000000
Binary files a/test/integration/stash/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886 and /dev/null differ
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/f7/114350b59290905115d7918efe144eb2c62a76 b/test/integration/stash/expected/repo/.git_keep/objects/f7/114350b59290905115d7918efe144eb2c62a76
new file mode 100644
index 000000000..734e0f0c1
Binary files /dev/null and b/test/integration/stash/expected/repo/.git_keep/objects/f7/114350b59290905115d7918efe144eb2c62a76 differ
diff --git a/test/integration/stash/expected/repo/.git_keep/refs/heads/master b/test/integration/stash/expected/repo/.git_keep/refs/heads/master
index 78e4eb58e..70b2d64a5 100644
--- a/test/integration/stash/expected/repo/.git_keep/refs/heads/master
+++ b/test/integration/stash/expected/repo/.git_keep/refs/heads/master
@@ -1 +1 @@
-f348ff60bdbb3695f2f519db6bc115b1b8d50886
+6b1f87e5b74cd77d755d213e0850f4de02b3cdce
diff --git a/test/integration/stash/expected/repo/.git_keep/refs/stash b/test/integration/stash/expected/repo/.git_keep/refs/stash
index 9123248e5..e627ae765 100644
--- a/test/integration/stash/expected/repo/.git_keep/refs/stash
+++ b/test/integration/stash/expected/repo/.git_keep/refs/stash
@@ -1 +1 @@
-2efac8148440778cbddcd80ac7477981277dcffe
+be485112173592dea7b39c7efc3a6f52f43b71b9
diff --git a/test/integration/stash/expected/repo/file2 b/test/integration/stash/expected/repo/file2
index 180cf8328..c7c7da3c6 100644
--- a/test/integration/stash/expected/repo/file2
+++ b/test/integration/stash/expected/repo/file2
@@ -1 +1 @@
-test2
+hello there
diff --git a/test/integration/stash_Copy/expected/repo/file1 b/test/integration/stash/expected/repo/file3
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/file1
rename to test/integration/stash/expected/repo/file3
diff --git a/test/integration/stash/recording.json b/test/integration/stash/recording.json
index 48fc35158..cefefc363 100644
--- a/test/integration/stash/recording.json
+++ b/test/integration/stash/recording.json
@@ -1 +1 @@
-{"KeyEvents":[{"Timestamp":809,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1369,"Mod":0,"Key":256,"Ch":83},{"Timestamp":1713,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2087,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2376,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2440,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2512,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2793,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3498,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4113,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4785,"Mod":0,"Key":256,"Ch":115},{"Timestamp":5145,"Mod":0,"Key":256,"Ch":97},{"Timestamp":5183,"Mod":0,"Key":256,"Ch":115},{"Timestamp":5249,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5609,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6216,"Mod":0,"Key":259,"Ch":0},{"Timestamp":6457,"Mod":0,"Key":259,"Ch":0},{"Timestamp":6728,"Mod":0,"Key":259,"Ch":0},{"Timestamp":7098,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7408,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8080,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8752,"Mod":0,"Key":260,"Ch":0},{"Timestamp":8952,"Mod":0,"Key":260,"Ch":0},{"Timestamp":9145,"Mod":0,"Key":260,"Ch":0},{"Timestamp":9904,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
\ No newline at end of file
+{"KeyEvents":[{"Timestamp":1303,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1922,"Mod":0,"Key":256,"Ch":83},{"Timestamp":5480,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6417,"Mod":0,"Key":256,"Ch":97},{"Timestamp":6506,"Mod":0,"Key":256,"Ch":115},{"Timestamp":6549,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6874,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7610,"Mod":0,"Key":256,"Ch":53},{"Timestamp":9010,"Mod":0,"Key":256,"Ch":32},{"Timestamp":10032,"Mod":0,"Key":13,"Ch":13},{"Timestamp":10900,"Mod":0,"Key":256,"Ch":50},{"Timestamp":11662,"Mod":0,"Key":256,"Ch":107},{"Timestamp":12360,"Mod":0,"Key":256,"Ch":32},{"Timestamp":12902,"Mod":0,"Key":256,"Ch":115},{"Timestamp":13687,"Mod":0,"Key":256,"Ch":97},{"Timestamp":13772,"Mod":0,"Key":256,"Ch":115},{"Timestamp":13837,"Mod":0,"Key":256,"Ch":100},{"Timestamp":14294,"Mod":0,"Key":13,"Ch":13},{"Timestamp":15489,"Mod":0,"Key":256,"Ch":53},{"Timestamp":16960,"Mod":0,"Key":256,"Ch":103},{"Timestamp":17726,"Mod":0,"Key":13,"Ch":13},{"Timestamp":18592,"Mod":0,"Key":256,"Ch":50},{"Timestamp":19603,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":56}]}
\ No newline at end of file
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stashAllChanges/expected/repo/.git_keep/COMMIT_EDITMSG
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/COMMIT_EDITMSG
rename to test/integration/stashAllChanges/expected/repo/.git_keep/COMMIT_EDITMSG
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stashAllChanges/expected/repo/.git_keep/FETCH_HEAD
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/FETCH_HEAD
rename to test/integration/stashAllChanges/expected/repo/.git_keep/FETCH_HEAD
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/HEAD b/test/integration/stashAllChanges/expected/repo/.git_keep/HEAD
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/HEAD
rename to test/integration/stashAllChanges/expected/repo/.git_keep/HEAD
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashAllChanges/expected/repo/.git_keep/ORIG_HEAD
new file mode 100644
index 000000000..b6b4a34f7
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/ORIG_HEAD
@@ -0,0 +1 @@
+cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/config b/test/integration/stashAllChanges/expected/repo/.git_keep/config
similarity index 74%
rename from test/integration/stash_Copy/expected/repo/.git_keep/config
rename to test/integration/stashAllChanges/expected/repo/.git_keep/config
index 8ae104545..596ebaeb3 100644
--- a/test/integration/stash_Copy/expected/repo/.git_keep/config
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/config
@@ -3,8 +3,6 @@
filemode = true
bare = false
logallrefupdates = true
- ignorecase = true
- precomposeunicode = true
[user]
email = CI@example.com
name = CI
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/description b/test/integration/stashAllChanges/expected/repo/.git_keep/description
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/description
rename to test/integration/stashAllChanges/expected/repo/.git_keep/description
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/index b/test/integration/stashAllChanges/expected/repo/.git_keep/index
new file mode 100644
index 000000000..1d75c1b32
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/index differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/info/exclude b/test/integration/stashAllChanges/expected/repo/.git_keep/info/exclude
similarity index 96%
rename from test/integration/stash_Copy/expected/repo/.git_keep/info/exclude
rename to test/integration/stashAllChanges/expected/repo/.git_keep/info/exclude
index 8e9f2071f..a5196d1be 100644
--- a/test/integration/stash_Copy/expected/repo/.git_keep/info/exclude
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/info/exclude
@@ -4,4 +4,3 @@
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
-.DS_Store
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/logs/HEAD b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..f29e0fda8
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,6 @@
+0000000000000000000000000000000000000000 a52c63287cda99fcc917438c34ac8f9c67274d79 CI 1651830755 +0200 commit (initial): file0
+a52c63287cda99fcc917438c34ac8f9c67274d79 283a00085a0d95e814920f9eae7009789cee0eab CI 1651830755 +0200 commit: file1
+283a00085a0d95e814920f9eae7009789cee0eab cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c CI 1651830755 +0200 commit: file2
+cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c CI 1651830760 +0200 reset: moving to HEAD
+cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c CI 1651830769 +0200 reset: moving to HEAD
+cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c CI 1651830778 +0200 reset: moving to HEAD
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..3b9c06579
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 a52c63287cda99fcc917438c34ac8f9c67274d79 CI 1651830755 +0200 commit (initial): file0
+a52c63287cda99fcc917438c34ac8f9c67274d79 283a00085a0d95e814920f9eae7009789cee0eab CI 1651830755 +0200 commit: file1
+283a00085a0d95e814920f9eae7009789cee0eab cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c CI 1651830755 +0200 commit: file2
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/stash
new file mode 100644
index 000000000..a3a868578
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/logs/refs/stash
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 df9f3a300512205640e5ff10b624072a10afddde CI 1651830760 +0200 On master: stash all
+df9f3a300512205640e5ff10b624072a10afddde 6b8c369acb1897a5787e72b4c15d597d346f2b6a CI 1651830769 +0200 On master: stash newly tracked
+6b8c369acb1897a5787e72b4c15d597d346f2b6a 5a70ee314842fb5f46b452d16bc4d95e7154d4b4 CI 1651830778 +0200 On master: stash with staged
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/3a00085a0d95e814920f9eae7009789cee0eab b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/3a00085a0d95e814920f9eae7009789cee0eab
new file mode 100644
index 000000000..45c762814
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/3a00085a0d95e814920f9eae7009789cee0eab
@@ -0,0 +1,2 @@
+xK
+0@]$ɀU1N&X0=xpOcWj1%f_CnAjPlstf]8yDHP$DH2zg<|/Y
\N)zkA-/u9
\ No newline at end of file
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da
new file mode 100644
index 000000000..ea6cd3866
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
diff --git a/test/integration/stash/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68
similarity index 100%
rename from test/integration/stash/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/56/6ddc4a6a06724993b2a55fec3f696c47b9dcce b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/56/6ddc4a6a06724993b2a55fec3f696c47b9dcce
new file mode 100644
index 000000000..3aa0ef009
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/56/6ddc4a6a06724993b2a55fec3f696c47b9dcce differ
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/5a/70ee314842fb5f46b452d16bc4d95e7154d4b4 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/5a/70ee314842fb5f46b452d16bc4d95e7154d4b4
new file mode 100644
index 000000000..62afd0629
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/5a/70ee314842fb5f46b452d16bc4d95e7154d4b4 differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/65/e3f346ea03c8c2b0f1b8f6691abaed651fb77d b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/65/e3f346ea03c8c2b0f1b8f6691abaed651fb77d
new file mode 100644
index 000000000..2d46f6c29
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/65/e3f346ea03c8c2b0f1b8f6691abaed651fb77d
@@ -0,0 +1,3 @@
+x
+0E]+f/H("BWI2BӔo6TKhOmgNk#S$̈6Ā6OF;
RDtS*q8N*2Ya:LM>UwF*T
+FzYj)E=s1+zwi^X/-6Av
\ No newline at end of file
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/6b/8c369acb1897a5787e72b4c15d597d346f2b6a b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/6b/8c369acb1897a5787e72b4c15d597d346f2b6a
new file mode 100644
index 000000000..e0f637f62
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/6b/8c369acb1897a5787e72b4c15d597d346f2b6a
@@ -0,0 +1,2 @@
+xJ1a$Jjf5+R0{莨oo6>~8>ax*IcK6(PQUH*/wu 1bbRhIZϾZ86*WL%7D\X+FJJuqv8_|yo>_NIHh1\牡
+Op>z1Q
\ No newline at end of file
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6
new file mode 100644
index 000000000..2a1928079
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/8e/b0f6c64dea2004a684ea55f9589b71b45d76a6 differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/a5/2c63287cda99fcc917438c34ac8f9c67274d79 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/a5/2c63287cda99fcc917438c34ac8f9c67274d79
new file mode 100644
index 000000000..5edf24c6c
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/a5/2c63287cda99fcc917438c34ac8f9c67274d79 differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/cb/66567aecbd1ceb7caebf1c3a3d16db28f4a54c b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/cb/66567aecbd1ceb7caebf1c3a3d16db28f4a54c
new file mode 100644
index 000000000..fa0541d87
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/cb/66567aecbd1ceb7caebf1c3a3d16db28f4a54c differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
rename to test/integration/stashAllChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/df/9f3a300512205640e5ff10b624072a10afddde b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/df/9f3a300512205640e5ff10b624072a10afddde
new file mode 100644
index 000000000..ffb320769
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/df/9f3a300512205640e5ff10b624072a10afddde
@@ -0,0 +1,3 @@
+xϽJA`}ߞY.gNع=vGܴ꣠xk@iYm%SBEjk6+Dao,:>`lij4HӡP-QN5XjĘZ3Ҡ
+*
+ ,ҢBp?c5]pn<1|CsW87m$O
\ No newline at end of file
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/objects/e4/13783635b9870fae2e48d6e6dccbdce5ddb3ff b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/e4/13783635b9870fae2e48d6e6dccbdce5ddb3ff
new file mode 100644
index 000000000..cd8006b21
Binary files /dev/null and b/test/integration/stashAllChanges/expected/repo/.git_keep/objects/e4/13783635b9870fae2e48d6e6dccbdce5ddb3ff differ
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/refs/heads/master b/test/integration/stashAllChanges/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..b6b4a34f7
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+cb66567aecbd1ceb7caebf1c3a3d16db28f4a54c
diff --git a/test/integration/stashAllChanges/expected/repo/.git_keep/refs/stash b/test/integration/stashAllChanges/expected/repo/.git_keep/refs/stash
new file mode 100644
index 000000000..1b28de6fe
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/.git_keep/refs/stash
@@ -0,0 +1 @@
+5a70ee314842fb5f46b452d16bc4d95e7154d4b4
diff --git a/test/integration/stash_Copy/expected/repo/file0 b/test/integration/stashAllChanges/expected/repo/file0
similarity index 100%
rename from test/integration/stash_Copy/expected/repo/file0
rename to test/integration/stashAllChanges/expected/repo/file0
diff --git a/test/integration/stashAllChanges/expected/repo/file1 b/test/integration/stashAllChanges/expected/repo/file1
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/file1
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChanges/expected/repo/file2 b/test/integration/stashAllChanges/expected/repo/file2
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/file2
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChanges/expected/repo/file3 b/test/integration/stashAllChanges/expected/repo/file3
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChanges/expected/repo/file3
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChanges/recording.json b/test/integration/stashAllChanges/recording.json
new file mode 100644
index 000000000..f9c8f1305
--- /dev/null
+++ b/test/integration/stashAllChanges/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":1107,"Mod":0,"Key":256,"Ch":83},{"Timestamp":1736,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2531,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2623,"Mod":0,"Key":256,"Ch":116},{"Timestamp":2684,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2784,"Mod":0,"Key":256,"Ch":115},{"Timestamp":3312,"Mod":0,"Key":256,"Ch":104},{"Timestamp":3400,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3468,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3583,"Mod":0,"Key":256,"Ch":108},{"Timestamp":3716,"Mod":0,"Key":256,"Ch":108},{"Timestamp":3913,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4284,"Mod":0,"Key":256,"Ch":108},{"Timestamp":4420,"Mod":0,"Key":256,"Ch":108},{"Timestamp":4707,"Mod":0,"Key":256,"Ch":108},{"Timestamp":5231,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5940,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6733,"Mod":0,"Key":256,"Ch":50},{"Timestamp":7944,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8694,"Mod":0,"Key":256,"Ch":83},{"Timestamp":9487,"Mod":0,"Key":256,"Ch":97},{"Timestamp":9952,"Mod":0,"Key":256,"Ch":115},{"Timestamp":10041,"Mod":0,"Key":256,"Ch":116},{"Timestamp":10092,"Mod":0,"Key":256,"Ch":97},{"Timestamp":10166,"Mod":0,"Key":256,"Ch":115},{"Timestamp":10253,"Mod":0,"Key":256,"Ch":104},{"Timestamp":10381,"Mod":0,"Key":256,"Ch":32},{"Timestamp":10610,"Mod":0,"Key":256,"Ch":110},{"Timestamp":10718,"Mod":0,"Key":256,"Ch":101},{"Timestamp":10869,"Mod":0,"Key":256,"Ch":119},{"Timestamp":10938,"Mod":0,"Key":256,"Ch":108},{"Timestamp":11071,"Mod":0,"Key":256,"Ch":121},{"Timestamp":11129,"Mod":0,"Key":256,"Ch":32},{"Timestamp":11279,"Mod":0,"Key":256,"Ch":116},{"Timestamp":11676,"Mod":0,"Key":256,"Ch":114},{"Timestamp":11753,"Mod":0,"Key":256,"Ch":97},{"Timestamp":11874,"Mod":0,"Key":256,"Ch":99},{"Timestamp":11984,"Mod":0,"Key":256,"Ch":107},{"Timestamp":12025,"Mod":0,"Key":256,"Ch":101},{"Timestamp":12125,"Mod":0,"Key":256,"Ch":100},{"Timestamp":12341,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12925,"Mod":0,"Key":256,"Ch":53},{"Timestamp":14343,"Mod":0,"Key":256,"Ch":32},{"Timestamp":14871,"Mod":0,"Key":13,"Ch":13},{"Timestamp":15775,"Mod":0,"Key":256,"Ch":50},{"Timestamp":16168,"Mod":0,"Key":256,"Ch":106},{"Timestamp":16308,"Mod":0,"Key":256,"Ch":106},{"Timestamp":16515,"Mod":0,"Key":256,"Ch":32},{"Timestamp":16850,"Mod":0,"Key":256,"Ch":107},{"Timestamp":17159,"Mod":0,"Key":256,"Ch":32},{"Timestamp":18125,"Mod":0,"Key":256,"Ch":83},{"Timestamp":18639,"Mod":0,"Key":256,"Ch":97},{"Timestamp":18972,"Mod":0,"Key":256,"Ch":115},{"Timestamp":19060,"Mod":0,"Key":256,"Ch":116},{"Timestamp":19168,"Mod":0,"Key":256,"Ch":97},{"Timestamp":19236,"Mod":0,"Key":256,"Ch":115},{"Timestamp":19405,"Mod":0,"Key":256,"Ch":104},{"Timestamp":19593,"Mod":0,"Key":256,"Ch":32},{"Timestamp":19857,"Mod":0,"Key":256,"Ch":119},{"Timestamp":19942,"Mod":0,"Key":256,"Ch":105},{"Timestamp":20012,"Mod":0,"Key":256,"Ch":116},{"Timestamp":20072,"Mod":0,"Key":256,"Ch":104},{"Timestamp":20128,"Mod":0,"Key":256,"Ch":32},{"Timestamp":20188,"Mod":0,"Key":256,"Ch":115},{"Timestamp":20251,"Mod":0,"Key":256,"Ch":116},{"Timestamp":20335,"Mod":0,"Key":256,"Ch":97},{"Timestamp":20432,"Mod":0,"Key":256,"Ch":103},{"Timestamp":20471,"Mod":0,"Key":256,"Ch":101},{"Timestamp":20606,"Mod":0,"Key":256,"Ch":100},{"Timestamp":20789,"Mod":0,"Key":13,"Ch":13},{"Timestamp":21429,"Mod":0,"Key":256,"Ch":53},{"Timestamp":22402,"Mod":0,"Key":256,"Ch":32},{"Timestamp":23066,"Mod":0,"Key":13,"Ch":13},{"Timestamp":24259,"Mod":0,"Key":256,"Ch":104},{"Timestamp":24394,"Mod":0,"Key":256,"Ch":104},{"Timestamp":24532,"Mod":0,"Key":256,"Ch":104},{"Timestamp":24793,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":56}]}
diff --git a/test/integration/stash_Copy/setup.sh b/test/integration/stashAllChanges/setup.sh
similarity index 100%
rename from test/integration/stash_Copy/setup.sh
rename to test/integration/stashAllChanges/setup.sh
diff --git a/test/integration/stashAllChanges/test.json b/test/integration/stashAllChanges/test.json
new file mode 100644
index 000000000..645b63f7f
--- /dev/null
+++ b/test/integration/stashAllChanges/test.json
@@ -0,0 +1 @@
+{ "description": "Stashing all files", "speed": 5 }
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 000000000..6c493ff74
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1 @@
+file2
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/HEAD b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/ORIG_HEAD
new file mode 100644
index 000000000..5f3d4ba83
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/ORIG_HEAD
@@ -0,0 +1 @@
+056328ba39d0418acd7270389b9d5f253b98aabf
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/config b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/config
new file mode 100644
index 000000000..596ebaeb3
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[user]
+ email = CI@example.com
+ name = CI
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/description b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/index b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/index
new file mode 100644
index 000000000..168c7d44f
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/index differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/info/exclude b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/info/exclude
new file mode 100644
index 000000000..a5196d1be
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/HEAD b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..9861f89cf
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,4 @@
+0000000000000000000000000000000000000000 5c7a56ef74b1a692d67990b3f07a3af45a0e8f48 CI 1651830909 +0200 commit (initial): file0
+5c7a56ef74b1a692d67990b3f07a3af45a0e8f48 81f8f7653f26197f4f66641d6ab4ab99ac2a3391 CI 1651830909 +0200 commit: file1
+81f8f7653f26197f4f66641d6ab4ab99ac2a3391 056328ba39d0418acd7270389b9d5f253b98aabf CI 1651830909 +0200 commit: file2
+056328ba39d0418acd7270389b9d5f253b98aabf 056328ba39d0418acd7270389b9d5f253b98aabf CI 1651830915 +0200 reset: moving to HEAD
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..24c7e3201
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 5c7a56ef74b1a692d67990b3f07a3af45a0e8f48 CI 1651830909 +0200 commit (initial): file0
+5c7a56ef74b1a692d67990b3f07a3af45a0e8f48 81f8f7653f26197f4f66641d6ab4ab99ac2a3391 CI 1651830909 +0200 commit: file1
+81f8f7653f26197f4f66641d6ab4ab99ac2a3391 056328ba39d0418acd7270389b9d5f253b98aabf CI 1651830909 +0200 commit: file2
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/stash
new file mode 100644
index 000000000..a7bbabb68
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/logs/refs/stash
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 c87c87eb867338ed9956f6b28c8c3a83a1802c16 CI 1651830915 +0200 On master: keep index
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/05/6328ba39d0418acd7270389b9d5f253b98aabf b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/05/6328ba39d0418acd7270389b9d5f253b98aabf
new file mode 100644
index 000000000..31a2717bd
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/05/6328ba39d0418acd7270389b9d5f253b98aabf
@@ -0,0 +1,2 @@
+xA
+ @Ѯ=BqDG(U1
&=~sn?o-$C&!jJX+fD# wJ9%.'0l/}[BK.٫CYϩ.r*h~9
\ No newline at end of file
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
new file mode 100644
index 000000000..f74bf2335
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
new file mode 100644
index 000000000..79fcadf67
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
new file mode 100644
index 000000000..06c9cb73d
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/7a56ef74b1a692d67990b3f07a3af45a0e8f48 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/7a56ef74b1a692d67990b3f07a3af45a0e8f48
new file mode 100644
index 000000000..648edc330
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/7a56ef74b1a692d67990b3f07a3af45a0e8f48 differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
similarity index 72%
rename from test/integration/stash_Copy/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
rename to test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
index c84b87a17..6a6f24362 100644
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448 and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07 differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
similarity index 100%
rename from test/integration/stashDrop/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
rename to test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/81/f8f7653f26197f4f66641d6ab4ab99ac2a3391 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/81/f8f7653f26197f4f66641d6ab4ab99ac2a3391
new file mode 100644
index 000000000..a3abc271d
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/81/f8f7653f26197f4f66641d6ab4ab99ac2a3391 differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/99/bcc624e9c596901f0dd572be23ba5df84ec0d5 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/99/bcc624e9c596901f0dd572be23ba5df84ec0d5
new file mode 100644
index 000000000..7e40c36bb
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/99/bcc624e9c596901f0dd572be23ba5df84ec0d5 differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
new file mode 100644
index 000000000..0e95eb06d
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
new file mode 100644
index 000000000..285df3e5f
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
new file mode 100644
index 000000000..ee4385f12
Binary files /dev/null and b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a differ
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c8/7c87eb867338ed9956f6b28c8c3a83a1802c16 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c8/7c87eb867338ed9956f6b28c8c3a83a1802c16
new file mode 100644
index 000000000..8b929b556
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/c8/7c87eb867338ed9956f6b28c8c3a83a1802c16
@@ -0,0 +1 @@
+xAJ1a}RIg*8h6lܻ}|m'zPL{2ZiɉZ-1kCN sR5!sa)"yRkAđqT)b>!myJ^.7K?\$#xDuOo{g4;ඩRN+
\ No newline at end of file
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
new file mode 100644
index 000000000..2e9066287
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
@@ -0,0 +1,2 @@
+x+)JMU03c040031QHI5`ֶww.hT[H
+yW5Ɨ(|^-W(x9
\ No newline at end of file
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/heads/master b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..5f3d4ba83
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+056328ba39d0418acd7270389b9d5f253b98aabf
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/stash b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/stash
new file mode 100644
index 000000000..4a3424d55
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/.git_keep/refs/stash
@@ -0,0 +1 @@
+c87c87eb867338ed9956f6b28c8c3a83a1802c16
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/file0 b/test/integration/stashAllChangesKeepIndex/expected/repo/file0
new file mode 100644
index 000000000..38143ad4a
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/file0
@@ -0,0 +1 @@
+test0
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/file1 b/test/integration/stashAllChangesKeepIndex/expected/repo/file1
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/file1
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/file2 b/test/integration/stashAllChangesKeepIndex/expected/repo/file2
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/file2
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChangesKeepIndex/expected/repo/file3 b/test/integration/stashAllChangesKeepIndex/expected/repo/file3
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/expected/repo/file3
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashAllChangesKeepIndex/recording.json b/test/integration/stashAllChangesKeepIndex/recording.json
new file mode 100644
index 000000000..f9ae3f103
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":1343,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1895,"Mod":0,"Key":256,"Ch":83},{"Timestamp":3116,"Mod":0,"Key":256,"Ch":105},{"Timestamp":4389,"Mod":0,"Key":256,"Ch":107},{"Timestamp":4458,"Mod":0,"Key":256,"Ch":101},{"Timestamp":4571,"Mod":0,"Key":256,"Ch":101},{"Timestamp":4656,"Mod":0,"Key":256,"Ch":112},{"Timestamp":4742,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4834,"Mod":0,"Key":256,"Ch":105},{"Timestamp":4908,"Mod":0,"Key":256,"Ch":110},{"Timestamp":4965,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5013,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5162,"Mod":0,"Key":256,"Ch":120},{"Timestamp":5500,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6822,"Mod":0,"Key":256,"Ch":53},{"Timestamp":8093,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8985,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9950,"Mod":0,"Key":256,"Ch":49},{"Timestamp":10588,"Mod":0,"Key":256,"Ch":106},{"Timestamp":11171,"Mod":0,"Key":256,"Ch":50},{"Timestamp":11581,"Mod":0,"Key":256,"Ch":32},{"Timestamp":12392,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":56}]}
diff --git a/test/integration/stashAllChangesKeepIndex/setup.sh b/test/integration/stashAllChangesKeepIndex/setup.sh
new file mode 100644
index 000000000..caff56b7d
--- /dev/null
+++ b/test/integration/stashAllChangesKeepIndex/setup.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+cd $1
+
+git init
+
+git config user.email "CI@example.com"
+git config user.name "CI"
+
+echo test0 > file0
+git add .
+git commit -am file0
+
+echo test1 > file1
+git add .
+git commit -am file1
+
+echo test2 > file2
+git add .
+git commit -am file2
+
+echo "hello there" > file1
+echo "hello there" > file2
+echo "hello there" > file3
diff --git a/test/integration/stash_Copy/test.json b/test/integration/stashAllChangesKeepIndex/test.json
similarity index 100%
rename from test/integration/stash_Copy/test.json
rename to test/integration/stashAllChangesKeepIndex/test.json
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashDrop/expected/repo/.git_keep/ORIG_HEAD
index 0a7c9cc2b..11345d776 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/ORIG_HEAD
+++ b/test/integration/stashDrop/expected/repo/.git_keep/ORIG_HEAD
@@ -1 +1 @@
-d22496528fe3c076a668c496ae7ba1f8136f1614
+91a35446b7de806c46cd84a8574b2302443a5868
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/config b/test/integration/stashDrop/expected/repo/.git_keep/config
index 8ae104545..596ebaeb3 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/config
+++ b/test/integration/stashDrop/expected/repo/.git_keep/config
@@ -3,8 +3,6 @@
filemode = true
bare = false
logallrefupdates = true
- ignorecase = true
- precomposeunicode = true
[user]
email = CI@example.com
name = CI
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/index b/test/integration/stashDrop/expected/repo/.git_keep/index
index 44fe0833f..a201208c8 100644
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/index and b/test/integration/stashDrop/expected/repo/.git_keep/index differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/info/exclude b/test/integration/stashDrop/expected/repo/.git_keep/info/exclude
index 8e9f2071f..a5196d1be 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/info/exclude
+++ b/test/integration/stashDrop/expected/repo/.git_keep/info/exclude
@@ -4,4 +4,3 @@
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
-.DS_Store
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/logs/HEAD b/test/integration/stashDrop/expected/repo/.git_keep/logs/HEAD
index b2e6d1769..b3b2d9888 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/logs/HEAD
+++ b/test/integration/stashDrop/expected/repo/.git_keep/logs/HEAD
@@ -1,7 +1,4 @@
-0000000000000000000000000000000000000000 c00c9eb1ae239494475772c3f3dbae5ea4169575 CI 1643011799 +1100 commit (initial): file0
-c00c9eb1ae239494475772c3f3dbae5ea4169575 7605fecac5dee01fb9df55ca984dcc7a72810f48 CI 1643011799 +1100 commit: file1
-7605fecac5dee01fb9df55ca984dcc7a72810f48 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011799 +1100 commit: file2
-d22496528fe3c076a668c496ae7ba1f8136f1614 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011803 +1100 reset: moving to HEAD
-d22496528fe3c076a668c496ae7ba1f8136f1614 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011803 +1100 reset: moving to HEAD
-d22496528fe3c076a668c496ae7ba1f8136f1614 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011806 +1100 reset: moving to HEAD
-d22496528fe3c076a668c496ae7ba1f8136f1614 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011806 +1100 reset: moving to HEAD
+0000000000000000000000000000000000000000 bea28eaac7bdaf99371daf5b9a788061a12308f4 CI 1650270506 +0200 commit (initial): file0
+bea28eaac7bdaf99371daf5b9a788061a12308f4 0e84352ca8531152e477715812e6e275d986984e CI 1650270506 +0200 commit: file1
+0e84352ca8531152e477715812e6e275d986984e 91a35446b7de806c46cd84a8574b2302443a5868 CI 1650270506 +0200 commit: file2
+91a35446b7de806c46cd84a8574b2302443a5868 91a35446b7de806c46cd84a8574b2302443a5868 CI 1650270506 +0200 reset: moving to HEAD
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/heads/master
index 62c5e5c79..06a7a9d1d 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/heads/master
+++ b/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/heads/master
@@ -1,3 +1,3 @@
-0000000000000000000000000000000000000000 c00c9eb1ae239494475772c3f3dbae5ea4169575 CI 1643011799 +1100 commit (initial): file0
-c00c9eb1ae239494475772c3f3dbae5ea4169575 7605fecac5dee01fb9df55ca984dcc7a72810f48 CI 1643011799 +1100 commit: file1
-7605fecac5dee01fb9df55ca984dcc7a72810f48 d22496528fe3c076a668c496ae7ba1f8136f1614 CI 1643011799 +1100 commit: file2
+0000000000000000000000000000000000000000 bea28eaac7bdaf99371daf5b9a788061a12308f4 CI 1650270506 +0200 commit (initial): file0
+bea28eaac7bdaf99371daf5b9a788061a12308f4 0e84352ca8531152e477715812e6e275d986984e CI 1650270506 +0200 commit: file1
+0e84352ca8531152e477715812e6e275d986984e 91a35446b7de806c46cd84a8574b2302443a5868 CI 1650270506 +0200 commit: file2
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/stash
deleted file mode 100644
index 0b47b5c2e..000000000
--- a/test/integration/stashDrop/expected/repo/.git_keep/logs/refs/stash
+++ /dev/null
@@ -1 +0,0 @@
-0000000000000000000000000000000000000000 f4f81b6542e98a2f80269449674b0f8f454b74b0 CI 1643011806 +1100 On master: dsa
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/0e/84352ca8531152e477715812e6e275d986984e b/test/integration/stashDrop/expected/repo/.git_keep/objects/0e/84352ca8531152e477715812e6e275d986984e
new file mode 100644
index 000000000..ad8496326
--- /dev/null
+++ b/test/integration/stashDrop/expected/repo/.git_keep/objects/0e/84352ca8531152e477715812e6e275d986984e
@@ -0,0 +1,3 @@
+xM
+0F]2πU1LR"x|sW<ރm[6h/RdFf@b"[]lahՉu=:wEf!T*5DPR
}k?44?K۱ʍM`
+@
:NuSWmYŨ/:2
\ No newline at end of file
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/1e/6f4a55f3dd26848238337763f249681ef9397b b/test/integration/stashDrop/expected/repo/.git_keep/objects/1e/6f4a55f3dd26848238337763f249681ef9397b
deleted file mode 100644
index 24145cefe..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/1e/6f4a55f3dd26848238337763f249681ef9397b and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68 b/test/integration/stashDrop/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68
deleted file mode 100644
index 8535af67c..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68 and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/5a/0e5672e3ccb264c401de9b84957c53138cd32c b/test/integration/stashDrop/expected/repo/.git_keep/objects/5a/0e5672e3ccb264c401de9b84957c53138cd32c
new file mode 100644
index 000000000..08f8bb690
Binary files /dev/null and b/test/integration/stashDrop/expected/repo/.git_keep/objects/5a/0e5672e3ccb264c401de9b84957c53138cd32c differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/6d/c07da80aed51d01a56a89ef37f4411adbd75c5 b/test/integration/stashDrop/expected/repo/.git_keep/objects/6d/c07da80aed51d01a56a89ef37f4411adbd75c5
deleted file mode 100644
index 6d84f0e3f..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/6d/c07da80aed51d01a56a89ef37f4411adbd75c5 and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/75/a47f9be3d041530e975683cde13a62ddc65007 b/test/integration/stashDrop/expected/repo/.git_keep/objects/75/a47f9be3d041530e975683cde13a62ddc65007
new file mode 100644
index 000000000..e3f498c19
--- /dev/null
+++ b/test/integration/stashDrop/expected/repo/.git_keep/objects/75/a47f9be3d041530e975683cde13a62ddc65007
@@ -0,0 +1,2 @@
+x=j1@s
+ ے[m3Ȳ
aƁ?ӤO ̀"IZ.klI314bZ618 Lkj1*Em$sz c,hZ}$%tJT8)uy;\ozۏ^t7p'dq991|x@8w>_*+M
\ No newline at end of file
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/76/05fecac5dee01fb9df55ca984dcc7a72810f48 b/test/integration/stashDrop/expected/repo/.git_keep/objects/76/05fecac5dee01fb9df55ca984dcc7a72810f48
deleted file mode 100644
index 782d5f0ee..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/76/05fecac5dee01fb9df55ca984dcc7a72810f48 and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/91/a35446b7de806c46cd84a8574b2302443a5868 b/test/integration/stashDrop/expected/repo/.git_keep/objects/91/a35446b7de806c46cd84a8574b2302443a5868
new file mode 100644
index 000000000..a216ac57d
Binary files /dev/null and b/test/integration/stashDrop/expected/repo/.git_keep/objects/91/a35446b7de806c46cd84a8574b2302443a5868 differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c b/test/integration/stashDrop/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c
deleted file mode 100644
index 539f97919..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/a6/ed180e13649885eed39866051ca0e25c0ad6ac b/test/integration/stashDrop/expected/repo/.git_keep/objects/a6/ed180e13649885eed39866051ca0e25c0ad6ac
deleted file mode 100644
index 20498e40d..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/a6/ed180e13649885eed39866051ca0e25c0ad6ac and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/be/a28eaac7bdaf99371daf5b9a788061a12308f4 b/test/integration/stashDrop/expected/repo/.git_keep/objects/be/a28eaac7bdaf99371daf5b9a788061a12308f4
new file mode 100644
index 000000000..3ed6793af
Binary files /dev/null and b/test/integration/stashDrop/expected/repo/.git_keep/objects/be/a28eaac7bdaf99371daf5b9a788061a12308f4 differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/c0/0c9eb1ae239494475772c3f3dbae5ea4169575 b/test/integration/stashDrop/expected/repo/.git_keep/objects/c0/0c9eb1ae239494475772c3f3dbae5ea4169575
deleted file mode 100644
index 3a5979b5c..000000000
--- a/test/integration/stashDrop/expected/repo/.git_keep/objects/c0/0c9eb1ae239494475772c3f3dbae5ea4169575
+++ /dev/null
@@ -1,2 +0,0 @@
-xA
-0Fa9I#i`R"x|{tS1Yr!VToPS.}ki>NO|S{[{X$Yt]]V?+
\ No newline at end of file
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/d2/2496528fe3c076a668c496ae7ba1f8136f1614 b/test/integration/stashDrop/expected/repo/.git_keep/objects/d2/2496528fe3c076a668c496ae7ba1f8136f1614
deleted file mode 100644
index ce64e7f52..000000000
--- a/test/integration/stashDrop/expected/repo/.git_keep/objects/d2/2496528fe3c076a668c496ae7ba1f8136f1614
+++ /dev/null
@@ -1,3 +0,0 @@
-x1
-0@>B8BC%\#tV<})gEpg=ɝ-0V:
\ No newline at end of file
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/e0/61c8716830532562f919dcb125ea804f87ca2b b/test/integration/stashDrop/expected/repo/.git_keep/objects/e0/61c8716830532562f919dcb125ea804f87ca2b
deleted file mode 100644
index 57420d027..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/e0/61c8716830532562f919dcb125ea804f87ca2b and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/e5/cef1a548f3613b3e538bd0fc2b4ec88043fc25 b/test/integration/stashDrop/expected/repo/.git_keep/objects/e5/cef1a548f3613b3e538bd0fc2b4ec88043fc25
deleted file mode 100644
index 965e28b60..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/e5/cef1a548f3613b3e538bd0fc2b4ec88043fc25 and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/objects/f4/f81b6542e98a2f80269449674b0f8f454b74b0 b/test/integration/stashDrop/expected/repo/.git_keep/objects/f4/f81b6542e98a2f80269449674b0f8f454b74b0
deleted file mode 100644
index 0c09e49d2..000000000
Binary files a/test/integration/stashDrop/expected/repo/.git_keep/objects/f4/f81b6542e98a2f80269449674b0f8f454b74b0 and /dev/null differ
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/refs/heads/master b/test/integration/stashDrop/expected/repo/.git_keep/refs/heads/master
index 0a7c9cc2b..11345d776 100644
--- a/test/integration/stashDrop/expected/repo/.git_keep/refs/heads/master
+++ b/test/integration/stashDrop/expected/repo/.git_keep/refs/heads/master
@@ -1 +1 @@
-d22496528fe3c076a668c496ae7ba1f8136f1614
+91a35446b7de806c46cd84a8574b2302443a5868
diff --git a/test/integration/stashDrop/expected/repo/.git_keep/refs/stash b/test/integration/stashDrop/expected/repo/.git_keep/refs/stash
deleted file mode 100644
index 0a4ae7ab5..000000000
--- a/test/integration/stashDrop/expected/repo/.git_keep/refs/stash
+++ /dev/null
@@ -1 +0,0 @@
-f4f81b6542e98a2f80269449674b0f8f454b74b0
diff --git a/test/integration/stashDrop/expected/repo/file2 b/test/integration/stashDrop/expected/repo/file2
index c7c7da3c6..180cf8328 100644
--- a/test/integration/stashDrop/expected/repo/file2
+++ b/test/integration/stashDrop/expected/repo/file2
@@ -1 +1 @@
-hello there
+test2
diff --git a/test/integration/stashDrop/expected/repo/file3 b/test/integration/stashDrop/expected/repo/file3
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashDrop/expected/repo/file3
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashDrop/recording.json b/test/integration/stashDrop/recording.json
index c61c97b24..b3aa3e738 100644
--- a/test/integration/stashDrop/recording.json
+++ b/test/integration/stashDrop/recording.json
@@ -1 +1 @@
-{"KeyEvents":[{"Timestamp":1329,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2003,"Mod":0,"Key":256,"Ch":83},{"Timestamp":2466,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2754,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2979,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3051,"Mod":0,"Key":256,"Ch":115},{"Timestamp":3081,"Mod":0,"Key":256,"Ch":100},{"Timestamp":3386,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3961,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4186,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4906,"Mod":0,"Key":256,"Ch":83},{"Timestamp":5394,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5626,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6002,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6066,"Mod":0,"Key":256,"Ch":115},{"Timestamp":6113,"Mod":0,"Key":256,"Ch":97},{"Timestamp":6378,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6842,"Mod":0,"Key":259,"Ch":0},{"Timestamp":7074,"Mod":0,"Key":259,"Ch":0},{"Timestamp":7315,"Mod":0,"Key":259,"Ch":0},{"Timestamp":7714,"Mod":0,"Key":258,"Ch":0},{"Timestamp":8114,"Mod":0,"Key":256,"Ch":100},{"Timestamp":8546,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9379,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
\ No newline at end of file
+{"KeyEvents":[{"Timestamp":767,"Mod":0,"Key":256,"Ch":53},{"Timestamp":1706,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2841,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3906,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":55}]}
\ No newline at end of file
diff --git a/test/integration/stashDrop/setup.sh b/test/integration/stashDrop/setup.sh
index caff56b7d..2278d53d8 100644
--- a/test/integration/stashDrop/setup.sh
+++ b/test/integration/stashDrop/setup.sh
@@ -24,3 +24,5 @@ git commit -am file2
echo "hello there" > file1
echo "hello there" > file2
echo "hello there" > file3
+
+git stash save "stash to drop"
diff --git a/test/integration/stashPop/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashPop/expected/repo/.git_keep/ORIG_HEAD
index 8e8f6abd0..3823b7b86 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/ORIG_HEAD
+++ b/test/integration/stashPop/expected/repo/.git_keep/ORIG_HEAD
@@ -1 +1 @@
-8634432ef171aa4b8d8e688fc1e5645245bf36ac
+f9bd523df842e6b52de8880c366f7d15d6bab650
diff --git a/test/integration/stashPop/expected/repo/.git_keep/config b/test/integration/stashPop/expected/repo/.git_keep/config
index 8ae104545..596ebaeb3 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/config
+++ b/test/integration/stashPop/expected/repo/.git_keep/config
@@ -3,8 +3,6 @@
filemode = true
bare = false
logallrefupdates = true
- ignorecase = true
- precomposeunicode = true
[user]
email = CI@example.com
name = CI
diff --git a/test/integration/stashPop/expected/repo/.git_keep/index b/test/integration/stashPop/expected/repo/.git_keep/index
index 1c25c6cf6..667aead25 100644
Binary files a/test/integration/stashPop/expected/repo/.git_keep/index and b/test/integration/stashPop/expected/repo/.git_keep/index differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/info/exclude b/test/integration/stashPop/expected/repo/.git_keep/info/exclude
index 8e9f2071f..a5196d1be 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/info/exclude
+++ b/test/integration/stashPop/expected/repo/.git_keep/info/exclude
@@ -4,4 +4,3 @@
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
-.DS_Store
diff --git a/test/integration/stashPop/expected/repo/.git_keep/logs/HEAD b/test/integration/stashPop/expected/repo/.git_keep/logs/HEAD
index 36f584bdf..f205db06f 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/logs/HEAD
+++ b/test/integration/stashPop/expected/repo/.git_keep/logs/HEAD
@@ -1,7 +1,4 @@
-0000000000000000000000000000000000000000 8b081dcb0e1fd5e9862d1aa6891b805b101abe7b CI 1643011851 +1100 commit (initial): file0
-8b081dcb0e1fd5e9862d1aa6891b805b101abe7b 3ae4e5d4920afbb1bac23426afb237524c8dbe41 CI 1643011851 +1100 commit: file1
-3ae4e5d4920afbb1bac23426afb237524c8dbe41 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011852 +1100 commit: file2
-8634432ef171aa4b8d8e688fc1e5645245bf36ac 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011854 +1100 reset: moving to HEAD
-8634432ef171aa4b8d8e688fc1e5645245bf36ac 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011854 +1100 reset: moving to HEAD
-8634432ef171aa4b8d8e688fc1e5645245bf36ac 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011856 +1100 reset: moving to HEAD
-8634432ef171aa4b8d8e688fc1e5645245bf36ac 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011856 +1100 reset: moving to HEAD
+0000000000000000000000000000000000000000 4a80cc4f1537d7ce4f184f346c9ba7c51bb34aee CI 1650270548 +0200 commit (initial): file0
+4a80cc4f1537d7ce4f184f346c9ba7c51bb34aee f26e5e813038fe0c31c4733d57fcf93758736e71 CI 1650270548 +0200 commit: file1
+f26e5e813038fe0c31c4733d57fcf93758736e71 f9bd523df842e6b52de8880c366f7d15d6bab650 CI 1650270548 +0200 commit: file2
+f9bd523df842e6b52de8880c366f7d15d6bab650 f9bd523df842e6b52de8880c366f7d15d6bab650 CI 1650270548 +0200 reset: moving to HEAD
diff --git a/test/integration/stashPop/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashPop/expected/repo/.git_keep/logs/refs/heads/master
index 5493552ad..f3893791a 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/logs/refs/heads/master
+++ b/test/integration/stashPop/expected/repo/.git_keep/logs/refs/heads/master
@@ -1,3 +1,3 @@
-0000000000000000000000000000000000000000 8b081dcb0e1fd5e9862d1aa6891b805b101abe7b CI 1643011851 +1100 commit (initial): file0
-8b081dcb0e1fd5e9862d1aa6891b805b101abe7b 3ae4e5d4920afbb1bac23426afb237524c8dbe41 CI 1643011851 +1100 commit: file1
-3ae4e5d4920afbb1bac23426afb237524c8dbe41 8634432ef171aa4b8d8e688fc1e5645245bf36ac CI 1643011852 +1100 commit: file2
+0000000000000000000000000000000000000000 4a80cc4f1537d7ce4f184f346c9ba7c51bb34aee CI 1650270548 +0200 commit (initial): file0
+4a80cc4f1537d7ce4f184f346c9ba7c51bb34aee f26e5e813038fe0c31c4733d57fcf93758736e71 CI 1650270548 +0200 commit: file1
+f26e5e813038fe0c31c4733d57fcf93758736e71 f9bd523df842e6b52de8880c366f7d15d6bab650 CI 1650270548 +0200 commit: file2
diff --git a/test/integration/stashPop/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashPop/expected/repo/.git_keep/logs/refs/stash
deleted file mode 100644
index 4a66ec164..000000000
--- a/test/integration/stashPop/expected/repo/.git_keep/logs/refs/stash
+++ /dev/null
@@ -1 +0,0 @@
-0000000000000000000000000000000000000000 437b9b0ca941f1e12c8b45958f5d6ebd11cdd41a CI 1643011856 +1100 On master: asd
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/2d/79a3b4f905a83d994f860d3d91625fab899422 b/test/integration/stashPop/expected/repo/.git_keep/objects/2d/79a3b4f905a83d994f860d3d91625fab899422
new file mode 100644
index 000000000..947808f26
--- /dev/null
+++ b/test/integration/stashPop/expected/repo/.git_keep/objects/2d/79a3b4f905a83d994f860d3d91625fab899422
@@ -0,0 +1 @@
+xJ1a$aV**F0;o6>m9C~&ZH"Ĺh jjtlդmCTXG5 K4&cUiIW5=/ӌ$Ziy\ozK^o`&|glk]Sɷt:9=P6
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/3a/e4e5d4920afbb1bac23426afb237524c8dbe41 b/test/integration/stashPop/expected/repo/.git_keep/objects/3a/e4e5d4920afbb1bac23426afb237524c8dbe41
deleted file mode 100644
index aa0e72eed..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/3a/e4e5d4920afbb1bac23426afb237524c8dbe41 and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/42/ffa95ec8ce68b4bf04d4dab6c03283e61f4bda b/test/integration/stashPop/expected/repo/.git_keep/objects/42/ffa95ec8ce68b4bf04d4dab6c03283e61f4bda
new file mode 100644
index 000000000..425c6c04d
--- /dev/null
+++ b/test/integration/stashPop/expected/repo/.git_keep/objects/42/ffa95ec8ce68b4bf04d4dab6c03283e61f4bda
@@ -0,0 +1,3 @@
+x
+0D=+.HmUDIv-5B?\{72U@Ou92c1;ɞa&]
+bǙz-r; :gc*|ka>O9Bf<=Y֪Mʟs5-,ngy8Bj
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/43/7b9b0ca941f1e12c8b45958f5d6ebd11cdd41a b/test/integration/stashPop/expected/repo/.git_keep/objects/43/7b9b0ca941f1e12c8b45958f5d6ebd11cdd41a
deleted file mode 100644
index 38198edd1..000000000
--- a/test/integration/stashPop/expected/repo/.git_keep/objects/43/7b9b0ca941f1e12c8b45958f5d6ebd11cdd41a
+++ /dev/null
@@ -1 +0,0 @@
-xϱj1E%YWJ dgm\M|_1>gOswTDɍkX[nfPID)znjfTj,đ$V|&MdAՆyr
lܿn-PDe 'D=~cJ)
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/4a/80cc4f1537d7ce4f184f346c9ba7c51bb34aee b/test/integration/stashPop/expected/repo/.git_keep/objects/4a/80cc4f1537d7ce4f184f346c9ba7c51bb34aee
new file mode 100644
index 000000000..6f2666e32
--- /dev/null
+++ b/test/integration/stashPop/expected/repo/.git_keep/objects/4a/80cc4f1537d7ce4f184f346c9ba7c51bb34aee
@@ -0,0 +1,2 @@
+xA
+ F=eF(U"`!oヷZNZ4p>rֻ5C*Rؤ\LALi~uXZI;ƳlUIǟ\ul+
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/82/cc524693ae9fb40af0ed8ab7e22581084dcd17 b/test/integration/stashPop/expected/repo/.git_keep/objects/82/cc524693ae9fb40af0ed8ab7e22581084dcd17
deleted file mode 100644
index 1794b8694..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/82/cc524693ae9fb40af0ed8ab7e22581084dcd17 and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/86/34432ef171aa4b8d8e688fc1e5645245bf36ac b/test/integration/stashPop/expected/repo/.git_keep/objects/86/34432ef171aa4b8d8e688fc1e5645245bf36ac
deleted file mode 100644
index 24d309c9e..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/86/34432ef171aa4b8d8e688fc1e5645245bf36ac and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/8b/081dcb0e1fd5e9862d1aa6891b805b101abe7b b/test/integration/stashPop/expected/repo/.git_keep/objects/8b/081dcb0e1fd5e9862d1aa6891b805b101abe7b
deleted file mode 100644
index e730193f1..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/8b/081dcb0e1fd5e9862d1aa6891b805b101abe7b and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/8b/d86c566a91e9f8ace9883f7017f562c971b3f7 b/test/integration/stashPop/expected/repo/.git_keep/objects/8b/d86c566a91e9f8ace9883f7017f562c971b3f7
deleted file mode 100644
index 4541e3cc9..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/8b/d86c566a91e9f8ace9883f7017f562c971b3f7 and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/b0/00623a052b4d2226c43ba396b830738799740e b/test/integration/stashPop/expected/repo/.git_keep/objects/b0/00623a052b4d2226c43ba396b830738799740e
deleted file mode 100644
index 8ebf85670..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/b0/00623a052b4d2226c43ba396b830738799740e and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/c6/a8d49b926afc9ff2b4c64398ee678c50c2c953 b/test/integration/stashPop/expected/repo/.git_keep/objects/c6/a8d49b926afc9ff2b4c64398ee678c50c2c953
deleted file mode 100644
index 6f47ae7a5..000000000
--- a/test/integration/stashPop/expected/repo/.git_keep/objects/c6/a8d49b926afc9ff2b4c64398ee678c50c2c953
+++ /dev/null
@@ -1 +0,0 @@
-xj1@;Wh/˖e](le[8.sK;g}7~ٿIJk\wLcls9'kb馛]aBURX=k});9-權dGA'TK4^78.~\>v@%2":7t>}-'XgoM}
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/e0/0e994a4acb98bcbe93ad478e09dcb3bed6b26c b/test/integration/stashPop/expected/repo/.git_keep/objects/e0/0e994a4acb98bcbe93ad478e09dcb3bed6b26c
deleted file mode 100644
index 026ea2da1..000000000
Binary files a/test/integration/stashPop/expected/repo/.git_keep/objects/e0/0e994a4acb98bcbe93ad478e09dcb3bed6b26c and /dev/null differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/f2/6e5e813038fe0c31c4733d57fcf93758736e71 b/test/integration/stashPop/expected/repo/.git_keep/objects/f2/6e5e813038fe0c31c4733d57fcf93758736e71
new file mode 100644
index 000000000..9934ea2ee
Binary files /dev/null and b/test/integration/stashPop/expected/repo/.git_keep/objects/f2/6e5e813038fe0c31c4733d57fcf93758736e71 differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/f9/bd523df842e6b52de8880c366f7d15d6bab650 b/test/integration/stashPop/expected/repo/.git_keep/objects/f9/bd523df842e6b52de8880c366f7d15d6bab650
new file mode 100644
index 000000000..c48bcf855
--- /dev/null
+++ b/test/integration/stashPop/expected/repo/.git_keep/objects/f9/bd523df842e6b52de8880c366f7d15d6bab650
@@ -0,0 +1,2 @@
+x1
+0@>BRBÑeH\#t붮sK;|o"R0שU"H=nbhHRЎJ䪵'˟?>Ou_!E@؉S9y
\ No newline at end of file
diff --git a/test/integration/stashPop/expected/repo/.git_keep/refs/heads/master b/test/integration/stashPop/expected/repo/.git_keep/refs/heads/master
index 8e8f6abd0..3823b7b86 100644
--- a/test/integration/stashPop/expected/repo/.git_keep/refs/heads/master
+++ b/test/integration/stashPop/expected/repo/.git_keep/refs/heads/master
@@ -1 +1 @@
-8634432ef171aa4b8d8e688fc1e5645245bf36ac
+f9bd523df842e6b52de8880c366f7d15d6bab650
diff --git a/test/integration/stashPop/expected/repo/.git_keep/refs/stash b/test/integration/stashPop/expected/repo/.git_keep/refs/stash
deleted file mode 100644
index 86ea2c9b3..000000000
--- a/test/integration/stashPop/expected/repo/.git_keep/refs/stash
+++ /dev/null
@@ -1 +0,0 @@
-437b9b0ca941f1e12c8b45958f5d6ebd11cdd41a
diff --git a/test/integration/stashPop/expected/repo/file2 b/test/integration/stashPop/expected/repo/file2
index 180cf8328..c7c7da3c6 100644
--- a/test/integration/stashPop/expected/repo/file2
+++ b/test/integration/stashPop/expected/repo/file2
@@ -1 +1 @@
-test2
+hello there
diff --git a/test/integration/stashPop/recording.json b/test/integration/stashPop/recording.json
index 8629fa444..272f83875 100644
--- a/test/integration/stashPop/recording.json
+++ b/test/integration/stashPop/recording.json
@@ -1 +1 @@
-{"KeyEvents":[{"Timestamp":752,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1144,"Mod":0,"Key":256,"Ch":83},{"Timestamp":1424,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1640,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1742,"Mod":0,"Key":256,"Ch":97},{"Timestamp":1775,"Mod":0,"Key":256,"Ch":115},{"Timestamp":1832,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2097,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2552,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3065,"Mod":0,"Key":256,"Ch":83},{"Timestamp":3425,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3584,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3840,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3880,"Mod":0,"Key":256,"Ch":115},{"Timestamp":3967,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4656,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5121,"Mod":0,"Key":259,"Ch":0},{"Timestamp":5304,"Mod":0,"Key":259,"Ch":0},{"Timestamp":5608,"Mod":0,"Key":259,"Ch":0},{"Timestamp":6008,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6921,"Mod":0,"Key":256,"Ch":103},{"Timestamp":7328,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8304,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
\ No newline at end of file
+{"KeyEvents":[{"Timestamp":658,"Mod":0,"Key":256,"Ch":53},{"Timestamp":1387,"Mod":0,"Key":256,"Ch":103},{"Timestamp":2364,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3446,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":55}]}
\ No newline at end of file
diff --git a/test/integration/stashPop/setup.sh b/test/integration/stashPop/setup.sh
index caff56b7d..2278d53d8 100644
--- a/test/integration/stashPop/setup.sh
+++ b/test/integration/stashPop/setup.sh
@@ -24,3 +24,5 @@ git commit -am file2
echo "hello there" > file1
echo "hello there" > file2
echo "hello there" > file3
+
+git stash save "stash to drop"
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stashStagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 000000000..6c493ff74
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1 @@
+file2
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stashStagedChanges/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/HEAD b/test/integration/stashStagedChanges/expected/repo/.git_keep/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashStagedChanges/expected/repo/.git_keep/ORIG_HEAD
new file mode 100644
index 000000000..218f6a270
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/ORIG_HEAD
@@ -0,0 +1 @@
+b71c3131aa943097c697d5194d0f4de01f82b743
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/config b/test/integration/stashStagedChanges/expected/repo/.git_keep/config
new file mode 100644
index 000000000..596ebaeb3
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[user]
+ email = CI@example.com
+ name = CI
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/description b/test/integration/stashStagedChanges/expected/repo/.git_keep/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/index b/test/integration/stashStagedChanges/expected/repo/.git_keep/index
new file mode 100644
index 000000000..09e14a6d2
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/index differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/info/exclude b/test/integration/stashStagedChanges/expected/repo/.git_keep/info/exclude
new file mode 100644
index 000000000..a5196d1be
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/HEAD b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..4df45bbb4
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,5 @@
+0000000000000000000000000000000000000000 6cd167c43cd50ae47f776f182ed6ff0b0a4471e3 CI 1651831365 +0200 commit (initial): file0
+6cd167c43cd50ae47f776f182ed6ff0b0a4471e3 29d32b3857eab1a570b9fc534dd90b9876c5cd1a CI 1651831365 +0200 commit: file1
+29d32b3857eab1a570b9fc534dd90b9876c5cd1a b71c3131aa943097c697d5194d0f4de01f82b743 CI 1651831365 +0200 commit: file2
+b71c3131aa943097c697d5194d0f4de01f82b743 b71c3131aa943097c697d5194d0f4de01f82b743 CI 1651831372 +0200 reset: moving to HEAD
+b71c3131aa943097c697d5194d0f4de01f82b743 b71c3131aa943097c697d5194d0f4de01f82b743 CI 1651831372 +0200 reset: moving to HEAD
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..106c3646d
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 6cd167c43cd50ae47f776f182ed6ff0b0a4471e3 CI 1651831365 +0200 commit (initial): file0
+6cd167c43cd50ae47f776f182ed6ff0b0a4471e3 29d32b3857eab1a570b9fc534dd90b9876c5cd1a CI 1651831365 +0200 commit: file1
+29d32b3857eab1a570b9fc534dd90b9876c5cd1a b71c3131aa943097c697d5194d0f4de01f82b743 CI 1651831365 +0200 commit: file2
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/stash
new file mode 100644
index 000000000..e5d15aef0
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/logs/refs/stash
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 cc4c970471739bc691d2e94cdb419f6e7932f396 CI 1651831372 +0200 On master: stash staged
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
new file mode 100644
index 000000000..f74bf2335
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
new file mode 100644
index 000000000..79fcadf67
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da
new file mode 100644
index 000000000..ea6cd3866
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/28/59c9a5f343c80929844d6e49d3792b9169c4da differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/29/d32b3857eab1a570b9fc534dd90b9876c5cd1a b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/29/d32b3857eab1a570b9fc534dd90b9876c5cd1a
new file mode 100644
index 000000000..7363877b2
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/29/d32b3857eab1a570b9fc534dd90b9876c5cd1a
@@ -0,0 +1,3 @@
+xM
+0@a9EgҀU1LR"x|{odkmCH$E 0Β8Z:rfCݒ$KRM*N
+3p vqqz۾MH0g=M]VE9
\ No newline at end of file
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
new file mode 100644
index 000000000..06c9cb73d
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/4f/301f03a7f9c5a3c98aa219dd0f184afec3f248 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/4f/301f03a7f9c5a3c98aa219dd0f184afec3f248
new file mode 100644
index 000000000..6dc24b6d3
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/4f/301f03a7f9c5a3c98aa219dd0f184afec3f248 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/67/9786f833f91434f42757cc4b3bfb9ee1c573c5 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/67/9786f833f91434f42757cc4b3bfb9ee1c573c5
new file mode 100644
index 000000000..add1a9479
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/67/9786f833f91434f42757cc4b3bfb9ee1c573c5
@@ -0,0 +1,2 @@
+xA
+0E]$IDDzi2iK㛍{/SEfҘ5!vL1xf!%[)ƻ,&9X>aI˛YRua0>ಽr;MZEUWu /1XKA
\ No newline at end of file
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/6c/d167c43cd50ae47f776f182ed6ff0b0a4471e3 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/6c/d167c43cd50ae47f776f182ed6ff0b0a4471e3
new file mode 100644
index 000000000..1cf887e68
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/6c/d167c43cd50ae47f776f182ed6ff0b0a4471e3 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
new file mode 100644
index 000000000..0e95eb06d
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
new file mode 100644
index 000000000..285df3e5f
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/b7/1c3131aa943097c697d5194d0f4de01f82b743 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/b7/1c3131aa943097c697d5194d0f4de01f82b743
new file mode 100644
index 000000000..a0d6edf73
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/b7/1c3131aa943097c697d5194d0f4de01f82b743 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
new file mode 100644
index 000000000..ee4385f12
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/cc/4c970471739bc691d2e94cdb419f6e7932f396 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/cc/4c970471739bc691d2e94cdb419f6e7932f396
new file mode 100644
index 000000000..8bc1b9af9
Binary files /dev/null and b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/cc/4c970471739bc691d2e94cdb419f6e7932f396 differ
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
new file mode 100644
index 000000000..2e9066287
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
@@ -0,0 +1,2 @@
+x+)JMU03c040031QHI5`ֶww.hT[H
+yW5Ɨ(|^-W(x9
\ No newline at end of file
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/fb/0410e49f4f878fc7a57497556a45c7d052a63e b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/fb/0410e49f4f878fc7a57497556a45c7d052a63e
new file mode 100644
index 000000000..bd48dab01
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/objects/fb/0410e49f4f878fc7a57497556a45c7d052a63e
@@ -0,0 +1 @@
+xj1SW[-!pvR۲LηƁ|~>c6e:H4w39J 5{D-IC(n*ŀ![BwjCP'Ωg.:GVW15.g~m;o6\H1C=x1~F>>G뗫4LR
\ No newline at end of file
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/heads/master b/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..218f6a270
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+b71c3131aa943097c697d5194d0f4de01f82b743
diff --git a/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/stash b/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/stash
new file mode 100644
index 000000000..58354ed35
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/.git_keep/refs/stash
@@ -0,0 +1 @@
+cc4c970471739bc691d2e94cdb419f6e7932f396
diff --git a/test/integration/stashStagedChanges/expected/repo/file0 b/test/integration/stashStagedChanges/expected/repo/file0
new file mode 100644
index 000000000..38143ad4a
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/file0
@@ -0,0 +1 @@
+test0
diff --git a/test/integration/stashStagedChanges/expected/repo/file1 b/test/integration/stashStagedChanges/expected/repo/file1
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/file1
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashStagedChanges/expected/repo/file2 b/test/integration/stashStagedChanges/expected/repo/file2
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/file2
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashStagedChanges/expected/repo/file3 b/test/integration/stashStagedChanges/expected/repo/file3
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashStagedChanges/expected/repo/file3
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashStagedChanges/recording.json b/test/integration/stashStagedChanges/recording.json
new file mode 100644
index 000000000..70962d14a
--- /dev/null
+++ b/test/integration/stashStagedChanges/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":1280,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2255,"Mod":0,"Key":256,"Ch":106},{"Timestamp":2343,"Mod":0,"Key":256,"Ch":106},{"Timestamp":2674,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3166,"Mod":0,"Key":256,"Ch":83},{"Timestamp":4209,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4609,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4677,"Mod":0,"Key":256,"Ch":116},{"Timestamp":4764,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4831,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4956,"Mod":0,"Key":256,"Ch":104},{"Timestamp":5090,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5382,"Mod":0,"Key":256,"Ch":115},{"Timestamp":5442,"Mod":0,"Key":256,"Ch":116},{"Timestamp":5529,"Mod":0,"Key":256,"Ch":97},{"Timestamp":5632,"Mod":0,"Key":256,"Ch":103},{"Timestamp":5696,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5836,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6323,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7236,"Mod":0,"Key":256,"Ch":53},{"Timestamp":8544,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9140,"Mod":0,"Key":13,"Ch":13},{"Timestamp":10071,"Mod":0,"Key":256,"Ch":50},{"Timestamp":10936,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":56}]}
diff --git a/test/integration/stashStagedChanges/setup.sh b/test/integration/stashStagedChanges/setup.sh
new file mode 100644
index 000000000..caff56b7d
--- /dev/null
+++ b/test/integration/stashStagedChanges/setup.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+cd $1
+
+git init
+
+git config user.email "CI@example.com"
+git config user.name "CI"
+
+echo test0 > file0
+git add .
+git commit -am file0
+
+echo test1 > file1
+git add .
+git commit -am file1
+
+echo test2 > file2
+git add .
+git commit -am file2
+
+echo "hello there" > file1
+echo "hello there" > file2
+echo "hello there" > file3
diff --git a/test/integration/stashStagedChanges/test.json b/test/integration/stashStagedChanges/test.json
new file mode 100644
index 000000000..4f9314caa
--- /dev/null
+++ b/test/integration/stashStagedChanges/test.json
@@ -0,0 +1 @@
+{ "description": "Stashing some files", "speed": 5 }
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 000000000..a7a2e0039
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1 @@
+[lazygit] stashing unstaged changes
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/HEAD b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/ORIG_HEAD
new file mode 100644
index 000000000..1a390f25a
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/ORIG_HEAD
@@ -0,0 +1 @@
+70dfa7fd25e9af49b7277738270a61d5dfbbac53
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/config b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/config
new file mode 100644
index 000000000..596ebaeb3
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[user]
+ email = CI@example.com
+ name = CI
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/description b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/index b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/index
new file mode 100644
index 000000000..4421704b3
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/index differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/info/exclude b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/info/exclude
new file mode 100644
index 000000000..a5196d1be
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/HEAD b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..bf3da7509
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,6 @@
+0000000000000000000000000000000000000000 f8e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 CI 1651831332 +0200 commit (initial): file0
+f8e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 e702e6113eff6883a33505e2b28cff2df3420fed CI 1651831332 +0200 commit: file1
+e702e6113eff6883a33505e2b28cff2df3420fed b245d3aa308ffdfdd194a94ad84a678a8a7a028c CI 1651831332 +0200 commit: file2
+b245d3aa308ffdfdd194a94ad84a678a8a7a028c 70dfa7fd25e9af49b7277738270a61d5dfbbac53 CI 1651831340 +0200 commit: [lazygit] stashing unstaged changes
+70dfa7fd25e9af49b7277738270a61d5dfbbac53 70dfa7fd25e9af49b7277738270a61d5dfbbac53 CI 1651831340 +0200 reset: moving to HEAD
+70dfa7fd25e9af49b7277738270a61d5dfbbac53 b245d3aa308ffdfdd194a94ad84a678a8a7a028c CI 1651831340 +0200 reset: moving to HEAD^
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..e46c60988
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1,5 @@
+0000000000000000000000000000000000000000 f8e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 CI 1651831332 +0200 commit (initial): file0
+f8e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 e702e6113eff6883a33505e2b28cff2df3420fed CI 1651831332 +0200 commit: file1
+e702e6113eff6883a33505e2b28cff2df3420fed b245d3aa308ffdfdd194a94ad84a678a8a7a028c CI 1651831332 +0200 commit: file2
+b245d3aa308ffdfdd194a94ad84a678a8a7a028c 70dfa7fd25e9af49b7277738270a61d5dfbbac53 CI 1651831340 +0200 commit: [lazygit] stashing unstaged changes
+70dfa7fd25e9af49b7277738270a61d5dfbbac53 b245d3aa308ffdfdd194a94ad84a678a8a7a028c CI 1651831340 +0200 reset: moving to HEAD^
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/stash
new file mode 100644
index 000000000..869d2d514
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/logs/refs/stash
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 80a20247e61d440004def8f284964334ee381d0a CI 1651831340 +0200 On master: unstaged
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
new file mode 100644
index 000000000..f74bf2335
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442
new file mode 100644
index 000000000..79fcadf67
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da
new file mode 100644
index 000000000..06c9cb73d
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07
new file mode 100644
index 000000000..6a6f24362
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/5c/ef9afea6a37d89f925e24ebf71adecb63d1f07 differ
diff --git a/test/integration/stashPop/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
similarity index 100%
rename from test/integration/stashPop/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
rename to test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/66/bbc809cdafd867cf9320bfb7484bb8fa898448
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/70/dfa7fd25e9af49b7277738270a61d5dfbbac53 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/70/dfa7fd25e9af49b7277738270a61d5dfbbac53
new file mode 100644
index 000000000..9ba23ed1e
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/70/dfa7fd25e9af49b7277738270a61d5dfbbac53
@@ -0,0 +1,3 @@
+x
+0E]+f/H^S7I&I}Ѧ~.aǾT9:0%FWT-}E=&E^+"#1%N̪tђ*t
+M}7/aUQJ8K-8q?s}yVh)>#Chq??F.
\ No newline at end of file
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/80/a20247e61d440004def8f284964334ee381d0a b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/80/a20247e61d440004def8f284964334ee381d0a
new file mode 100644
index 000000000..8f444fade
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/80/a20247e61d440004def8f284964334ee381d0a differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c
new file mode 100644
index 000000000..0e95eb06d
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
new file mode 100644
index 000000000..285df3e5f
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/b2/45d3aa308ffdfdd194a94ad84a678a8a7a028c b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/b2/45d3aa308ffdfdd194a94ad84a678a8a7a028c
new file mode 100644
index 000000000..847d9486a
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/b2/45d3aa308ffdfdd194a94ad84a678a8a7a028c
@@ -0,0 +1,3 @@
+xM
+0@a9ȄIF1d-%ǷGpN}W7 j*T+eՒ(O5iDd5"Q5V?~}m[R
+#33;1Ol^:
\ No newline at end of file
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/bc/4b1a5b9b60d70107fab9078137bad212e29567 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/bc/4b1a5b9b60d70107fab9078137bad212e29567
new file mode 100644
index 000000000..07c62f2ce
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/bc/4b1a5b9b60d70107fab9078137bad212e29567
@@ -0,0 +1 @@
+xAj0E)f($kFBV9Cb$lC$[7w/.×1&!e.<ѱDtb9R7ޤu@cfŅ-<#*y|S\oWyMk:
'mVzDukz+<y68I4sdWNy
\ No newline at end of file
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a
new file mode 100644
index 000000000..ee4385f12
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/c7/c7da3c64e86c3270f2639a1379e67e14891b6a differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
new file mode 100644
index 000000000..2e9066287
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641
@@ -0,0 +1,2 @@
+x+)JMU03c040031QHI5`ֶww.hT[H
+yW5Ɨ(|^-W(x9
\ No newline at end of file
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/e7/02e6113eff6883a33505e2b28cff2df3420fed b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/e7/02e6113eff6883a33505e2b28cff2df3420fed
new file mode 100644
index 000000000..f70dd165a
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/e7/02e6113eff6883a33505e2b28cff2df3420fed
@@ -0,0 +1,3 @@
+xM
+0@a9EL&1& Z[Jo-l:w_j+d! f_")H3;
J-YA/%2C)T
+d_a_^Eo0!0g=MuP;
\ No newline at end of file
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/f8/e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/f8/e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689
new file mode 100644
index 000000000..06d1efef3
Binary files /dev/null and b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/objects/f8/e5bdb9f59bd7ae0c72bb4aa0bb9d6af96ec689 differ
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/heads/master b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..eb757b2d0
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+b245d3aa308ffdfdd194a94ad84a678a8a7a028c
diff --git a/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/stash b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/stash
new file mode 100644
index 000000000..607b99017
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/.git_keep/refs/stash
@@ -0,0 +1 @@
+80a20247e61d440004def8f284964334ee381d0a
diff --git a/test/integration/stashUnstagedChanges/expected/repo/file0 b/test/integration/stashUnstagedChanges/expected/repo/file0
new file mode 100644
index 000000000..38143ad4a
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/file0
@@ -0,0 +1 @@
+test0
diff --git a/test/integration/stashUnstagedChanges/expected/repo/file1 b/test/integration/stashUnstagedChanges/expected/repo/file1
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/file1
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashUnstagedChanges/expected/repo/file2 b/test/integration/stashUnstagedChanges/expected/repo/file2
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/file2
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashUnstagedChanges/expected/repo/file3 b/test/integration/stashUnstagedChanges/expected/repo/file3
new file mode 100644
index 000000000..c7c7da3c6
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/expected/repo/file3
@@ -0,0 +1 @@
+hello there
diff --git a/test/integration/stashUnstagedChanges/recording.json b/test/integration/stashUnstagedChanges/recording.json
new file mode 100644
index 000000000..78feca750
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":1319,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2975,"Mod":0,"Key":256,"Ch":83},{"Timestamp":5557,"Mod":0,"Key":256,"Ch":117},{"Timestamp":7054,"Mod":0,"Key":256,"Ch":117},{"Timestamp":7219,"Mod":0,"Key":256,"Ch":110},{"Timestamp":7262,"Mod":0,"Key":256,"Ch":115},{"Timestamp":7319,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7404,"Mod":0,"Key":256,"Ch":97},{"Timestamp":7492,"Mod":0,"Key":256,"Ch":103},{"Timestamp":7534,"Mod":0,"Key":256,"Ch":101},{"Timestamp":7679,"Mod":0,"Key":256,"Ch":100},{"Timestamp":7965,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9053,"Mod":0,"Key":256,"Ch":53},{"Timestamp":10348,"Mod":0,"Key":256,"Ch":32},{"Timestamp":10979,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12354,"Mod":0,"Key":256,"Ch":50},{"Timestamp":12874,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":239,"Height":56}]}
diff --git a/test/integration/stashUnstagedChanges/setup.sh b/test/integration/stashUnstagedChanges/setup.sh
new file mode 100644
index 000000000..caff56b7d
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/setup.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+cd $1
+
+git init
+
+git config user.email "CI@example.com"
+git config user.name "CI"
+
+echo test0 > file0
+git add .
+git commit -am file0
+
+echo test1 > file1
+git add .
+git commit -am file1
+
+echo test2 > file2
+git add .
+git commit -am file2
+
+echo "hello there" > file1
+echo "hello there" > file2
+echo "hello there" > file3
diff --git a/test/integration/stashUnstagedChanges/test.json b/test/integration/stashUnstagedChanges/test.json
new file mode 100644
index 000000000..4f9314caa
--- /dev/null
+++ b/test/integration/stashUnstagedChanges/test.json
@@ -0,0 +1 @@
+{ "description": "Stashing some files", "speed": 5 }
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stash_Copy/expected/repo/.git_keep/ORIG_HEAD
deleted file mode 100644
index 78e4eb58e..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/ORIG_HEAD
+++ /dev/null
@@ -1 +0,0 @@
-f348ff60bdbb3695f2f519db6bc115b1b8d50886
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/index b/test/integration/stash_Copy/expected/repo/.git_keep/index
deleted file mode 100644
index daebfa4ef..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/index and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/logs/HEAD b/test/integration/stash_Copy/expected/repo/.git_keep/logs/HEAD
deleted file mode 100644
index f95cf06ac..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/logs/HEAD
+++ /dev/null
@@ -1,6 +0,0 @@
-0000000000000000000000000000000000000000 a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b CI 1643011553 +1100 commit (initial): file0
-a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b 4cc838ea1466afc5be1d3bc3e7a937641ec84d7d CI 1643011553 +1100 commit: file1
-4cc838ea1466afc5be1d3bc3e7a937641ec84d7d f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011553 +1100 commit: file2
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011556 +1100 reset: moving to HEAD
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011556 +1100 reset: moving to HEAD
-f348ff60bdbb3695f2f519db6bc115b1b8d50886 f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011558 +1100 reset: moving to HEAD
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/heads/master
deleted file mode 100644
index d1bf421f8..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/heads/master
+++ /dev/null
@@ -1,3 +0,0 @@
-0000000000000000000000000000000000000000 a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b CI 1643011553 +1100 commit (initial): file0
-a7dde526f2e93ffa08897fbfca2c98ce40a8fa5b 4cc838ea1466afc5be1d3bc3e7a937641ec84d7d CI 1643011553 +1100 commit: file1
-4cc838ea1466afc5be1d3bc3e7a937641ec84d7d f348ff60bdbb3695f2f519db6bc115b1b8d50886 CI 1643011553 +1100 commit: file2
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/stash b/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/stash
deleted file mode 100644
index 3f07cf22e..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/logs/refs/stash
+++ /dev/null
@@ -1,2 +0,0 @@
-0000000000000000000000000000000000000000 e09b4dfcd66bfa1c81feeaf67e04d55368a2b065 CI 1643011556 +1100 On master: asd
-e09b4dfcd66bfa1c81feeaf67e04d55368a2b065 2efac8148440778cbddcd80ac7477981277dcffe CI 1643011558 +1100 On master: asd
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc b/test/integration/stash_Copy/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc
deleted file mode 100644
index aab767a08..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/25/abc3e66a6aa505fb0a2ceb6ad5cda0cc89ecbc and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe b/test/integration/stash_Copy/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe
deleted file mode 100644
index 54545b630..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/objects/2e/fac8148440778cbddcd80ac7477981277dcffe
+++ /dev/null
@@ -1 +0,0 @@
-xAj14v)%UV=$˴Pgątg{bOpF[`X,`L
˶eQMl,y.5\FTeHJ3H:!5ER[.nj|^/׳H
g2B@\:O'_o1ȣK
\ No newline at end of file
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a b/test/integration/stash_Copy/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a
deleted file mode 100644
index 1b8805172..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/3b/29b35d4357f8e64cafd95140a70d7c9b25138a and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d b/test/integration/stash_Copy/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d
deleted file mode 100644
index bc099c320..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/4c/c838ea1466afc5be1d3bc3e7a937641ec84d7d and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68 b/test/integration/stash_Copy/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68
deleted file mode 100644
index 8535af67c..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/56/52247b638d1516506790d6648b864ba3447f68 and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c b/test/integration/stash_Copy/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c
deleted file mode 100644
index 539f97919..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/9f/2757166809c291c65f09778abb46cfcc4e4a0c and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844 b/test/integration/stash_Copy/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844
deleted file mode 100644
index 0cdd88ea0..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/a6/ada9f3d895e751ec289c69913a02146c0ca844 and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b b/test/integration/stash_Copy/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b
deleted file mode 100644
index 9dcd075d6..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/a7/dde526f2e93ffa08897fbfca2c98ce40a8fa5b and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065 b/test/integration/stash_Copy/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065
deleted file mode 100644
index f57ce417b..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/e0/9b4dfcd66bfa1c81feeaf67e04d55368a2b065 and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886 b/test/integration/stash_Copy/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886
deleted file mode 100644
index 8faee1fcd..000000000
Binary files a/test/integration/stash_Copy/expected/repo/.git_keep/objects/f3/48ff60bdbb3695f2f519db6bc115b1b8d50886 and /dev/null differ
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/refs/heads/master b/test/integration/stash_Copy/expected/repo/.git_keep/refs/heads/master
deleted file mode 100644
index 78e4eb58e..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/refs/heads/master
+++ /dev/null
@@ -1 +0,0 @@
-f348ff60bdbb3695f2f519db6bc115b1b8d50886
diff --git a/test/integration/stash_Copy/expected/repo/.git_keep/refs/stash b/test/integration/stash_Copy/expected/repo/.git_keep/refs/stash
deleted file mode 100644
index 9123248e5..000000000
--- a/test/integration/stash_Copy/expected/repo/.git_keep/refs/stash
+++ /dev/null
@@ -1 +0,0 @@
-2efac8148440778cbddcd80ac7477981277dcffe
diff --git a/test/integration/stash_Copy/expected/repo/file2 b/test/integration/stash_Copy/expected/repo/file2
deleted file mode 100644
index 180cf8328..000000000
--- a/test/integration/stash_Copy/expected/repo/file2
+++ /dev/null
@@ -1 +0,0 @@
-test2
diff --git a/test/integration/stash_Copy/recording.json b/test/integration/stash_Copy/recording.json
deleted file mode 100644
index 48fc35158..000000000
--- a/test/integration/stash_Copy/recording.json
+++ /dev/null
@@ -1 +0,0 @@
-{"KeyEvents":[{"Timestamp":809,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1369,"Mod":0,"Key":256,"Ch":83},{"Timestamp":1713,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2087,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2376,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2440,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2512,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2793,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3498,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4113,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4785,"Mod":0,"Key":256,"Ch":115},{"Timestamp":5145,"Mod":0,"Key":256,"Ch":97},{"Timestamp":5183,"Mod":0,"Key":256,"Ch":115},{"Timestamp":5249,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5609,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6216,"Mod":0,"Key":259,"Ch":0},{"Timestamp":6457,"Mod":0,"Key":259,"Ch":0},{"Timestamp":6728,"Mod":0,"Key":259,"Ch":0},{"Timestamp":7098,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7408,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8080,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8752,"Mod":0,"Key":260,"Ch":0},{"Timestamp":8952,"Mod":0,"Key":260,"Ch":0},{"Timestamp":9145,"Mod":0,"Key":260,"Ch":0},{"Timestamp":9904,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
\ No newline at end of file