From ac580ae6a05d306329664047d729069d0d4679da Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 18:33:01 +1100 Subject: [PATCH] migrate undo2 --- pkg/integration/tests/tests_gen.go | 1 + .../tests/undo/undo_checkout_and_drop.go | 151 ++++++++++++++++++ .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../undo2/expected/repo/.git_keep/FETCH_HEAD | 0 .../undo2/expected/repo/.git_keep/HEAD | 1 - .../undo2/expected/repo/.git_keep/ORIG_HEAD | 1 - .../undo2/expected/repo/.git_keep/config | 10 -- .../undo2/expected/repo/.git_keep/description | 1 - .../undo2/expected/repo/.git_keep/index | Bin 353 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../undo2/expected/repo/.git_keep/logs/HEAD | 28 ---- .../repo/.git_keep/logs/refs/heads/branch2 | 11 -- .../repo/.git_keep/logs/refs/heads/master | 8 - .../0c/2aa38e0600e0d2df09c2f84664d8a14f899879 | Bin 36 -> 0 bytes .../0e/2680a41392859e5159716b50525850017c6a59 | 2 - .../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 .../48/1ce2cf9d037b83acb1d452973695764bf7b95e | 2 - .../59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 | Bin 126 -> 0 bytes .../8d/31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 | Bin 118 -> 0 bytes .../8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 | Bin 127 -> 0 bytes .../9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c | Bin 101 -> 0 bytes .../a3/bf51bf610771f997de1d3f313ab7c43e20bef5 | Bin 148 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../bc/e6c0c795a3d37c0a2c382a6d9c146b1889f86c | Bin 147 -> 0 bytes .../d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 | 2 - .../df/1876c035ade1ba199afadd399a6d4273190cd8 | Bin 146 -> 0 bytes .../e5/1d8e24ead991fdd7fd9b9d90924c2e24576981 | Bin 148 -> 0 bytes .../e5/c5c5583f49a34e86ce622b59363df99e09d4c6 | Bin 30 -> 0 bytes .../e7/76522ac28860d2eba6fe98fa4fad67e798419a | Bin 127 -> 0 bytes .../repo/.git_keep/refs/heads/branch2 | 1 - .../expected/repo/.git_keep/refs/heads/master | 1 - test/integration/undo2/expected/repo/file0 | 1 - test/integration/undo2/expected/repo/file1 | 1 - test/integration/undo2/expected/repo/file2 | 1 - test/integration/undo2/expected/repo/file4 | 1 - test/integration/undo2/recording.json | 1 - test/integration/undo2/setup.sh | 40 ----- test/integration/undo2/test.json | 1 - 43 files changed, 152 insertions(+), 122 deletions(-) create mode 100644 pkg/integration/tests/undo/undo_checkout_and_drop.go delete mode 100644 test/integration/undo2/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/undo2/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/undo2/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/undo2/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/undo2/expected/repo/.git_keep/config delete mode 100644 test/integration/undo2/expected/repo/.git_keep/description delete mode 100644 test/integration/undo2/expected/repo/.git_keep/index delete mode 100644 test/integration/undo2/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/undo2/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/branch2 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/0c/2aa38e0600e0d2df09c2f84664d8a14f899879 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/0e/2680a41392859e5159716b50525850017c6a59 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/2d/00bd505971a8bc7318d98e003aee708a367c85 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/38/143ad4a0fe2ab6ee53c2ef89a5d9e2bd9535da delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/3d/b2086f780b1cf632eec29111ef395913a8ab2b delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/48/1ce2cf9d037b83acb1d452973695764bf7b95e delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/8d/31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/a3/bf51bf610771f997de1d3f313ab7c43e20bef5 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/bc/e6c0c795a3d37c0a2c382a6d9c146b1889f86c delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/d0/76cc9cc09acaa2d36fbc7a95fd3e2306494641 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/df/1876c035ade1ba199afadd399a6d4273190cd8 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/e5/1d8e24ead991fdd7fd9b9d90924c2e24576981 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/e5/c5c5583f49a34e86ce622b59363df99e09d4c6 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/objects/e7/76522ac28860d2eba6fe98fa4fad67e798419a delete mode 100644 test/integration/undo2/expected/repo/.git_keep/refs/heads/branch2 delete mode 100644 test/integration/undo2/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/undo2/expected/repo/file0 delete mode 100644 test/integration/undo2/expected/repo/file1 delete mode 100644 test/integration/undo2/expected/repo/file2 delete mode 100644 test/integration/undo2/expected/repo/file4 delete mode 100644 test/integration/undo2/recording.json delete mode 100644 test/integration/undo2/setup.sh delete mode 100644 test/integration/undo2/test.json diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index 5d831900e..5c3c24cbc 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -85,5 +85,6 @@ var tests = []*components.IntegrationTest{ sync.Pull, sync.PullAndSetUpstream, sync.RenameBranchAndPull, + undo.UndoCheckoutAndDrop, undo.UndoDrop, } diff --git a/pkg/integration/tests/undo/undo_checkout_and_drop.go b/pkg/integration/tests/undo/undo_checkout_and_drop.go new file mode 100644 index 000000000..b953c2528 --- /dev/null +++ b/pkg/integration/tests/undo/undo_checkout_and_drop.go @@ -0,0 +1,151 @@ +package undo + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var UndoCheckoutAndDrop = 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") + + shell.NewBranch("other_branch") + shell.Checkout("master") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + // we're going to drop a commit, switch branch, drop a commit there, then undo everything, then redo everything. + + confirmCommitDrop := func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Delete Commit")). + Content(Equals("Are you sure you want to delete this commit?")). + Confirm() + } + + confirmUndoDrop := 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() + } + + confirmRedoDrop := 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"), + ) + + t.Views().Branches().Focus(). + Lines( + Contains("master").IsSelected(), + Contains("other_branch"), + ). + SelectNextItem(). + // checkout branch + PressPrimaryAction(). + Lines( + Contains("other_branch").IsSelected(), + Contains("master"), + ) + + // drop the commit in the 'other_branch' branch too + 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.Undo). + Tap(confirmUndoDrop). + Lines( + Contains("four").IsSelected(), + Contains("three"), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Undo). + Tap(func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Undo")). + Content(Contains("Are you sure you want to checkout 'master'?")). + Confirm() + + t.Views().Branches(). + Lines( + Contains("master").IsSelected(), + Contains("other_branch"), + ) + }). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Undo). + Tap(confirmUndoDrop). + Lines( + Contains("four").IsSelected(), + Contains("three"), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Redo). + Tap(confirmRedoDrop). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ). + Press(keys.Universal.Redo). + Tap(func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Redo")). + Content(Contains("Are you sure you want to checkout 'other_branch'?")). + Confirm() + + t.Views().Branches(). + Lines( + Contains("other_branch").IsSelected(), + Contains("master"), + ) + }). + Press(keys.Universal.Redo). + Tap(confirmRedoDrop). + Lines( + Contains("three").IsSelected(), + Contains("two"), + Contains("one"), + ) + }, +}) diff --git a/test/integration/undo2/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/undo2/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 6c493ff74..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file2 diff --git a/test/integration/undo2/expected/repo/.git_keep/FETCH_HEAD b/test/integration/undo2/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/undo2/expected/repo/.git_keep/HEAD b/test/integration/undo2/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/undo2/expected/repo/.git_keep/ORIG_HEAD b/test/integration/undo2/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index 064ef4565..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -481ce2cf9d037b83acb1d452973695764bf7b95e diff --git a/test/integration/undo2/expected/repo/.git_keep/config b/test/integration/undo2/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/undo2/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/undo2/expected/repo/.git_keep/description b/test/integration/undo2/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/undo2/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/undo2/expected/repo/.git_keep/index b/test/integration/undo2/expected/repo/.git_keep/index deleted file mode 100644 index 0385f0c7ecee52fe318607af8532af25eac52e9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmZ?q402{*U|<4bmW1plETWo|*28E=F1`6^?^M%U46JFHIjIIfX$A(6ele>%Aut+hP87O1OZPnftD1V_OGIcCPrlQI z0I!zrs}OSxVdn5L9BT*!nggaG=J?y7nB=N-?^8o7KK;!x4hDxZ=nt`#|UN) zKetwe70?_o4K>FN%^Xf$hP?rig)8ZuzFX}WmeM)F~ 1617683460 +1000 commit (initial): file0 -8d31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 0e2680a41392859e5159716b50525850017c6a59 CI 1617683460 +1000 commit: file1 -0e2680a41392859e5159716b50525850017c6a59 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683460 +1000 commit: file2 -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683460 +1000 commit: file4 -a3bf51bf610771f997de1d3f313ab7c43e20bef5 a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683460 +1000 checkout: moving from master to branch2 -a3bf51bf610771f997de1d3f313ab7c43e20bef5 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683460 +1000 commit: file4 -481ce2cf9d037b83acb1d452973695764bf7b95e e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683460 +1000 commit: file4 -e51d8e24ead991fdd7fd9b9d90924c2e24576981 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683460 +1000 commit: file2 -df1876c035ade1ba199afadd399a6d4273190cd8 a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683461 +1000 checkout: moving from branch2 to master -a3bf51bf610771f997de1d3f313ab7c43e20bef5 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683462 +1000 rebase -i (start): checkout bce6c0c795a3d37c0a2c382a6d9c146b1889f86c -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683462 +1000 rebase -i (finish): returning to refs/heads/master -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c 0e2680a41392859e5159716b50525850017c6a59 CI 1617683463 +1000 rebase -i (start): checkout 0e2680a41392859e5159716b50525850017c6a59 -0e2680a41392859e5159716b50525850017c6a59 0e2680a41392859e5159716b50525850017c6a59 CI 1617683463 +1000 rebase -i (finish): returning to refs/heads/master -0e2680a41392859e5159716b50525850017c6a59 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683464 +1000 checkout: moving from master to branch2 -df1876c035ade1ba199afadd399a6d4273190cd8 e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683465 +1000 rebase -i (start): checkout e51d8e24ead991fdd7fd9b9d90924c2e24576981 -e51d8e24ead991fdd7fd9b9d90924c2e24576981 e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683465 +1000 rebase -i (finish): returning to refs/heads/branch2 -e51d8e24ead991fdd7fd9b9d90924c2e24576981 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683466 +1000 rebase -i (start): checkout 481ce2cf9d037b83acb1d452973695764bf7b95e -481ce2cf9d037b83acb1d452973695764bf7b95e 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683466 +1000 rebase -i (finish): returning to refs/heads/branch2 -481ce2cf9d037b83acb1d452973695764bf7b95e e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683466 +1000 [lazygit undo]: updating HEAD -e51d8e24ead991fdd7fd9b9d90924c2e24576981 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683467 +1000 [lazygit undo]: updating HEAD -df1876c035ade1ba199afadd399a6d4273190cd8 0e2680a41392859e5159716b50525850017c6a59 CI 1617683467 +1000 [lazygit undo] -0e2680a41392859e5159716b50525850017c6a59 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683468 +1000 [lazygit undo]: updating HEAD -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683468 +1000 [lazygit undo]: updating HEAD -a3bf51bf610771f997de1d3f313ab7c43e20bef5 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683469 +1000 [lazygit undo] -df1876c035ade1ba199afadd399a6d4273190cd8 e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683470 +1000 [lazygit undo]: updating HEAD -e51d8e24ead991fdd7fd9b9d90924c2e24576981 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683470 +1000 [lazygit undo]: updating HEAD -481ce2cf9d037b83acb1d452973695764bf7b95e a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683471 +1000 [lazygit undo]: updating HEAD -a3bf51bf610771f997de1d3f313ab7c43e20bef5 a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683471 +1000 [lazygit undo] diff --git a/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/branch2 b/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/branch2 deleted file mode 100644 index 692281b19..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/branch2 +++ /dev/null @@ -1,11 +0,0 @@ -0000000000000000000000000000000000000000 a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683460 +1000 branch: Created from HEAD -a3bf51bf610771f997de1d3f313ab7c43e20bef5 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683460 +1000 commit: file4 -481ce2cf9d037b83acb1d452973695764bf7b95e e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683460 +1000 commit: file4 -e51d8e24ead991fdd7fd9b9d90924c2e24576981 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683460 +1000 commit: file2 -df1876c035ade1ba199afadd399a6d4273190cd8 e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683465 +1000 rebase -i (finish): refs/heads/branch2 onto e51d8e24ead991fdd7fd9b9d90924c2e24576981 -e51d8e24ead991fdd7fd9b9d90924c2e24576981 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683466 +1000 rebase -i (finish): refs/heads/branch2 onto 481ce2cf9d037b83acb1d452973695764bf7b95e -481ce2cf9d037b83acb1d452973695764bf7b95e e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683466 +1000 [lazygit undo]: updating HEAD -e51d8e24ead991fdd7fd9b9d90924c2e24576981 df1876c035ade1ba199afadd399a6d4273190cd8 CI 1617683467 +1000 [lazygit undo]: updating HEAD -df1876c035ade1ba199afadd399a6d4273190cd8 e51d8e24ead991fdd7fd9b9d90924c2e24576981 CI 1617683470 +1000 [lazygit undo]: updating HEAD -e51d8e24ead991fdd7fd9b9d90924c2e24576981 481ce2cf9d037b83acb1d452973695764bf7b95e CI 1617683470 +1000 [lazygit undo]: updating HEAD -481ce2cf9d037b83acb1d452973695764bf7b95e a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683471 +1000 [lazygit undo]: updating HEAD diff --git a/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 805835942..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,8 +0,0 @@ -0000000000000000000000000000000000000000 8d31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 CI 1617683460 +1000 commit (initial): file0 -8d31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 0e2680a41392859e5159716b50525850017c6a59 CI 1617683460 +1000 commit: file1 -0e2680a41392859e5159716b50525850017c6a59 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683460 +1000 commit: file2 -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683460 +1000 commit: file4 -a3bf51bf610771f997de1d3f313ab7c43e20bef5 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683462 +1000 rebase -i (finish): refs/heads/master onto bce6c0c795a3d37c0a2c382a6d9c146b1889f86c -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c 0e2680a41392859e5159716b50525850017c6a59 CI 1617683463 +1000 rebase -i (finish): refs/heads/master onto 0e2680a41392859e5159716b50525850017c6a59 -0e2680a41392859e5159716b50525850017c6a59 bce6c0c795a3d37c0a2c382a6d9c146b1889f86c CI 1617683468 +1000 [lazygit undo]: updating HEAD -bce6c0c795a3d37c0a2c382a6d9c146b1889f86c a3bf51bf610771f997de1d3f313ab7c43e20bef5 CI 1617683468 +1000 [lazygit undo]: updating HEAD diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/0c/2aa38e0600e0d2df09c2f84664d8a14f899879 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/0e/2680a41392859e5159716b50525850017c6a59 b/test/integration/undo2/expected/repo/.git_keep/objects/0e/2680a41392859e5159716b50525850017c6a59 deleted file mode 100644 index dab8fd41a..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/objects/0e/2680a41392859e5159716b50525850017c6a59 +++ /dev/null @@ -1,2 +0,0 @@ -x; -0 @; EGBCeH\#ty Ou.P(,̮zj$.U(wzdѓ88&!$𧿶Sd[ egnڼ(9 \ No newline at end of file diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/1e/3e67b999db1576ad1ee08bf4f02bdf29e49442 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/2d/00bd505971a8bc7318d98e003aee708a367c85 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/3b/aaa732b89ed46a1af1b24d0d4e3b8c7375684a b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/48/1ce2cf9d037b83acb1d452973695764bf7b95e b/test/integration/undo2/expected/repo/.git_keep/objects/48/1ce2cf9d037b83acb1d452973695764bf7b95e deleted file mode 100644 index a4ba62ac1..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/objects/48/1ce2cf9d037b83acb1d452973695764bf7b95e +++ /dev/null @@ -1,2 +0,0 @@ -xA - @Ѯ=BqIBV9ƨ# & =~sn?o-U; r x@Y4 Dr[T#B$q`_aާ_iň'7uY՛n: \ No newline at end of file diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/59/a0ec98e1847ca72dc35b7ab8b84f527b6af280 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/8d/31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 b/test/integration/undo2/expected/repo/.git_keep/objects/8d/31a10ce1a1a1606ab02e8a2a59a6c56808f7c5 deleted file mode 100644 index e5028f911022d2b071f22b9d57caae7f23b28969..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmV-+0Ez#20gcT;3c@fDMq$@E#q0%{NynrC5uvLdBWeC%p&_M2@c8x!ZXX}KrPaE2 z64gsT01^yvK7|l+lDl^?3&3M4TG*ysY=8z;YvQNB+drapK)L YsAIYcGn=!Xla4>RDeDF{Kij)2?p``L4*&oF diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/8e/4cb0cd56d785ba4442a5b20e7ae5de5ae33723 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/9e/88a70dc8d82dd2afbfd50176ef78e18823bc2c b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/a3/bf51bf610771f997de1d3f313ab7c43e20bef5 b/test/integration/undo2/expected/repo/.git_keep/objects/a3/bf51bf610771f997de1d3f313ab7c43e20bef5 deleted file mode 100644 index 751b9844f3079311dd7fc1ff7036c399b43ac200..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gcX03c@fDKw;N8MfQSB{w5O;5xVLzCesNPT3bp4k8h9Q_VF#AZ0kCA z>x#ehL)E6jpi)R3#VnltBq7zzl`6%Se6GmN6PTS3eRo?$Q9yD@9Hx*3*h?VKI2Cab zt0O9nPz-P+WRm*^~>wN=uNiuVI8`R6e5DXIsh`~^A08nuUMF0Q* diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/bc/e6c0c795a3d37c0a2c382a6d9c146b1889f86c b/test/integration/undo2/expected/repo/.git_keep/objects/bc/e6c0c795a3d37c0a2c382a6d9c146b1889f86c deleted file mode 100644 index bc5e863f8f4bc259171bea4e14410ad08f422304..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmV;E0Brww0gaA93c@fDMP26<*$Xl=?IaTr5xVLz(qw{##+DMnZoWtfG`GagM;^Hregny$zt*Fq$YcRMk|KXI2i3vEX5b zM4Z9Nr$5)-kCVTR)5E^fwwGPX+U_0*66I^8;Li|3a0fl6y8W5Ey1WeC52>O##(F(V AApigX diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/e5/1d8e24ead991fdd7fd9b9d90924c2e24576981 b/test/integration/undo2/expected/repo/.git_keep/objects/e5/1d8e24ead991fdd7fd9b9d90924c2e24576981 deleted file mode 100644 index d784921aac901108b62c250da2679bea8fdba127..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gcX03c@fDKw;N8MfQSZGWi=25xVLzGU)^hjV&R9$G1mt`}h{G?5(Xs z1KG>yA{rOACWRW4VJJ1A6)BbgKq`_az??E$R!8pg9@-@+VoRmPVC00kFf7hniWtbp z;J8L6FDie=YwvoR^?jP3^3Cnop3;#Pp;~^iBmsK0y#K6 C`9zQa diff --git a/test/integration/undo2/expected/repo/.git_keep/objects/e5/c5c5583f49a34e86ce622b59363df99e09d4c6 b/test/integration/undo2/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/undo2/expected/repo/.git_keep/objects/e7/76522ac28860d2eba6fe98fa4fad67e798419a b/test/integration/undo2/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/undo2/expected/repo/.git_keep/refs/heads/branch2 b/test/integration/undo2/expected/repo/.git_keep/refs/heads/branch2 deleted file mode 100644 index fe4f6f367..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/refs/heads/branch2 +++ /dev/null @@ -1 +0,0 @@ -a3bf51bf610771f997de1d3f313ab7c43e20bef5 diff --git a/test/integration/undo2/expected/repo/.git_keep/refs/heads/master b/test/integration/undo2/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index fe4f6f367..000000000 --- a/test/integration/undo2/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -a3bf51bf610771f997de1d3f313ab7c43e20bef5 diff --git a/test/integration/undo2/expected/repo/file0 b/test/integration/undo2/expected/repo/file0 deleted file mode 100644 index 38143ad4a..000000000 --- a/test/integration/undo2/expected/repo/file0 +++ /dev/null @@ -1 +0,0 @@ -test0 diff --git a/test/integration/undo2/expected/repo/file1 b/test/integration/undo2/expected/repo/file1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/undo2/expected/repo/file1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/undo2/expected/repo/file2 b/test/integration/undo2/expected/repo/file2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/undo2/expected/repo/file2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/undo2/expected/repo/file4 b/test/integration/undo2/expected/repo/file4 deleted file mode 100644 index 2d00bd505..000000000 --- a/test/integration/undo2/expected/repo/file4 +++ /dev/null @@ -1 +0,0 @@ -line one diff --git a/test/integration/undo2/recording.json b/test/integration/undo2/recording.json deleted file mode 100644 index c9398dfa5..000000000 --- a/test/integration/undo2/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":647,"Mod":0,"Key":259,"Ch":0},{"Timestamp":917,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1245,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1646,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1957,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2205,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2533,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2765,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3141,"Mod":0,"Key":260,"Ch":0},{"Timestamp":3397,"Mod":0,"Key":257,"Ch":0},{"Timestamp":3637,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3933,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4780,"Mod":0,"Key":259,"Ch":0},{"Timestamp":5205,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5405,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5685,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5877,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6277,"Mod":0,"Key":256,"Ch":122},{"Timestamp":6725,"Mod":0,"Key":256,"Ch":122},{"Timestamp":7317,"Mod":0,"Key":256,"Ch":122},{"Timestamp":7845,"Mod":0,"Key":256,"Ch":122},{"Timestamp":8372,"Mod":0,"Key":256,"Ch":122},{"Timestamp":8885,"Mod":0,"Key":256,"Ch":122},{"Timestamp":9469,"Mod":0,"Key":256,"Ch":122},{"Timestamp":10069,"Mod":0,"Key":256,"Ch":122},{"Timestamp":10645,"Mod":0,"Key":256,"Ch":122},{"Timestamp":11189,"Mod":0,"Key":256,"Ch":122},{"Timestamp":12077,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/undo2/setup.sh b/test/integration/undo2/setup.sh deleted file mode 100644 index 4cd444a1f..000000000 --- a/test/integration/undo2/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/undo2/test.json b/test/integration/undo2/test.json deleted file mode 100644 index 1080ff7ec..000000000 --- a/test/integration/undo2/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "undoing changes in both commits and branches. Skipped because it's failing on CI for some reason", "speed": 10, "skip":true}