diff options
16 files changed, 13 insertions, 11 deletions
diff --git a/pkg/commands/git_commands/stash.go b/pkg/commands/git_commands/stash.go index 255e7a86c..72b61b744 100644 --- a/pkg/commands/git_commands/stash.go +++ b/pkg/commands/git_commands/stash.go @@ -111,6 +111,6 @@ func (self *StashCommands) SaveStagedChanges(message string) error { } func (self *StashCommands) StashUntrackedChanges(message string) error { - return self.cmd.New("git stash --include-untracked").Run(); + return self.cmd.New(fmt.Sprintf("git stash save %s --include-untracked", self.cmd.Quote(message))).Run() } diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/ORIG_HEAD b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/ORIG_HEAD index a3df47f69..a25b9571b 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/ORIG_HEAD +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/ORIG_HEAD @@ -1 +1 @@ -592d439043d07cd223cbde4b3a0884b94634437b +03158a5be423590fa91f97c23ed505745e8e8aff diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/HEAD b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/HEAD index 8daa2233e..cd44a69c6 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/HEAD +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/HEAD @@ -1,2 +1,2 @@ -0000000000000000000000000000000000000000 592d439043d07cd223cbde4b3a0884b94634437b CI <CI@example.com> 1654284027 -0230 commit (initial): Initial commit -592d439043d07cd223cbde4b3a0884b94634437b 592d439043d07cd223cbde4b3a0884b94634437b CI <CI@example.com> 1654284036 -0230 reset: moving to HEAD +0000000000000000000000000000000000000000 03158a5be423590fa91f97c23ed505745e8e8aff CI <CI@example.com> 1655844652 -0230 commit (initial): Initial commit +03158a5be423590fa91f97c23ed505745e8e8aff 03158a5be423590fa91f97c23ed505745e8e8aff CI <CI@example.com> 1655844659 -0230 reset: moving to HEAD diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/heads/master index 1074c856f..d99532170 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/heads/master +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/heads/master @@ -1 +1 @@ -0000000000000000000000000000000000000000 592d439043d07cd223cbde4b3a0884b94634437b CI <CI@example.com> 1654284027 -0230 commit (initial): Initial commit +0000000000000000000000000000000000000000 03158a5be423590fa91f97c23ed505745e8e8aff CI <CI@example.com> 1655844652 -0230 commit (initial): Initial commit diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/stash b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/stash index f33d8a619..2fa025e98 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/stash +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/logs/refs/stash @@ -1 +1 @@ -0000000000000000000000000000000000000000 b3c24805b28fa5e90b5807bb402b123974f13d61 CI <CI@example.com> 1654284036 -0230 WIP on master: 592d439 Initial commit +0000000000000000000000000000000000000000 fed8896ec3398ae58cfd81e56a058bf18b49427a CI <CI@example.com> 1655844659 -0230 WIP on master: 03158a5 Initial commit diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/02/8cf118f08271dc2b9dd68d72a65918df664951 b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/02/8cf118f08271dc2b9dd68d72a65918df664951 deleted file mode 100644 index 4032664a3..000000000 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/02/8cf118f08271dc2b9dd68d72a65918df664951 +++ /dev/null @@ -1,2 +0,0 @@ -x[ -0E*fJ&&""HS6)|n9R-%7@Ome:ץQoXdGt!("d;nqoϺB?=j:k7R;8K8ؗFzSy@_5`Xrq_Z|j:
\ No newline at end of file diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/03/158a5be423590fa91f97c23ed505745e8e8aff b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/03/158a5be423590fa91f97c23ed505745e8e8aff Binary files differnew file mode 100644 index 000000000..b4c7ec9be --- /dev/null +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/03/158a5be423590fa91f97c23ed505745e8e8aff diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/29/b079ba8e40edf7b2c76613e0a3de5b1b26ce70 b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/29/b079ba8e40edf7b2c76613e0a3de5b1b26ce70 new file mode 100644 index 000000000..635f2cc2f --- /dev/null +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/29/b079ba8e40edf7b2c76613e0a3de5b1b26ce70 @@ -0,0 +1,2 @@ +xA +0E]s%MgDDzI:BӔǷ >Xr*cOu-j!ɍRAQRA
9 hZ:oie$M8qw}
n:%|9DKڴZ\M(;2a3|E
\ No newline at end of file diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/59/2d439043d07cd223cbde4b3a0884b94634437b b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/59/2d439043d07cd223cbde4b3a0884b94634437b Binary files differdeleted file mode 100644 index d695a40a5..000000000 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/59/2d439043d07cd223cbde4b3a0884b94634437b +++ /dev/null diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/b3/c24805b28fa5e90b5807bb402b123974f13d61 b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/b3/c24805b28fa5e90b5807bb402b123974f13d61 Binary files differdeleted file mode 100644 index 594fc8032..000000000 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/b3/c24805b28fa5e90b5807bb402b123974f13d61 +++ /dev/null diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/db/0f86d5434dd5e5f3a2210f9a7edf5a816ae935 b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/db/0f86d5434dd5e5f3a2210f9a7edf5a816ae935 Binary files differdeleted file mode 100644 index b3d2804ff..000000000 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/db/0f86d5434dd5e5f3a2210f9a7edf5a816ae935 +++ /dev/null diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/fe/d8896ec3398ae58cfd81e56a058bf18b49427a b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/fe/d8896ec3398ae58cfd81e56a058bf18b49427a new file mode 100644 index 000000000..ccac20445 --- /dev/null +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/fe/d8896ec3398ae58cfd81e56a058bf18b49427a @@ -0,0 +1,2 @@ +xJ1D=WNҝEDܼyN:3|d^WE-uafj5aLY j/-q(2t z*Bj"1ta9PFbEz? +U!XYC)h אe8x:@K@RͳI綻^.rSݖW@LBHaħm[<n^*77`
\ No newline at end of file diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/ff/d4134b8bf80d379824558ce19b4eddbc53e2ba b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/ff/d4134b8bf80d379824558ce19b4eddbc53e2ba Binary files differnew file mode 100644 index 000000000..6ccf5cbc2 --- /dev/null +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/objects/ff/d4134b8bf80d379824558ce19b4eddbc53e2ba diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/heads/master b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/heads/master index a3df47f69..a25b9571b 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/heads/master +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/heads/master @@ -1 +1 @@ -592d439043d07cd223cbde4b3a0884b94634437b +03158a5be423590fa91f97c23ed505745e8e8aff diff --git a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/stash b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/stash index ffd33ef5c..35aa8ee8c 100644 --- a/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/stash +++ b/test/integration/stashIncludeUntrackedChanges/expected/repo/.git_keep/refs/stash @@ -1 +1 @@ -b3c24805b28fa5e90b5807bb402b123974f13d61 +fed8896ec3398ae58cfd81e56a058bf18b49427a diff --git a/test/integration/stashIncludeUntrackedChanges/recording.json b/test/integration/stashIncludeUntrackedChanges/recording.json index be590bf9d..34f4c888b 100644 --- a/test/integration/stashIncludeUntrackedChanges/recording.json +++ b/test/integration/stashIncludeUntrackedChanges/recording.json @@ -1 +1 @@ -{"KeyEvents":[{"Timestamp":3590,"Mod":0,"Key":256,"Ch":83},{"Timestamp":6045,"Mod":0,"Key":256,"Ch":85},{"Timestamp":7792,"Mod":0,"Key":13,"Ch":13},{"Timestamp":15045,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":294,"Height":79}]}
\ No newline at end of file +{"KeyEvents":[{"Timestamp":2942,"Mod":0,"Key":256,"Ch":83},{"Timestamp":4657,"Mod":0,"Key":256,"Ch":85},{"Timestamp":6393,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12342,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":294,"Height":79}]}
\ No newline at end of file |