From 65bd0ab4316d0ca30549b889df4d48a841b48317 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 15:27:13 +1100 Subject: [PATCH] migrate undo test --- pkg/gui/controllers/undo_controller.go | 6 +- pkg/integration/tests/tests_gen.go | 2 + pkg/integration/tests/undo/undo_drop.go | 90 ++++++++++++++++++ .../expected/repo/.git_keep/COMMIT_EDITMSG | 24 ----- .../undo/expected/repo/.git_keep/FETCH_HEAD | 0 .../undo/expected/repo/.git_keep/HEAD | 1 - .../undo/expected/repo/.git_keep/ORIG_HEAD | 1 - .../undo/expected/repo/.git_keep/config | 10 -- .../undo/expected/repo/.git_keep/description | 1 - .../undo/expected/repo/.git_keep/index | Bin 353 -> 0 bytes .../undo/expected/repo/.git_keep/info/exclude | 7 -- .../undo/expected/repo/.git_keep/logs/HEAD | 20 ---- .../repo/.git_keep/logs/refs/heads/branch2 | 11 --- .../repo/.git_keep/logs/refs/heads/master | 4 - .../0c/2aa38e0600e0d2df09c2f84664d8a14f899879 | Bin 36 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 | Bin 50 -> 0 bytes .../2d/00bd505971a8bc7318d98e003aee708a367c85 | Bin 24 -> 0 bytes .../38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da | Bin 21 -> 0 bytes .../3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a | Bin 31 -> 0 bytes .../3d/b2086f780b1cf632eec29111ef395913a8ab2b | Bin 127 -> 0 bytes .../3e/4f2b1aeb076cff592279f94b1f495442690521 | Bin 147 -> 0 bytes .../4f/77a25a15ccca0273baa522f7281727f31ceeb8 | 2 - .../59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 | Bin 126 -> 0 bytes .../5d/2b236ff0e8342ef1e531506f6f99070d53cf25 | Bin 147 -> 0 bytes .../68/ac4e416c01408d37c59465852aa1856a4abdb1 | Bin 146 -> 0 bytes .../6d/95d7a7842625152ba887482879dfdaf247f591 | Bin 119 -> 0 bytes .../7c/e8eac65e3ae50cb50a570dc775b745464f3a3e | Bin 148 -> 0 bytes .../8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 | Bin 127 -> 0 bytes .../99/36b8f380c2937bb457ade468bfc7dc850293f9 | Bin 153 -> 0 bytes .../9d/187b7f4819a69996dd27e3d66a5224e05d9f41 | Bin 150 -> 0 bytes .../9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c | Bin 101 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 | 2 - .../e5/c5c5583f49a34e86ce622b59363df99e09d4c6 | Bin 30 -> 0 bytes .../e7/76522ac28860d2eba6fe98fa4fad67e798419a | Bin 127 -> 0 bytes .../fc/f46511d7819220e0cc310ae6d891fadfdb79aa | 3 - .../repo/.git_keep/refs/heads/branch2 | 1 - .../expected/repo/.git_keep/refs/heads/master | 1 - test/integration/undo/expected/repo/file0 | 1 - test/integration/undo/expected/repo/file1 | 1 - test/integration/undo/expected/repo/file2 | 1 - test/integration/undo/expected/repo/file4 | 3 - test/integration/undo/recording.json | 1 - test/integration/undo/setup.sh | 40 -------- test/integration/undo/test.json | 1 - 46 files changed, 95 insertions(+), 139 deletions(-) create mode 100644 pkg/integration/tests/undo/undo_drop.go delete mode 100644 test/integration/undo/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/undo/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/undo/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/undo/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/undo/expected/repo/.git_keep/config delete mode 100644 test/integration/undo/expected/repo/.git_keep/description delete mode 100644 test/integration/undo/expected/repo/.git_keep/index delete mode 100644 test/integration/undo/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/undo/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/undo/expected/repo/.git_keep/logs/refs/heads/branch2 delete mode 100644 test/integration/undo/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/0c/2aa38e0600e0d2df09c2f84664d8a14f899879 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/2d/00bd505971a8bc7318d98e003aee708a367c85 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/3d/b2086f780b1cf632eec29111ef395913a8ab2b delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/3e/4f2b1aeb076cff592279f94b1f495442690521 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/4f/77a25a15ccca0273baa522f7281727f31ceeb8 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/5d/2b236ff0e8342ef1e531506f6f99070d53cf25 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/68/ac4e416c01408d37c59465852aa1856a4abdb1 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/6d/95d7a7842625152ba887482879dfdaf247f591 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/7c/e8eac65e3ae50cb50a570dc775b745464f3a3e delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/99/36b8f380c2937bb457ade468bfc7dc850293f9 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/9d/187b7f4819a69996dd27e3d66a5224e05d9f41 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/e5/c5c5583f49a34e86ce622b59363df99e09d4c6 delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/e7/76522ac28860d2eba6fe98fa4fad67e798419a delete mode 100644 test/integration/undo/expected/repo/.git_keep/objects/fc/f46511d7819220e0cc310ae6d891fadfdb79aa delete mode 100644 test/integration/undo/expected/repo/.git_keep/refs/heads/branch2 delete mode 100644 test/integration/undo/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/undo/expected/repo/file0 delete mode 100644 test/integration/undo/expected/repo/file1 delete mode 100644 test/integration/undo/expected/repo/file2 delete mode 100644 test/integration/undo/expected/repo/file4 delete mode 100644 test/integration/undo/recording.json delete mode 100644 test/integration/undo/setup.sh delete mode 100644 test/integration/undo/test.json diff --git a/pkg/gui/controllers/undo_controller.go b/pkg/gui/controllers/undo_controller.go index 5e0bf5730..19fc19e27 100644 --- a/pkg/gui/controllers/undo_controller.go +++ b/pkg/gui/controllers/undo_controller.go @@ -195,17 +195,17 @@ func (self *UndoController) parseReflogForActions(onUserAction func(counter int, counter++ } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^\[lazygit redo\]`); ok { counter-- - } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase -i \(abort\)|^rebase -i \(finish\)`); ok { + } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase (-i )?\(abort\)|^rebase (-i )?\(finish\)`); ok { rebaseFinishCommitSha = reflogCommit.Sha } else if ok, match := utils.FindStringSubmatch(reflogCommit.Name, `^checkout: moving from ([\S]+) to ([\S]+)`); ok { action = &reflogAction{kind: CHECKOUT, from: match[1], to: match[2]} } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^commit|^reset: moving to|^pull`); ok { action = &reflogAction{kind: COMMIT, from: prevCommitSha, to: reflogCommit.Sha} - } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase -i \(start\)`); ok { + } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase (-i )?\(start\)`); ok { // if we're here then we must be currently inside an interactive rebase action = &reflogAction{kind: CURRENT_REBASE, from: prevCommitSha} } - } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase -i \(start\)`); ok { + } else if ok, _ := utils.FindStringSubmatch(reflogCommit.Name, `^rebase (-i )?\(start\)`); ok { action = &reflogAction{kind: REBASE, from: prevCommitSha, to: rebaseFinishCommitSha} rebaseFinishCommitSha = "" } diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index c3637cbb9..2be0b902c 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -20,6 +20,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/integration/tests/stash" "github.com/jesseduffield/lazygit/pkg/integration/tests/submodule" "github.com/jesseduffield/lazygit/pkg/integration/tests/sync" + "github.com/jesseduffield/lazygit/pkg/integration/tests/undo" ) var tests = []*components.IntegrationTest{ @@ -83,4 +84,5 @@ var tests = []*components.IntegrationTest{ sync.Pull, sync.PullAndSetUpstream, sync.RenameBranchAndPull, + undo.UndoDrop, } diff --git a/pkg/integration/tests/undo/undo_drop.go b/pkg/integration/tests/undo/undo_drop.go new file mode 100644 index 000000000..bb3cbe1aa --- /dev/null +++ b/pkg/integration/tests/undo/undo_drop.go @@ -0,0 +1,90 @@ +package undo + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var UndoDrop = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Drop some commits and then undo/redo the actions", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.EmptyCommit("one") + shell.EmptyCommit("two") + shell.EmptyCommit("three") + shell.EmptyCommit("four") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + confirmCommitDrop := func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Delete Commit")). + Content(Equals("Are you sure you want to delete this commit?")). + Confirm() + } + + confirmUndo := func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Undo")). + Content(MatchesRegexp(`Are you sure you want to hard reset to '.*'\? An auto-stash will be performed if necessary\.`)). + Confirm() + } + + confirmRedo := func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Redo")). + Content(MatchesRegexp(`Are you sure you want to hard reset to '.*'\? An auto-stash will be performed if necessary\.`)). + Confirm() + } + + t.Views().Commits().Focus(). + Lines( + Contains("four").IsSelected(), + Contains("three"), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Remove). + Tap(confirmCommitDrop). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Remove). + Tap(confirmCommitDrop). + Lines( + Contains("two").IsSelected(), + Contains("one"), + ). + Press(keys.Universal.Undo). + Tap(confirmUndo). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Undo). + Tap(confirmUndo). + Lines( + Contains("four").IsSelected(), + Contains("three"), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Redo). + Tap(confirmRedo). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Redo). + Tap(confirmRedo). + Lines( + Contains("two").IsSelected(), + Contains("one"), + ) + }, +}) diff --git a/test/integration/undo/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/undo/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 2e97e3406..000000000 --- a/test/integration/undo/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1,24 +0,0 @@ -# This is a combination of 2 commits. -# This is the 1st commit message: - -file4 - -# This is the commit message #2: - -file4 - -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# -# Date: Tue Apr 6 14:29:30 2021 +1000 -# -# interactive rebase in progress; onto 68ac4e4 -# Last commands done (2 commands done): -# pick fcf4651 file4 -# squash 9d187b7 file4 -# No commands remaining. -# You are currently rebasing branch 'branch2' on '68ac4e4'. -# -# Changes to be committed: -# new file: file4 -# diff --git a/test/integration/undo/expected/repo/.git_keep/FETCH_HEAD b/test/integration/undo/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/undo/expected/repo/.git_keep/HEAD b/test/integration/undo/expected/repo/.git_keep/HEAD deleted file mode 100644 index 1d57c9ea7..000000000 --- a/test/integration/undo/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/branch2 diff --git a/test/integration/undo/expected/repo/.git_keep/ORIG_HEAD b/test/integration/undo/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index ed9815e19..000000000 --- a/test/integration/undo/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -7ce8eac65e3ae50cb50a570dc775b745464f3a3e diff --git a/test/integration/undo/expected/repo/.git_keep/config b/test/integration/undo/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/undo/expected/repo/.git_keep/config +++ /dev/null @@ -1,10 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true -[user] - email = CI@example.com - name = CI diff --git a/test/integration/undo/expected/repo/.git_keep/description b/test/integration/undo/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/undo/expected/repo/.git_keep/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/undo/expected/repo/.git_keep/index b/test/integration/undo/expected/repo/.git_keep/index deleted file mode 100644 index f347af7db01f63346167dfb9d2798fb41d70c25d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmZ?q402{*U|<4bmW1rbtHf8m(}U5BKruEw=M@YLjY}997{3D5hyXF0g^1Oa1^=|R zy$e3{zH{l#M|-E5-eO=)%gjkN07^43fb>i3W!(>>q2}yIH)rXd$A48*Z+wXejpE67 zx)9*i(tQsP%?xXG&H&8;(-3o9=AfG+!SlnYL22K)m#Y?qSM|5N(w=Xj4l&0F zX3jd55)DqEIba%UPBWT0vOHRg``8#BT)NMB=!aX%jfMW5Gb$nGn1Ia*337D>G9(#H x6b!g*H*w@waLar%dUt4|;CstR;T5a3T@{|K*d?VhPh+BAUu{RKLAut&g#ar>ah?DG diff --git a/test/integration/undo/expected/repo/.git_keep/info/exclude b/test/integration/undo/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/undo/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,7 +0,0 @@ -# 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] -# *~ -.DS_Store diff --git a/test/integration/undo/expected/repo/.git_keep/logs/HEAD b/test/integration/undo/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index faf40ba78..000000000 --- a/test/integration/undo/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,20 +0,0 @@ -0000000000000000000000000000000000000000 6d95d7a7842625152ba887482879dfdaf247f591 CI 1617683370 +1000 commit (initial): file0 -6d95d7a7842625152ba887482879dfdaf247f591 4f77a25a15ccca0273baa522f7281727f31ceeb8 CI 1617683370 +1000 commit: file1 -4f77a25a15ccca0273baa522f7281727f31ceeb8 68ac4e416c01408d37c59465852aa1856a4abdb1 CI 1617683370 +1000 commit: file2 -68ac4e416c01408d37c59465852aa1856a4abdb1 fcf46511d7819220e0cc310ae6d891fadfdb79aa CI 1617683370 +1000 commit: file4 -fcf46511d7819220e0cc310ae6d891fadfdb79aa fcf46511d7819220e0cc310ae6d891fadfdb79aa CI 1617683370 +1000 checkout: moving from master to branch2 -fcf46511d7819220e0cc310ae6d891fadfdb79aa 5d2b236ff0e8342ef1e531506f6f99070d53cf25 CI 1617683370 +1000 commit: file4 -5d2b236ff0e8342ef1e531506f6f99070d53cf25 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683370 +1000 commit: file4 -3e4f2b1aeb076cff592279f94b1f495442690521 7ce8eac65e3ae50cb50a570dc775b745464f3a3e CI 1617683370 +1000 commit: file2 -7ce8eac65e3ae50cb50a570dc775b745464f3a3e 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683372 +1000 rebase -i (start): checkout 3e4f2b1aeb076cff592279f94b1f495442690521 -3e4f2b1aeb076cff592279f94b1f495442690521 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683372 +1000 rebase -i (finish): returning to refs/heads/branch2 -3e4f2b1aeb076cff592279f94b1f495442690521 5d2b236ff0e8342ef1e531506f6f99070d53cf25 CI 1617683373 +1000 rebase -i (start): checkout fcf46511d7819220e0cc310ae6d891fadfdb79aa -5d2b236ff0e8342ef1e531506f6f99070d53cf25 9d187b7f4819a69996dd27e3d66a5224e05d9f41 CI 1617683373 +1000 rebase -i (fixup): file4 -9d187b7f4819a69996dd27e3d66a5224e05d9f41 9d187b7f4819a69996dd27e3d66a5224e05d9f41 CI 1617683373 +1000 rebase -i (finish): returning to refs/heads/branch2 -9d187b7f4819a69996dd27e3d66a5224e05d9f41 fcf46511d7819220e0cc310ae6d891fadfdb79aa CI 1617683374 +1000 rebase -i (start): checkout 68ac4e416c01408d37c59465852aa1856a4abdb1 -fcf46511d7819220e0cc310ae6d891fadfdb79aa 9936b8f380c2937bb457ade468bfc7dc850293f9 CI 1617683374 +1000 rebase -i (squash): file4 -9936b8f380c2937bb457ade468bfc7dc850293f9 9936b8f380c2937bb457ade468bfc7dc850293f9 CI 1617683374 +1000 rebase -i (finish): returning to refs/heads/branch2 -9936b8f380c2937bb457ade468bfc7dc850293f9 9d187b7f4819a69996dd27e3d66a5224e05d9f41 CI 1617683376 +1000 [lazygit undo]: updating HEAD -9d187b7f4819a69996dd27e3d66a5224e05d9f41 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683377 +1000 [lazygit undo]: updating HEAD -3e4f2b1aeb076cff592279f94b1f495442690521 7ce8eac65e3ae50cb50a570dc775b745464f3a3e CI 1617683377 +1000 [lazygit undo]: updating HEAD -7ce8eac65e3ae50cb50a570dc775b745464f3a3e 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683379 +1000 [lazygit redo]: updating HEAD diff --git a/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/branch2 b/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/branch2 deleted file mode 100644 index 7b49f493a..000000000 --- a/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/branch2 +++ /dev/null @@ -1,11 +0,0 @@ -0000000000000000000000000000000000000000 fcf46511d7819220e0cc310ae6d891fadfdb79aa CI 1617683370 +1000 branch: Created from HEAD -fcf46511d7819220e0cc310ae6d891fadfdb79aa 5d2b236ff0e8342ef1e531506f6f99070d53cf25 CI 1617683370 +1000 commit: file4 -5d2b236ff0e8342ef1e531506f6f99070d53cf25 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683370 +1000 commit: file4 -3e4f2b1aeb076cff592279f94b1f495442690521 7ce8eac65e3ae50cb50a570dc775b745464f3a3e CI 1617683370 +1000 commit: file2 -7ce8eac65e3ae50cb50a570dc775b745464f3a3e 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683372 +1000 rebase -i (finish): refs/heads/branch2 onto 3e4f2b1aeb076cff592279f94b1f495442690521 -3e4f2b1aeb076cff592279f94b1f495442690521 9d187b7f4819a69996dd27e3d66a5224e05d9f41 CI 1617683373 +1000 rebase -i (finish): refs/heads/branch2 onto fcf46511d7819220e0cc310ae6d891fadfdb79aa -9d187b7f4819a69996dd27e3d66a5224e05d9f41 9936b8f380c2937bb457ade468bfc7dc850293f9 CI 1617683374 +1000 rebase -i (finish): refs/heads/branch2 onto 68ac4e416c01408d37c59465852aa1856a4abdb1 -9936b8f380c2937bb457ade468bfc7dc850293f9 9d187b7f4819a69996dd27e3d66a5224e05d9f41 CI 1617683376 +1000 [lazygit undo]: updating HEAD -9d187b7f4819a69996dd27e3d66a5224e05d9f41 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683377 +1000 [lazygit undo]: updating HEAD -3e4f2b1aeb076cff592279f94b1f495442690521 7ce8eac65e3ae50cb50a570dc775b745464f3a3e CI 1617683377 +1000 [lazygit undo]: updating HEAD -7ce8eac65e3ae50cb50a570dc775b745464f3a3e 3e4f2b1aeb076cff592279f94b1f495442690521 CI 1617683379 +1000 [lazygit redo]: updating HEAD diff --git a/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index e973b2106..000000000 --- a/test/integration/undo/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,4 +0,0 @@ -0000000000000000000000000000000000000000 6d95d7a7842625152ba887482879dfdaf247f591 CI 1617683370 +1000 commit (initial): file0 -6d95d7a7842625152ba887482879dfdaf247f591 4f77a25a15ccca0273baa522f7281727f31ceeb8 CI 1617683370 +1000 commit: file1 -4f77a25a15ccca0273baa522f7281727f31ceeb8 68ac4e416c01408d37c59465852aa1856a4abdb1 CI 1617683370 +1000 commit: file2 -68ac4e416c01408d37c59465852aa1856a4abdb1 fcf46511d7819220e0cc310ae6d891fadfdb79aa CI 1617683370 +1000 commit: file4 diff --git a/test/integration/undo/expected/repo/.git_keep/objects/0c/2aa38e0600e0d2df09c2f84664d8a14f899879 b/test/integration/undo/expected/repo/.git_keep/objects/0c/2aa38e0600e0d2df09c2f84664d8a14f899879 deleted file mode 100644 index 38acaeff2c4712a28ba59b99a0ddd33f70433acf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36 ucmV+<0Nej~0ZYosPf{?lWXQ?POI66vOXUJHO3L%0jEthxR4xGKxeQfIM-lJ< diff --git a/test/integration/undo/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/undo/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 deleted file mode 100644 index f74bf2335bbc5999ad0faff94fb04165d8ab5c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb~ZE#08nZNMgRZ+ diff --git a/test/integration/undo/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/undo/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 deleted file mode 100644 index 79fcadf67fdecb0f0cffca7ff27b2ae5c031e4d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmV-20L}k+0V^p=O;s>9W-v4`Ff%bxNXyJgHDIt1vAVM0pVqc_!H3>=F1`6^?^M%U I033l4YT~68jQ{`u diff --git a/test/integration/undo/expected/repo/.git_keep/objects/2d/00bd505971a8bc7318d98e003aee708a367c85 b/test/integration/undo/expected/repo/.git_keep/objects/2d/00bd505971a8bc7318d98e003aee708a367c85 deleted file mode 100644 index d4270c258e5362e874f0cd17fc6c260a82c41501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 gcmb|y2)08mZ`J^%m! diff --git a/test/integration/undo/expected/repo/.git_keep/objects/3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a b/test/integration/undo/expected/repo/.git_keep/objects/3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a deleted file mode 100644 index 65140e8b7c0189f1a7f6fc780332ce07230ba16e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31 ncmb7HexU|FfcPQQAo?oNi|@w5V5+l;GfpEcfp6=cP_p8Xzx_h zTSy8F8J6yO{8u&g#+QiDD4u+$3jtm&-B*zm7%@oj{4i=z+IQ~dszu>d{VlJw=Ub>F hDKKH+(OTTc#_-_Mea=Ha+){2V^zWQe2>@J}IUIERJ#_#8 diff --git a/test/integration/undo/expected/repo/.git_keep/objects/3e/4f2b1aeb076cff592279f94b1f495442690521 b/test/integration/undo/expected/repo/.git_keep/objects/3e/4f2b1aeb076cff592279f94b1f495442690521 deleted file mode 100644 index 171f5e1db62c604c0f6f6ace10e5366c31494765..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmV;E0Brww0gcW}3c@fHKvBn8MdpIMPxAv2p`$J%N#DalV@rwP^6e6wUe4gwt+l0F zOmyjoh~>EuM6V%2!K$7~q*6jeQBE!)=a>r>v*$zJ-MX0yu~!9&Jdh}gV|3uvYf2Dc zc3hR5$)En(4m(cvK2A^h=C-eLt6O_m^cZ|(4q&ec0OqXcRF^-w(Pfpv`~WYtIQV~P BNL~N{ diff --git a/test/integration/undo/expected/repo/.git_keep/objects/4f/77a25a15ccca0273baa522f7281727f31ceeb8 b/test/integration/undo/expected/repo/.git_keep/objects/4f/77a25a15ccca0273baa522f7281727f31ceeb8 deleted file mode 100644 index 03e728678..000000000 --- a/test/integration/undo/expected/repo/.git_keep/objects/4f/77a25a15ccca0273baa522f7281727f31ceeb8 +++ /dev/null @@ -1,2 +0,0 @@ -xA - @Ѯ=BqFQ(U1& =~sn?ou[׹[xG8&լ겨OmR[0- "NsiEn1OmF{gʺ/@gg3g=z6/] 9 \ No newline at end of file diff --git a/test/integration/undo/expected/repo/.git_keep/objects/59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 b/test/integration/undo/expected/repo/.git_keep/objects/59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 deleted file mode 100644 index ed50454974ab7775c9d85cee55477580ac83e835..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmV-^0D=E_0V^p=O;s>7HexU|FfcPQQAo?oNi|@w5V5+l;GfpEcfp6=cP_p8Xzx_h zTSy8F8J6yO{8u&g#+QiDD4u+$3jtm&-B*zm7%@oj{4i=z+IQ~dszu>d{VlJw=Ub>F gDKKHsW!M`KS-4_PvBb?j2CH`kU1l|{09GbA0`7u1ssI20 diff --git a/test/integration/undo/expected/repo/.git_keep/objects/5d/2b236ff0e8342ef1e531506f6f99070d53cf25 b/test/integration/undo/expected/repo/.git_keep/objects/5d/2b236ff0e8342ef1e531506f6f99070d53cf25 deleted file mode 100644 index a5b4f0d4e283fed559b9a908ac8608bad7f1f9cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmV;E0Brww0gcX03c@fDhGEw^MfQTsYyt}SkUGRuQkH%oYY!OI8NfTBo zwd6PvDf;x+e(HJA_j!5Bm)fz(jraD@7%+x3vY@XB0BWq`RF^-ws_Q0B{Q%KdIy{-F BNqztT diff --git a/test/integration/undo/expected/repo/.git_keep/objects/68/ac4e416c01408d37c59465852aa1856a4abdb1 b/test/integration/undo/expected/repo/.git_keep/objects/68/ac4e416c01408d37c59465852aa1856a4abdb1 deleted file mode 100644 index f1bf22f4dc827c4402584a4498426c0f3ed488f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmV;D0B!$x0gaA93c@fD06pgwxeJornC=Q9LQj3hX0yRUV@rwP^X(J74#P0Iwl;SU zH$3&-%-@VzC=}(wSPDwbwWI(vSS2=K#+Vh=ZL-_D`)ef4vw#6>Gwugt|$a9Po{24+B?x4q1w?B1P=f%+d0NATK95W?G AzW@LL diff --git a/test/integration/undo/expected/repo/.git_keep/objects/6d/95d7a7842625152ba887482879dfdaf247f591 b/test/integration/undo/expected/repo/.git_keep/objects/6d/95d7a7842625152ba887482879dfdaf247f591 deleted file mode 100644 index 5dd318b9712a36232ccac497d114f6e70da2bbc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmV--0Eqv10gcT;3c@fDMq$@E#q0%{NyelB5uvLdBWeC%p`oQj@c8x!ZXX}Kd24Oy zB&wHw03>kmA;%a?mV5B22*5+GTG{4OZG=WuYtpB`w}Zxs9^>@FH?@7mZQk0G#7ppl ZbAjn9%xunjPCEYNrY(<)R zttYtjL&Qo-7y-CK&gf>4!l*)7IVjJVBvB5Y*zA1ByW2s6Lh&rcC9JBE01_#M;x$kV z0gzk-Z}`(++hNDa-pA=FUvB#rf-^_=SRCpWsR0_F!^pgACS CDoK3+ diff --git a/test/integration/undo/expected/repo/.git_keep/objects/8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 b/test/integration/undo/expected/repo/.git_keep/objects/8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 deleted file mode 100644 index 2920ab335181ed440a54f52297d3cb1ab3a70222..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmV-_0D%8^0V^p=O;s>7HexU|FfcPQQAo?oNi|@w5V5+l;GfpEcfp6=cP_p8Xzx_h zTSy8F8J6yO{8u&g#+QiDD4u+$3jtm&-B*zm7%@oj{4i=z+IQ~dszu>d{VlJw=Ub>F hDKKGpdh}?7z2{=TwsT3^k!H3(=W$*+1^{g9Id)YJJaPa4 diff --git a/test/integration/undo/expected/repo/.git_keep/objects/99/36b8f380c2937bb457ade468bfc7dc850293f9 b/test/integration/undo/expected/repo/.git_keep/objects/99/36b8f380c2937bb457ade468bfc7dc850293f9 deleted file mode 100644 index aeb252f851f89d126242aaf7006489938b49d3bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmV;K0A~Mq0fmmc3d1lA06Y6Dycde)hb%)Wg-rPj*^y}=ZbEROpWh7GI~^Q1Tv=P2 zyM~l5eHYPg%GMCpNG3z6=&VSw2>_(J6cRWl&Ni!!cX@Y>#KnsTEC#%x$;A?q$3Vd{ z0|jKydCH*p(_ibZhf&{$@hM+!+akBJwuc6Uh~!)}`U=Jvb=YI7%b(nzxvKLbUY+;> Hy&pQ=m=;Mn diff --git a/test/integration/undo/expected/repo/.git_keep/objects/9d/187b7f4819a69996dd27e3d66a5224e05d9f41 b/test/integration/undo/expected/repo/.git_keep/objects/9d/187b7f4819a69996dd27e3d66a5224e05d9f41 deleted file mode 100644 index e1d183bb8f7b5dcb65e84f100c9252d08ec8a6a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0fmms3c@fD06pg`au;Mb+vWixLQnmSO|pvxV@rwP=i7sKufs4*SzBAW z#pF(X7qL{cgXlFx$XL{q6Dcksq9~;?A#vpFve|f-SGQVp@FQXk@n|>@D1{JMe2oc} ztJWM6v*CAtth=3Nd!6RHe7J2-xsPx# diff --git a/test/integration/undo/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/undo/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c deleted file mode 100644 index 0e95eb06dda15fe1901a7942e7954b700b36bfa9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmV-r0Gj`J0V^p=O;xb8WH2-^Ff%bxNXyJgHDIt1vAVM0pVqc_!H3>=F1`6^?^M%U zND2%YmhO4{S2gv2WLwJR>kD diff --git a/test/integration/undo/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/undo/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/undo/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 b/test/integration/undo/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 deleted file mode 100644 index 2e9066287..000000000 --- a/test/integration/undo/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 +++ /dev/null @@ -1,2 +0,0 @@ -x+)JMU03c040031QHI5`ֶww.hT[H - yW5Ɨ(| ^-W(x9 \ No newline at end of file diff --git a/test/integration/undo/expected/repo/.git_keep/objects/e5/c5c5583f49a34e86ce622b59363df99e09d4c6 b/test/integration/undo/expected/repo/.git_keep/objects/e5/c5c5583f49a34e86ce622b59363df99e09d4c6 deleted file mode 100644 index 01ce23cee261a5c479d905ee8318e897bf4bca8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30 mcmb~-q%PKJUL9GL*(lMbH% diff --git a/test/integration/undo/expected/repo/.git_keep/objects/e7/76522ac28860d2eba6fe98fa4fad67e798419a b/test/integration/undo/expected/repo/.git_keep/objects/e7/76522ac28860d2eba6fe98fa4fad67e798419a deleted file mode 100644 index 08edf28f3f282798a9dd14ae1222a66d0c4a783a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmV-_0D%8^0V^p=O;s>7HexU|FfcPQQAo?oNi|@w5V5+l;GfpEcfp6=cP_p8Xzx_h zTSy8F8J6yO{8u&g#+QiDD4u+$3jtm&-B*zm7%^C{T5hys-jyt=kDGjX{j7V6OEbKX h6qqpZXf5tzV|Z}sKIfqyZYehw`ghK#1OQ99IE)E{Iurl^ diff --git a/test/integration/undo/expected/repo/.git_keep/objects/fc/f46511d7819220e0cc310ae6d891fadfdb79aa b/test/integration/undo/expected/repo/.git_keep/objects/fc/f46511d7819220e0cc310ae6d891fadfdb79aa deleted file mode 100644 index 35d0eab8b..000000000 --- a/test/integration/undo/expected/repo/.git_keep/objects/fc/f46511d7819220e0cc310ae6d891fadfdb79aa +++ /dev/null @@ -1,3 +0,0 @@ -xA - @Ѯ=BqtJ)dc & =~sn?oekmCNa~kJp>ij'gv>m"T$Ă)R@11r*vaa|۾M ' -!;{99OneU4?O9- \ No newline at end of file diff --git a/test/integration/undo/expected/repo/.git_keep/refs/heads/branch2 b/test/integration/undo/expected/repo/.git_keep/refs/heads/branch2 deleted file mode 100644 index f152723fe..000000000 --- a/test/integration/undo/expected/repo/.git_keep/refs/heads/branch2 +++ /dev/null @@ -1 +0,0 @@ -3e4f2b1aeb076cff592279f94b1f495442690521 diff --git a/test/integration/undo/expected/repo/.git_keep/refs/heads/master b/test/integration/undo/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index c4d4b22b4..000000000 --- a/test/integration/undo/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -fcf46511d7819220e0cc310ae6d891fadfdb79aa diff --git a/test/integration/undo/expected/repo/file0 b/test/integration/undo/expected/repo/file0 deleted file mode 100644 index 38143ad4a..000000000 --- a/test/integration/undo/expected/repo/file0 +++ /dev/null @@ -1 +0,0 @@ -test0 diff --git a/test/integration/undo/expected/repo/file1 b/test/integration/undo/expected/repo/file1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/undo/expected/repo/file1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/undo/expected/repo/file2 b/test/integration/undo/expected/repo/file2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/undo/expected/repo/file2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/undo/expected/repo/file4 b/test/integration/undo/expected/repo/file4 deleted file mode 100644 index 0c2aa38e0..000000000 --- a/test/integration/undo/expected/repo/file4 +++ /dev/null @@ -1,3 +0,0 @@ -line one -line two -line three diff --git a/test/integration/undo/recording.json b/test/integration/undo/recording.json deleted file mode 100644 index 3c4161386..000000000 --- a/test/integration/undo/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":627,"Mod":0,"Key":259,"Ch":0},{"Timestamp":979,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1443,"Mod":0,"Key":256,"Ch":100},{"Timestamp":1723,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2411,"Mod":0,"Key":256,"Ch":102},{"Timestamp":2811,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3515,"Mod":0,"Key":256,"Ch":115},{"Timestamp":3994,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5490,"Mod":0,"Key":256,"Ch":122},{"Timestamp":6490,"Mod":0,"Key":256,"Ch":122},{"Timestamp":7387,"Mod":0,"Key":256,"Ch":122},{"Timestamp":8428,"Mod":2,"Key":26,"Ch":26},{"Timestamp":9234,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/undo/setup.sh b/test/integration/undo/setup.sh deleted file mode 100644 index 4cd444a1f..000000000 --- a/test/integration/undo/setup.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/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 "line one" > file4 -git add . -git commit -am file4 - -git checkout -b branch2 - -echo "line two" >> file4 -git add . -git commit -am file4 - -echo "line three" >> file4 -git add . -git commit -am file4 - -echo "line two" >> file2 -git add . -git commit -am file2 diff --git a/test/integration/undo/test.json b/test/integration/undo/test.json deleted file mode 100644 index 70ec964d0..000000000 --- a/test/integration/undo/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "undoing some changes to commits. Skipped because it's failing on CI for some reason", "speed": 10, "skip": true }