From c63fed20743478848a3bfe6642c58edf1058603d Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 23 Feb 2023 22:29:40 +1100 Subject: [PATCH] migrate staging tests --- pkg/integration/components/actions.go | 7 + .../components/commit_message_panel_driver.go | 16 +- pkg/integration/components/test_driver.go | 7 + .../remember_commit_message_after_fail.go | 62 ++++ .../tests/staging/diff_context_change.go | 80 +++++ .../tests/staging/discard_all_changes.go | 54 ++++ pkg/integration/tests/staging/stage_hunks.go | 91 ++++++ pkg/integration/tests/staging/stage_lines.go | 108 +++++++ pkg/integration/tests/staging/stage_ranges.go | 75 +++++ pkg/integration/tests/tests_gen.go | 7 + pkg/integration/tests/ui/double_popup.go | 34 ++ .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../popupFocus/expected/repo/.git_keep/HEAD | 1 - .../popupFocus/expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../popupFocus/expected/repo/.git_keep/index | Bin 281 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 3 - .../repo/.git_keep/logs/refs/heads/master | 3 - .../04/78d727ea0ebf57ed9ca85acef9e60a324d86f0 | 3 - .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../35/3cce986c61f361452f43522426c120b4ee9461 | 3 - .../6e/cdae79ff53548670039abee9008b6bb36cdf4f | 2 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../popupFocus/expected/repo/myfile1 | 1 - .../popupFocus/expected/repo/myfile2 | 1 - .../popupFocus/expected/repo/myfile3 | 1 - test/integration/popupFocus/recording.json | 1 - test/integration/popupFocus/setup.sh | 18 -- test/integration/popupFocus/test.json | 1 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 8 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 209 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 6 - .../expected/repo/.git_keep/logs/HEAD | 2 - .../repo/.git_keep/logs/refs/heads/master | 2 - .../6c/493ff740f9380390d5c9ddef4af18697ac9375 | Bin 21 -> 0 bytes .../ae/ac8b060acee50f309eb1f6698a981c50bdf493 | Bin 75 -> 0 bytes .../c2/bf9b666a310383fd7095bc5bd993bba11b040e | Bin 121 -> 0 bytes .../c9/62a96f68e65b4dc8e0fea12db5f9006091efdf | Bin 50 -> 0 bytes .../d0/ce4cb10cd926f646a08889b077a6d7eddd3534 | Bin 150 -> 0 bytes .../e2/129701f1a4d54dc44f03c93bca0a2aec7c5449 | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/file1 | 1 - .../expected/repo/file2 | 1 - .../recording.json | 1 - .../rememberCommitMessageAfterFail/setup.sh | 23 -- .../rememberCommitMessageAfterFail/test.json | 1 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 118 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 1 - .../repo/.git_keep/logs/refs/heads/master | 1 - .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 588 -> 0 bytes .../18/54ab416d299cda0227d62b9ab0765e5551ef57 | Bin 118 -> 0 bytes .../2c/484c0a45f3726375600319f73978221a74b783 | Bin 594 -> 0 bytes .../7b/9c2149f16c706cea79b03234cb67fde7e9b68f | Bin 52 -> 0 bytes .../8a/af931e5367e5af9d2e2c014800d22190352b14 | Bin 608 -> 0 bytes .../fd/c28832bb15c80146150a24a018088c9df4f8cd | Bin 616 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/one.txt | 67 ---- .../staginWithDiffContextChange/files/one.txt | 63 ---- .../files/one_new.txt | 67 ---- .../recording.json | 1 - .../staginWithDiffContextChange/setup.sh | 16 - .../staginWithDiffContextChange/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../staging/expected/repo/.git_keep/HEAD | 1 - .../staging/expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../staging/expected/repo/.git_keep/index | Bin 281 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../staging/expected/repo/.git_keep/logs/HEAD | 2 - .../repo/.git_keep/logs/refs/heads/master | 2 - .../12/c4186053ecd4056526743060a8fe87429b7306 | Bin 2331 -> 0 bytes .../63/5b45efaba0c2415658bc121de201ec43a47920 | 4 - .../64/97d00f0447159947a805f3a38e8c44ed2865b1 | Bin 118 -> 0 bytes .../73/f226ec630e261c016df5bd80e3156eaba42d7e | Bin 482 -> 0 bytes .../79/8369253f104fe8cdc91db6f7d3525be532218e | Bin 369 -> 0 bytes .../a0/425534134de68284a0a7250b83b0e6303f0ed7 | Bin 2327 -> 0 bytes .../a4/8a7caa799e7859b8f21d373e3f01b06002d42f | Bin 476 -> 0 bytes .../a6/985076907d3ed64cf59480bb2eec313ea221cf | Bin 147 -> 0 bytes .../ac/43b10fa95a2d2ee6a028c0d0ea878f887d7c51 | Bin 2334 -> 0 bytes .../b7/9b845289f08703b6ffb8927da9665efda4356f | 2 - .../d6/9b45d6d14e1864411d17930012210271c400c3 | 2 - .../e7/86ecad3cea3651947e6c2648f6dae87372276b | Bin 109 -> 0 bytes .../e8/aaa2f356eb341c693e239467fd200d0117b487 | 1 - .../eb/38d1e424df18868f73407ca8087b6350b59f3e | Bin 2262 -> 0 bytes .../fb/e09a11933b44ea60b46bd0f3d44142cb6189a4 | Bin 108 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../integration/staging/expected/repo/one.txt | 15 - .../staging/expected/repo/three.txt | 298 ----------------- .../integration/staging/expected/repo/two.txt | 33 -- test/integration/staging/files/one.txt | 15 - test/integration/staging/files/one_new.txt | 15 - test/integration/staging/files/three.txt | 300 ------------------ test/integration/staging/files/three_new.txt | 298 ----------------- test/integration/staging/files/two.txt | 33 -- test/integration/staging/files/two_new.txt | 33 -- test/integration/staging/recording.json | 1 - test/integration/staging/setup.sh | 18 -- test/integration/staging/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 137 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 1 - .../repo/.git_keep/logs/refs/heads/master | 1 - .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 588 -> 0 bytes .../7b/9c2149f16c706cea79b03234cb67fde7e9b68f | Bin 52 -> 0 bytes .../ad/f0c68f5e5508ce3fc598d5f01a53486bd9d287 | Bin 117 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../stagingDiscard/expected/repo/one.txt | 64 ---- test/integration/stagingDiscard/files/one.txt | 63 ---- .../stagingDiscard/files/one_new.txt | 67 ---- .../integration/stagingDiscard/recording.json | 1 - test/integration/stagingDiscard/setup.sh | 16 - test/integration/stagingDiscard/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 190 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 1 - .../repo/.git_keep/logs/refs/heads/master | 1 - .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 588 -> 0 bytes .../39/a5edebb09b8ebc0269f35c60e2e963b71de9d1 | Bin 59 -> 0 bytes .../bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 | Bin 609 -> 0 bytes .../bc/cb06809b2f0e67bb3d3dd22c2b95882e72cbbb | 4 - .../expected/repo/.git_keep/refs/heads/master | 1 - .../stagingDiscardAll/expected/repo/one.txt | 63 ---- .../stagingDiscardAll/expected/repo/two.txt | 67 ---- .../stagingDiscardAll/files/one.txt | 63 ---- .../stagingDiscardAll/files/one_new.txt | 67 ---- .../stagingDiscardAll/recording.json | 1 - test/integration/stagingDiscardAll/setup.sh | 18 -- test/integration/stagingDiscardAll/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 118 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 1 - .../repo/.git_keep/logs/refs/heads/master | 1 - .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 588 -> 0 bytes .../68/a4bb206023fd2396e04e1ccdf9b853cda4ac70 | Bin 119 -> 0 bytes .../7b/9c2149f16c706cea79b03234cb67fde7e9b68f | Bin 52 -> 0 bytes .../ad/92dc7671a5129b87f0f5c70c90b488ae0ceea6 | Bin 600 -> 0 bytes .../c3/323cfc94775013acea4145545f47ac1af5c9d2 | Bin 617 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/one.txt | 67 ---- .../stagingEnterSecondary/files/one.txt | 63 ---- .../stagingEnterSecondary/files/one_new.txt | 67 ---- .../stagingEnterSecondary/recording.json | 1 - .../stagingEnterSecondary/setup.sh | 16 - .../stagingEnterSecondary/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 118 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 1 - .../repo/.git_keep/logs/refs/heads/master | 1 - .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 588 -> 0 bytes .../7b/9c2149f16c706cea79b03234cb67fde7e9b68f | Bin 52 -> 0 bytes .../80/b489d1f5a71c3e46c7e1a82fe264ffb0a4726f | Bin 613 -> 0 bytes .../bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 | Bin 609 -> 0 bytes .../c3/323cfc94775013acea4145545f47ac1af5c9d2 | Bin 617 -> 0 bytes .../de/59eafcc9bdb8fe9080f70e5252936832b13afe | Bin 118 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../stagingForcedToggle/expected/repo/one.txt | 67 ---- .../stagingForcedToggle/files/one.txt | 63 ---- .../stagingForcedToggle/files/one_new.txt | 67 ---- .../stagingForcedToggle/recording.json | 1 - test/integration/stagingForcedToggle/setup.sh | 16 - .../integration/stagingForcedToggle/test.json | 4 - 199 files changed, 540 insertions(+), 2476 deletions(-) create mode 100644 pkg/integration/tests/file/remember_commit_message_after_fail.go create mode 100644 pkg/integration/tests/staging/diff_context_change.go create mode 100644 pkg/integration/tests/staging/discard_all_changes.go create mode 100644 pkg/integration/tests/staging/stage_hunks.go create mode 100644 pkg/integration/tests/staging/stage_lines.go create mode 100644 pkg/integration/tests/staging/stage_ranges.go create mode 100644 pkg/integration/tests/ui/double_popup.go delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/config delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/description delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/index delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/04/78d727ea0ebf57ed9ca85acef9e60a324d86f0 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/35/3cce986c61f361452f43522426c120b4ee9461 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/6e/cdae79ff53548670039abee9008b6bb36cdf4f delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/popupFocus/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/popupFocus/expected/repo/myfile1 delete mode 100644 test/integration/popupFocus/expected/repo/myfile2 delete mode 100644 test/integration/popupFocus/expected/repo/myfile3 delete mode 100644 test/integration/popupFocus/recording.json delete mode 100644 test/integration/popupFocus/setup.sh delete mode 100644 test/integration/popupFocus/test.json delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/config delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/description delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/index delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/6c/493ff740f9380390d5c9ddef4af18697ac9375 delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/ae/ac8b060acee50f309eb1f6698a981c50bdf493 delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/c2/bf9b666a310383fd7095bc5bd993bba11b040e delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/c9/62a96f68e65b4dc8e0fea12db5f9006091efdf delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/d0/ce4cb10cd926f646a08889b077a6d7eddd3534 delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/e2/129701f1a4d54dc44f03c93bca0a2aec7c5449 delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/file1 delete mode 100644 test/integration/rememberCommitMessageAfterFail/expected/repo/file2 delete mode 100644 test/integration/rememberCommitMessageAfterFail/recording.json delete mode 100644 test/integration/rememberCommitMessageAfterFail/setup.sh delete mode 100644 test/integration/rememberCommitMessageAfterFail/test.json delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/config delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/description delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/index delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/18/54ab416d299cda0227d62b9ab0765e5551ef57 delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/7b/9c2149f16c706cea79b03234cb67fde7e9b68f delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/staginWithDiffContextChange/expected/repo/one.txt delete mode 100644 test/integration/staginWithDiffContextChange/files/one.txt delete mode 100644 test/integration/staginWithDiffContextChange/files/one_new.txt delete mode 100644 test/integration/staginWithDiffContextChange/recording.json delete mode 100644 test/integration/staginWithDiffContextChange/setup.sh delete mode 100644 test/integration/staginWithDiffContextChange/test.json delete mode 100644 test/integration/staging/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/staging/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/staging/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/staging/expected/repo/.git_keep/config delete mode 100644 test/integration/staging/expected/repo/.git_keep/description delete mode 100644 test/integration/staging/expected/repo/.git_keep/index delete mode 100644 test/integration/staging/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/staging/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/staging/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/12/c4186053ecd4056526743060a8fe87429b7306 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/63/5b45efaba0c2415658bc121de201ec43a47920 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/64/97d00f0447159947a805f3a38e8c44ed2865b1 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/73/f226ec630e261c016df5bd80e3156eaba42d7e delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/79/8369253f104fe8cdc91db6f7d3525be532218e delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/a0/425534134de68284a0a7250b83b0e6303f0ed7 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/a4/8a7caa799e7859b8f21d373e3f01b06002d42f delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/a6/985076907d3ed64cf59480bb2eec313ea221cf delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/ac/43b10fa95a2d2ee6a028c0d0ea878f887d7c51 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/b7/9b845289f08703b6ffb8927da9665efda4356f delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/d6/9b45d6d14e1864411d17930012210271c400c3 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/e7/86ecad3cea3651947e6c2648f6dae87372276b delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/e8/aaa2f356eb341c693e239467fd200d0117b487 delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/eb/38d1e424df18868f73407ca8087b6350b59f3e delete mode 100644 test/integration/staging/expected/repo/.git_keep/objects/fb/e09a11933b44ea60b46bd0f3d44142cb6189a4 delete mode 100644 test/integration/staging/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/staging/expected/repo/one.txt delete mode 100644 test/integration/staging/expected/repo/three.txt delete mode 100644 test/integration/staging/expected/repo/two.txt delete mode 100644 test/integration/staging/files/one.txt delete mode 100644 test/integration/staging/files/one_new.txt delete mode 100644 test/integration/staging/files/three.txt delete mode 100644 test/integration/staging/files/three_new.txt delete mode 100644 test/integration/staging/files/two.txt delete mode 100644 test/integration/staging/files/two_new.txt delete mode 100644 test/integration/staging/recording.json delete mode 100644 test/integration/staging/setup.sh delete mode 100644 test/integration/staging/test.json delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/config delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/description delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/index delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/objects/7b/9c2149f16c706cea79b03234cb67fde7e9b68f delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/objects/ad/f0c68f5e5508ce3fc598d5f01a53486bd9d287 delete mode 100644 test/integration/stagingDiscard/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/stagingDiscard/expected/repo/one.txt delete mode 100644 test/integration/stagingDiscard/files/one.txt delete mode 100644 test/integration/stagingDiscard/files/one_new.txt delete mode 100644 test/integration/stagingDiscard/recording.json delete mode 100644 test/integration/stagingDiscard/setup.sh delete mode 100644 test/integration/stagingDiscard/test.json delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/config delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/description delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/index delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/39/a5edebb09b8ebc0269f35c60e2e963b71de9d1 delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bc/cb06809b2f0e67bb3d3dd22c2b95882e72cbbb delete mode 100644 test/integration/stagingDiscardAll/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/stagingDiscardAll/expected/repo/one.txt delete mode 100644 test/integration/stagingDiscardAll/expected/repo/two.txt delete mode 100644 test/integration/stagingDiscardAll/files/one.txt delete mode 100644 test/integration/stagingDiscardAll/files/one_new.txt delete mode 100644 test/integration/stagingDiscardAll/recording.json delete mode 100644 test/integration/stagingDiscardAll/setup.sh delete mode 100644 test/integration/stagingDiscardAll/test.json delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/config delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/description delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/index delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/68/a4bb206023fd2396e04e1ccdf9b853cda4ac70 delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/7b/9c2149f16c706cea79b03234cb67fde7e9b68f delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/ad/92dc7671a5129b87f0f5c70c90b488ae0ceea6 delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/stagingEnterSecondary/expected/repo/one.txt delete mode 100644 test/integration/stagingEnterSecondary/files/one.txt delete mode 100644 test/integration/stagingEnterSecondary/files/one_new.txt delete mode 100644 test/integration/stagingEnterSecondary/recording.json delete mode 100644 test/integration/stagingEnterSecondary/setup.sh delete mode 100644 test/integration/stagingEnterSecondary/test.json delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/config delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/description delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/index delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/7b/9c2149f16c706cea79b03234cb67fde7e9b68f delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/80/b489d1f5a71c3e46c7e1a82fe264ffb0a4726f delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/de/59eafcc9bdb8fe9080f70e5252936832b13afe delete mode 100644 test/integration/stagingForcedToggle/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/stagingForcedToggle/expected/repo/one.txt delete mode 100644 test/integration/stagingForcedToggle/files/one.txt delete mode 100644 test/integration/stagingForcedToggle/files/one_new.txt delete mode 100644 test/integration/stagingForcedToggle/recording.json delete mode 100644 test/integration/stagingForcedToggle/setup.sh delete mode 100644 test/integration/stagingForcedToggle/test.json diff --git a/pkg/integration/components/actions.go b/pkg/integration/components/actions.go index c599f3697..50564233a 100644 --- a/pkg/integration/components/actions.go +++ b/pkg/integration/components/actions.go @@ -31,3 +31,10 @@ func (self *Actions) ContinueOnConflictsResolved() { Content(Contains("all merge conflicts resolved. Continue?")). Confirm() } + +func (self *Actions) ConfirmDiscardLines() { + self.t.ExpectPopup().Confirmation(). + Title(Equals("Unstage lines")). + Content(Contains("Are you sure you want to delete the selected lines")). + Confirm() +} diff --git a/pkg/integration/components/commit_message_panel_driver.go b/pkg/integration/components/commit_message_panel_driver.go index a70688e73..b44a6c1dc 100644 --- a/pkg/integration/components/commit_message_panel_driver.go +++ b/pkg/integration/components/commit_message_panel_driver.go @@ -28,7 +28,21 @@ func (self *CommitMessagePanelDriver) AddNewline() *CommitMessagePanelDriver { } func (self *CommitMessagePanelDriver) Clear() *CommitMessagePanelDriver { - panic("Clear method not yet implemented!") + // clearing multiple times in case there's multiple lines + // (the clear button only clears a single line at a time) + maxAttempts := 100 + for i := 0; i < maxAttempts+1; i++ { + if self.getViewDriver().getView().Buffer() == "" { + break + } + + self.t.press(ClearKey) + if i == maxAttempts { + panic("failed to clear commit message panel") + } + } + + return self } func (self *CommitMessagePanelDriver) Confirm() { diff --git a/pkg/integration/components/test_driver.go b/pkg/integration/components/test_driver.go index e52cc8915..43618f23c 100644 --- a/pkg/integration/components/test_driver.go +++ b/pkg/integration/components/test_driver.go @@ -37,6 +37,13 @@ func (self *TestDriver) press(keyStr string) { self.gui.PressKey(keyStr) } +// Should only be used in specific cases where you're doing something weird! +// E.g. invoking a global keybinding from within a popup. +// You probably shouldn't use this function, and should instead go through a view like t.Views().Commit().Focus().Press(...) +func (self *TestDriver) GlobalPress(keyStr string) { + self.press(keyStr) +} + func (self *TestDriver) typeContent(content string) { for _, char := range content { self.press(string(char)) diff --git a/pkg/integration/tests/file/remember_commit_message_after_fail.go b/pkg/integration/tests/file/remember_commit_message_after_fail.go new file mode 100644 index 000000000..bb9b341b1 --- /dev/null +++ b/pkg/integration/tests/file/remember_commit_message_after_fail.go @@ -0,0 +1,62 @@ +package file + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var preCommitHook = `#!/bin/bash + +if [[ -f bad ]]; then + exit 1 +fi +` + +var RememberCommitMessageAfterFail = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Verify that the commit message is remembered after a failed attempt at committing", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) { + }, + SetupRepo: func(shell *Shell) { + shell.CreateFile(".git/hooks/pre-commit", preCommitHook) + shell.RunCommand("chmod +x .git/hooks/pre-commit") + + shell.CreateFileAndAdd("one", "one") + + // the presence of this file will cause the pre-commit hook to fail + shell.CreateFile("bad", "bad") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("bad"), + Contains("one"), + ). + Press(keys.Files.CommitChanges). + Tap(func() { + t.ExpectPopup().CommitMessagePanel().Type("my message").Confirm() + + t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("Git command failed")).Confirm() + }). + Press(keys.Universal.Remove). // remove file that triggers pre-commit hook to fail + Tap(func() { + t.ExpectPopup().Menu().Title(Equals("bad")).Select(Contains("discard all changes")).Confirm() + }). + Lines( + Contains("one"), + ). + Press(keys.Files.CommitChanges). + Tap(func() { + t.ExpectPopup().CommitMessagePanel(). + InitialText(Equals("my message")). // it remembered the commit message + Confirm() + + t.Views().Commits(). + Lines( + Contains("my message"), + ) + }) + }, +}) diff --git a/pkg/integration/tests/staging/diff_context_change.go b/pkg/integration/tests/staging/diff_context_change.go new file mode 100644 index 000000000..8ddf3d37f --- /dev/null +++ b/pkg/integration/tests/staging/diff_context_change.go @@ -0,0 +1,80 @@ +package staging + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var DiffContextChange = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Change the number of diff context lines while in the staging panel", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + // need to be working with a few lines so that git perceives it as two separate hunks + shell.CreateFileAndAdd("file1", "1a\n2a\n3a\n4a\n5a\n6a\n7a\n8a\n9a\n10a\n11a\n12a\n13a\n14a\n15a") + shell.Commit("one") + + shell.UpdateFile("file1", "1a\n2a\n3b\n4a\n5a\n6a\n7a\n8a\n9a\n10a\n11a\n12a\n13b\n14a\n15a") + + // hunk looks like: + // diff --git a/file1 b/file1 + // index 3653080..a6388b6 100644 + // --- a/file1 + // +++ b/file1 + // @@ -1,6 +1,6 @@ + // 1a + // 2a + // -3a + // +3b + // 4a + // 5a + // 6a + // @@ -10,6 +10,6 @@ + // 10a + // 11a + // 12a + // -13a + // +13b + // 14a + // 15a + // \ No newline at end of file + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEnter() + + t.Views().Staging(). + IsFocused(). + Content(Contains("@@ -1,6 +1,6 @@").DoesNotContain(" 7a")). + SelectedLine(Contains("-3a")). + Press(keys.Universal.IncreaseContextInDiffView). + // still on the same line + SelectedLine(Contains("-3a")). + // '7a' is now visible + Content(Contains("@@ -1,7 +1,7 @@").Contains(" 7a")). + Press(keys.Universal.DecreaseContextInDiffView). + SelectedLine(Contains("-3a")). + Content(Contains("@@ -1,6 +1,6 @@").DoesNotContain(" 7a")). + Press(keys.Universal.DecreaseContextInDiffView). + SelectedLine(Contains("-3a")). + Content(Contains("@@ -1,5 +1,5 @@").DoesNotContain(" 6a")). + Press(keys.Universal.DecreaseContextInDiffView). + // arguably we should still be on -3a, but at the moment the logic puts us on on +3b + SelectedLine(Contains("+3b")). + Content(Contains("@@ -2,3 +2,3 @@").DoesNotContain(" 5a")). + PressPrimaryAction(). + Content(DoesNotContain("+3b")). + Press(keys.Universal.TogglePanel) + + t.Views().StagingSecondary(). + IsFocused(). + Content(Contains("@@ -3,2 +3,3 @@\n 3a\n+3b\n 4a")). + Press(keys.Universal.IncreaseContextInDiffView). + Content(Contains("@@ -2,4 +2,5 @@\n 2a\n 3a\n+3b\n 4a\n 5a")) + }, +}) diff --git a/pkg/integration/tests/staging/discard_all_changes.go b/pkg/integration/tests/staging/discard_all_changes.go new file mode 100644 index 000000000..7d27e7ec2 --- /dev/null +++ b/pkg/integration/tests/staging/discard_all_changes.go @@ -0,0 +1,54 @@ +package staging + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var DiscardAllChanges = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Discard all changes of a file in the staging panel, then assert we land in the staging panel of the next file", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "one\ntwo\n") + shell.CreateFileAndAdd("file2", "1\n2\n") + shell.Commit("one") + + shell.UpdateFile("file1", "one\ntwo\nthree\nfour\n") + shell.UpdateFile("file2", "1\n2\n3\n4\n") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + Contains("file2"), + ). + PressEnter() + + t.Views().Staging(). + IsFocused(). + SelectedLine(Contains("+three")). + // discard the line + Press(keys.Universal.Remove). + Tap(func() { + t.Actions().ConfirmDiscardLines() + }). + SelectedLine(Contains("+four")). + // discard the other line + Press(keys.Universal.Remove). + Tap(func() { + t.Actions().ConfirmDiscardLines() + + // because there are no more changes in file1 we switch to file2 + t.Views().Files(). + Lines( + Contains("file2").IsSelected(), + ) + }). + // assert we are still in the staging panel, but now looking at the changes of the other file + IsFocused(). + SelectedLine(Contains("+3")) + }, +}) diff --git a/pkg/integration/tests/staging/stage_hunks.go b/pkg/integration/tests/staging/stage_hunks.go new file mode 100644 index 000000000..b79819108 --- /dev/null +++ b/pkg/integration/tests/staging/stage_hunks.go @@ -0,0 +1,91 @@ +package staging + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var StageHunks = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Stage and unstage various hunks of a file in the staging panel", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + // need to be working with a few lines so that git perceives it as two separate hunks + shell.CreateFileAndAdd("file1", "1a\n2a\n3a\n4a\n5a\n6a\n7a\n8a\n9a\n10a\n11a\n12a\n13a\n14a\n15a") + shell.Commit("one") + + shell.UpdateFile("file1", "1a\n2a\n3b\n4a\n5a\n6a\n7a\n8a\n9a\n10a\n11a\n12a\n13b\n14a\n15a") + + // hunk looks like: + // diff --git a/file1 b/file1 + // index 3653080..a6388b6 100644 + // --- a/file1 + // +++ b/file1 + // @@ -1,6 +1,6 @@ + // 1a + // 2a + // -3a + // +3b + // 4a + // 5a + // 6a + // @@ -10,6 +10,6 @@ + // 10a + // 11a + // 12a + // -13a + // +13b + // 14a + // 15a + // \ No newline at end of file + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEnter() + + t.Views().Staging(). + IsFocused(). + SelectedLine(Contains("-3a")). + Press(keys.Universal.NextBlock). + SelectedLine(Contains("-13a")). + Press(keys.Main.ToggleSelectHunk). + // when in hunk mode, pressing up/down moves us up/down by a hunk + SelectPreviousItem(). + SelectedLine(Contains("-3a")). + SelectNextItem(). + SelectedLine(Contains("-13a")). + // stage the second hunk + PressPrimaryAction(). + Content(Contains("-3a\n+3b")). + Tap(func() { + t.Views().StagingSecondary(). + Content(Contains("-13a\n+13b")) + }). + Press(keys.Universal.TogglePanel) + + t.Views().StagingSecondary(). + IsFocused(). + SelectedLine(Contains("-13a")). + // after toggling panel, we're back to only having selected a single line + PressPrimaryAction(). + SelectedLine(Contains("+13b")). + PressPrimaryAction(). + IsEmpty() + + t.Views().Staging(). + IsFocused(). + SelectedLine(Contains("-3a")). + Press(keys.Main.ToggleSelectHunk). + Press(keys.Universal.Remove). + Tap(func() { + t.Actions().ConfirmDiscardLines() + }). + SelectedLine(Contains("-13a")). + Content(DoesNotContain("-3a").DoesNotContain("+3b")) + }, +}) diff --git a/pkg/integration/tests/staging/stage_lines.go b/pkg/integration/tests/staging/stage_lines.go new file mode 100644 index 000000000..f1777fb36 --- /dev/null +++ b/pkg/integration/tests/staging/stage_lines.go @@ -0,0 +1,108 @@ +package staging + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var StageLines = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Stage and unstage various lines of a file in the staging panel", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "one\ntwo\n") + shell.Commit("one") + + shell.UpdateFile("file1", "one\ntwo\nthree\nfour\n") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEnter() + + t.Views().Staging(). + IsFocused(). + SelectedLine(Contains("+three")). + // stage 'three' + PressPrimaryAction(). + // 'three' moves over to the staging secondary panel + Content(DoesNotContain("+three")). + Tap(func() { + t.Views().StagingSecondary(). + Content(Contains("+three")) + }). + SelectedLine(Contains("+four")). + // stage 'four' + PressPrimaryAction(). + // nothing left in our staging panel + IsEmpty() + + // because we've staged everything we get moved to the staging secondary panel + // do the same thing as above, moving the lines back to the staging panel + t.Views().StagingSecondary(). + IsFocused(). + Content(Contains("+three\n+four")). + SelectedLine(Contains("+three")). + PressPrimaryAction(). + Content(DoesNotContain("+three")). + Tap(func() { + t.Views().Staging(). + Content(Contains("+three")) + }). + SelectedLine(Contains("+four")). + // pressing 'remove' has the same effect as pressing space when in the staging secondary panel + Press(keys.Universal.Remove). + IsEmpty() + + // stage one line and then manually toggle to the staging secondary panel + t.Views().Staging(). + IsFocused(). + Content(Contains("+three\n+four")). + SelectedLine(Contains("+three")). + PressPrimaryAction(). + Content(DoesNotContain("+three")). + Tap(func() { + t.Views().StagingSecondary(). + Content(Contains("+three")) + }). + Press(keys.Universal.TogglePanel) + + // manually toggle back to the staging panel + t.Views().StagingSecondary(). + IsFocused(). + Press(keys.Universal.TogglePanel) + + t.Views().Staging(). + SelectedLine(Contains("+four")). + // discard the line + Press(keys.Universal.Remove). + Tap(func() { + t.ExpectPopup().Confirmation(). + Title(Equals("Unstage lines")). + Content(Contains("Are you sure you want to delete the selected lines")). + Confirm() + }). + IsEmpty() + + t.Views().StagingSecondary(). + IsFocused(). + Content(Contains("+three\n")). + // return to file + PressEscape() + + t.Views().Files(). + IsFocused(). + Lines( + Contains("M file1").IsSelected(), + ). + PressEnter() + + // because we only have a staged change we'll land in the staging secondary panel + t.Views().StagingSecondary(). + IsFocused() + }, +}) diff --git a/pkg/integration/tests/staging/stage_ranges.go b/pkg/integration/tests/staging/stage_ranges.go new file mode 100644 index 000000000..cd6d8021f --- /dev/null +++ b/pkg/integration/tests/staging/stage_ranges.go @@ -0,0 +1,75 @@ +package staging + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var StageRanges = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Stage and unstage various ranges of a file in the staging panel", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "one\ntwo\n") + shell.Commit("one") + + shell.UpdateFile("file1", "one\ntwo\nthree\nfour\nfive\nsix\n") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEnter() + + t.Views().Staging(). + IsFocused(). + SelectedLine(Contains("+three")). + Press(keys.Main.ToggleDragSelect). + SelectNextItem(). + SelectedLine(Contains("+four")). + SelectNextItem(). + SelectedLine(Contains("+five")). + // stage the three lines we've just selected + PressPrimaryAction(). + Content(Contains(" five\n+six")). + Tap(func() { + t.Views().StagingSecondary(). + Content(Contains("+three\n+four\n+five")) + }). + Press(keys.Universal.TogglePanel) + + t.Views().StagingSecondary(). + IsFocused(). + SelectedLine(Contains("+three")). + Press(keys.Main.ToggleDragSelect). + SelectNextItem(). + SelectedLine(Contains("+four")). + SelectNextItem(). + SelectedLine(Contains("+five")). + // unstage the three selected lines + PressPrimaryAction(). + // nothing left in our staging secondary panel + IsEmpty(). + Tap(func() { + t.Views().Staging(). + Content(Contains("+three\n+four\n+five\n+six")) + }) + + t.Views().Staging(). + IsFocused(). + // coincidentally we land at '+four' here. Maybe we should instead land + // at '+three'? given it's at the start of the hunk? + SelectedLine(Contains("+four")). + Press(keys.Main.ToggleDragSelect). + SelectNextItem(). + SelectedLine(Contains("+five")). + Press(keys.Universal.Remove). + Tap(func() { + t.Actions().ConfirmDiscardLines() + }). + Content(Contains("+three\n+six")) + }, +}) diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index c99870d43..6814ae631 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -73,6 +73,7 @@ var tests = []*components.IntegrationTest{ file.DiscardChanges, file.DiscardStagedChanges, file.Gitignore, + file.RememberCommitMessageAfterFail, filter_by_path.CliArg, filter_by_path.SelectFile, filter_by_path.TypeFile, @@ -98,7 +99,12 @@ var tests = []*components.IntegrationTest{ reflog.CherryPick, reflog.Patch, reflog.Reset, + staging.DiffContextChange, + staging.DiscardAllChanges, staging.Search, + staging.StageHunks, + staging.StageLines, + staging.StageRanges, stash.Apply, stash.ApplyPatch, stash.CreateBranch, @@ -139,6 +145,7 @@ var tests = []*components.IntegrationTest{ tag.CrudAnnotated, tag.CrudLightweight, tag.Reset, + ui.DoublePopup, ui.SwitchTabFromMenu, undo.UndoCheckoutAndDrop, undo.UndoDrop, diff --git a/pkg/integration/tests/ui/double_popup.go b/pkg/integration/tests/ui/double_popup.go new file mode 100644 index 000000000..85ba4309e --- /dev/null +++ b/pkg/integration/tests/ui/double_popup.go @@ -0,0 +1,34 @@ +package ui + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var DoublePopup = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Open a popup from within another popup and assert you can escape back to the side panels", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.EmptyCommit("one") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Branches(). + Focus(). + // arbitrarily bringing up a popup + PressPrimaryAction() + + t.ExpectPopup().Alert(). + Title(Contains("Error")). + Content(Contains("You have already checked out this branch")) + + t.GlobalPress(keys.Universal.OpenRecentRepos) + + t.ExpectPopup().Menu().Title(Contains("recent repositories")).Cancel() + + t.Views().Branches().IsFocused() + + t.Views().Files().Focus() + }, +}) diff --git a/test/integration/popupFocus/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/popupFocus/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 00d7bdd40..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -WIP diff --git a/test/integration/popupFocus/expected/repo/.git_keep/FETCH_HEAD b/test/integration/popupFocus/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/popupFocus/expected/repo/.git_keep/HEAD b/test/integration/popupFocus/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/popupFocus/expected/repo/.git_keep/config b/test/integration/popupFocus/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/popupFocus/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/popupFocus/expected/repo/.git_keep/description b/test/integration/popupFocus/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/popupFocus/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/popupFocus/expected/repo/.git_keep/index b/test/integration/popupFocus/expected/repo/.git_keep/index deleted file mode 100644 index d74d35efa5b8b45bfb51d1b04e0f8526e5d98551..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmZ?q402{*U|<4b=A`F`?kO^CRfExt3=FKyM{l2JU}#*zz`*zws73^c*_Q5k{8u&g z#+QiDD4u+$3jtm&-B%gdb1Ty_b5ad~3PAdmlvU@!Xs9{Q(an+I`C-(cwC~)@Rg1!_ z`deOU&$m#AnPUVsN7*?q3}g<7hMMye-JJW`yxM2Vp1t8erEo}Hz{_7_*AZ!$ImSS9 zLV{dffs`bJv4R1Ywzy53>=)x-&i~g6|KRC1)QRanw>O}4C0}5M;n`ZZlbt8kH+oMl G{0IQfWnokR diff --git a/test/integration/popupFocus/expected/repo/.git_keep/info/exclude b/test/integration/popupFocus/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/popupFocus/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/popupFocus/expected/repo/.git_keep/logs/HEAD b/test/integration/popupFocus/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 03b354937..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 353cce986c61f361452f43522426c120b4ee9461 CI 1659355870 +1000 commit (initial): myfile1 -353cce986c61f361452f43522426c120b4ee9461 6ecdae79ff53548670039abee9008b6bb36cdf4f CI 1659355870 +1000 commit: myfile2 -6ecdae79ff53548670039abee9008b6bb36cdf4f 0478d727ea0ebf57ed9ca85acef9e60a324d86f0 CI 1659355876 +1000 commit: WIP diff --git a/test/integration/popupFocus/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/popupFocus/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 03b354937..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 353cce986c61f361452f43522426c120b4ee9461 CI 1659355870 +1000 commit (initial): myfile1 -353cce986c61f361452f43522426c120b4ee9461 6ecdae79ff53548670039abee9008b6bb36cdf4f CI 1659355870 +1000 commit: myfile2 -6ecdae79ff53548670039abee9008b6bb36cdf4f 0478d727ea0ebf57ed9ca85acef9e60a324d86f0 CI 1659355876 +1000 commit: WIP diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/04/78d727ea0ebf57ed9ca85acef9e60a324d86f0 b/test/integration/popupFocus/expected/repo/.git_keep/objects/04/78d727ea0ebf57ed9ca85acef9e60a324d86f0 deleted file mode 100644 index 1a59d8559..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/objects/04/78d727ea0ebf57ed9ca85acef9e60a324d86f0 +++ /dev/null @@ -1,3 +0,0 @@ -x -0E]+f/ȤӼ@D;w -Ɩ7pl`.C8zHy$ռX҈ ف]_] %$UGn> RE$!K!=&ca~ZE#08nZNMgRZ+ diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/popupFocus/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/35/3cce986c61f361452f43522426c120b4ee9461 b/test/integration/popupFocus/expected/repo/.git_keep/objects/35/3cce986c61f361452f43522426c120b4ee9461 deleted file mode 100644 index a3e9d66fe..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/objects/35/3cce986c61f361452f43522426c120b4ee9461 +++ /dev/null @@ -1,3 +0,0 @@ -xA -0@ѮsʌN&\yL`H -~XKY˭*1c  /'Lw=`9/=C7}ZF CowwBDskOn74], \ No newline at end of file diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/6e/cdae79ff53548670039abee9008b6bb36cdf4f b/test/integration/popupFocus/expected/repo/.git_keep/objects/6e/cdae79ff53548670039abee9008b6bb36cdf4f deleted file mode 100644 index a23afd560..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/objects/6e/cdae79ff53548670039abee9008b6bb36cdf4f +++ /dev/null @@ -1,2 +0,0 @@ -xM -0@a9Ed~2퀈U,[J=ǷxyuiOm7#y6+*jeEf)d^SM{8baf.c00K^̓D.3QfrWey\+9> \ No newline at end of file diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/popupFocus/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/popupFocus/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/popupFocus/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/popupFocus/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/popupFocus/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/popupFocus/expected/repo/.git_keep/refs/heads/master b/test/integration/popupFocus/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 6ffdf61da..000000000 --- a/test/integration/popupFocus/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0478d727ea0ebf57ed9ca85acef9e60a324d86f0 diff --git a/test/integration/popupFocus/expected/repo/myfile1 b/test/integration/popupFocus/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/popupFocus/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/popupFocus/expected/repo/myfile2 b/test/integration/popupFocus/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/popupFocus/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/popupFocus/expected/repo/myfile3 b/test/integration/popupFocus/expected/repo/myfile3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/popupFocus/expected/repo/myfile3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/popupFocus/recording.json b/test/integration/popupFocus/recording.json deleted file mode 100644 index e7f4f9d53..000000000 --- a/test/integration/popupFocus/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":607,"Mod":0,"Key":259,"Ch":0},{"Timestamp":745,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1304,"Mod":0,"Key":256,"Ch":82},{"Timestamp":2087,"Mod":2,"Key":18,"Ch":18},{"Timestamp":2894,"Mod":0,"Key":27,"Ch":0},{"Timestamp":3553,"Mod":0,"Key":260,"Ch":0},{"Timestamp":3697,"Mod":0,"Key":260,"Ch":0},{"Timestamp":4064,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4376,"Mod":0,"Key":256,"Ch":119},{"Timestamp":4745,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5200,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":238,"Height":61}]} \ No newline at end of file diff --git a/test/integration/popupFocus/setup.sh b/test/integration/popupFocus/setup.sh deleted file mode 100644 index b22a9c241..000000000 --- a/test/integration/popupFocus/setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo test2 > myfile2 -git add . -git commit -am "myfile2" -echo test3 > myfile3 diff --git a/test/integration/popupFocus/test.json b/test/integration/popupFocus/test.json deleted file mode 100644 index 60bfe9319..000000000 --- a/test/integration/popupFocus/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "stage a file and commit the change", "speed": 15 } diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 2ff0cc013..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -second commit diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/FETCH_HEAD b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/HEAD b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/config b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/config deleted file mode 100644 index 596ebaeb3..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/config +++ /dev/null @@ -1,8 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[user] - email = CI@example.com - name = CI diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/description b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/rememberCommitMessageAfterFail/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/rememberCommitMessageAfterFail/expected/repo/.git_keep/index b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/index deleted file mode 100644 index d3193568106bd3653cd9e166c3d6a42618fe86e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmZ?q402{*U|<5_#N(3EY+qC4U^D{*2P1=`PALOJ;}Ql2<`)pm!1hRJI^)MBSACE8 zGoQ3R#ijM8Cd8A0H7zqI)evY50|QJyjE0(1i*8Pir~P+_pBBs$uAaR6-s@xA^fi-9 zA?6r?%?Sx|bp7erf30#O M?(95r`qpYe0NzqWD*ylh diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/info/exclude b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,6 +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] -# *~ diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/HEAD b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 2bf564e5f..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 c2bf9b666a310383fd7095bc5bd993bba11b040e CI 1640438057 +0100 commit (initial): first commit -c2bf9b666a310383fd7095bc5bd993bba11b040e d0ce4cb10cd926f646a08889b077a6d7eddd3534 CI 1640438062 +0100 commit: second commit diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 2bf564e5f..000000000 --- a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 c2bf9b666a310383fd7095bc5bd993bba11b040e CI 1640438057 +0100 commit (initial): first commit -c2bf9b666a310383fd7095bc5bd993bba11b040e d0ce4cb10cd926f646a08889b077a6d7eddd3534 CI 1640438062 +0100 commit: second commit diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/6c/493ff740f9380390d5c9ddef4af18697ac9375 b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/6c/493ff740f9380390d5c9ddef4af18697ac9375 deleted file mode 100644 index 7d217a785011e7d7830ac92773a95cd277cf7eb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb6V=y!@Ff%bxNXyJgHDq`sG@bF|lB>Q){FzT$pW@PbQxoEe hq`-(F$J741!%qw530F_veed9W-v4`Ff%bxNXyJgHDq`sG@bF|lB>Q){FzT$pW@PbQxoC| I01;jex5qsb(*OVf diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/d0/ce4cb10cd926f646a08889b077a6d7eddd3534 b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/d0/ce4cb10cd926f646a08889b077a6d7eddd3534 deleted file mode 100644 index 76baa3646435aceb06e746507e439b31fdadbde3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gaA93c@fD06pgwxeKysk~Iq=LQj3hZn8naHl;@J`4;?u*I@=Gw|Rba zI{+N|rfOL^CjkV`su8LOQgIcL5>s+Hf|MG_o0T_Ry3K=B5=3P0z$ahJ87NAQQi!|= zJ0}o84Zr)nZFZdOWt?vM;dy=PDYyA*9R>(K0S@*E4#4bmpX&OjZeE((QtU4?U#??4 EL_?E75dZ)H diff --git a/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/e2/129701f1a4d54dc44f03c93bca0a2aec7c5449 b/test/integration/rememberCommitMessageAfterFail/expected/repo/.git_keep/objects/e2/129701f1a4d54dc44f03c93bca0a2aec7c5449 deleted file mode 100644 index 08245d0012c0582dde8fd5e2f65f8cae03b14e65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb file1 -echo "file2" > file2 -echo "disruptive" > disruptive -cat > .git/hooks/pre-commit <u2zx_>-|0MvPcNePw diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/info/exclude b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/staginWithDiffContextChange/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/staginWithDiffContextChange/expected/repo/.git_keep/logs/HEAD b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 731f404f9..000000000 --- a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 1854ab416d299cda0227d62b9ab0765e5551ef57 CI 1642499804 +1100 commit (initial): file1 diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 731f404f9..000000000 --- a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 1854ab416d299cda0227d62b9ab0765e5551ef57 CI 1642499804 +1100 commit (initial): file1 diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e deleted file mode 100644 index 2c00719b0e5858d36ec8b4f5d17c9076f943d1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~C-FT|W=LwpzCi z#C+?A8N@8=iKS4`h(Rqy$vF6dHHTPU7EN*(i%Z}BZU-zYJePI0U#g$o9@^>z6xg%K YhzxfkM0eF|((O;~%C;N16V@**0Q-hDWB>pF diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 deleted file mode 100644 index 342ac1eb8b6d3df04052c894658adf444566cdf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 594 zcmV-Y0dl z083tZUGuEXbHQbnNcQIlU{dXh1b1o`ew5xeLe?RP2}u(A%n$c%SsqvGJ6oTohO>s( zlu^YGG((UMXs!(fv=OQxd8^X538I)z2L6czy1pwjI$t2w15ww-%$3LDT1D~H7W^ey z1C`1t?s;ydd}zhv>T1uEE}}SwF#^Mz)+o>r3XwA*&9UM`&-c8lY2BDMZ78&3OHunx ztadXSB!Mg3p%b?v!2@r&+AmcX$GIa&2pYtg7_|sqc&Yb%DI^Ehh{27~2I_(c{+qyR zwR!#73Yl?(J-;vJZ}1=ck1`y>tB0X$nMF>KG{ZWJ1yw@gw01sJ--4aaBmi=c3{=Nm z(D%I|0kj!Zy){1NAQB|?=tbHgHa6Gh>%F`2vq96nNAq4T+vybIu9ihyVnmAGAd7Uf zI?oU`7w*ih6qkl|8Ssd?lK($9WiT`_Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO KFb@DJ?hn7{0Tf*T diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 deleted file mode 100644 index cb168bb1de05e9b09a915bd1eedd3d3b3365481c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 608 zcmV-m0-ybO0ku?7Yuhjo-mCR1gdd6>vY5ffAdrWyC0(I3qZ#yBv1Lb%EE(BO$V&eE z?kr1=)3WVlezNX6-FNqWk~UIr=%+8AzkaA#x?=^Wx=wXjGL_YYh_ceAp%DqfLNwcU zGXpGn;dRZkHqQl@St8l5BY;V@D-ztPRrs&zZ6jnIl9-Srp^yA<+m_{VwZ5_ZG&P(x zyrzsQexMnGbU<@$D4>l{1<6~LzAX^NbTZ_>l0ertWk%-HLuTti{so86a)=oER0$NPrTH7z7&!})+mD;qYdza2>zSE zYPEU!)(V+%gFU}5<}>(@{YM!N;nl;?rOYCym^4G4#eym!aoV6_N~BTv{Qdf87?Z%x zi*DHDPInT(<{mlQ>LT=guSfuG2UTyCFFA+?MLl{}c8HD5w)J{1ul%eygtceh%V+zV zLfmm##1%%Q=nb<-H>>jyVRPoz+)8n7U{?W;oTL2vIfN~zH$IMBj!df*H}u{{pSl&e zI7&j#oCG5PWv~UXC;NwOx}jkTysAzS*Up}qF+dme$|XU~)!L6})eSRd4nl=cV7=v1 zp2OjW)mx8To5F+P#}wnMiYxRA-Z2Y>8Y1-dHHUklSjkT(m-Zmk&ZoLG3BfMqj~Bu! u=j5C$*^XaG>JJaf3C}|RwEe#~Xdtoo&p(SJ5BrwKPnPWsj?Ql=Vg5{<;4gUq diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd deleted file mode 100644 index af8771ae43163736691100029b34eb18d186cda2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=G0ku?7Yuhjo-mCR1gdd6>vV<|lAdrWyC0(I3qZ#yBv1Lb%EE(BO$V&eE z?kr2T)3WVld5Z75yYKG%ByFYM(obK$e*RFhWY2O=b(QF%U@EN$5k;v@O(PP7xu|!| zb_Uq|g;y0%n=BJtrgO=DodBGd`+Sa-T800b-qb=?A&Ci@&*>vS-Zn*XT5oPFKTQm0 zHLob6iXUl;Annmi8wzMGR8F!+C2t!Y5>q`8wNuO-J(6n`#Zyc8 zL$Vr}iYeASHd5X-;(mQm^Pux6j$w_!@VYSyGz21YCZs-9p5>A%A#vNFWJ)Aa`279)XBd;f z?u%~NE%^2+auOIUjroqTq# zDa0L@MO_#3xW_C6>I==x8oCF@Y CeJHm8 diff --git a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/refs/heads/master b/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index c5cccb127..000000000 --- a/test/integration/staginWithDiffContextChange/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -1854ab416d299cda0227d62b9ab0765e5551ef57 diff --git a/test/integration/staginWithDiffContextChange/expected/repo/one.txt b/test/integration/staginWithDiffContextChange/expected/repo/one.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/staginWithDiffContextChange/expected/repo/one.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/staginWithDiffContextChange/files/one.txt b/test/integration/staginWithDiffContextChange/files/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/staginWithDiffContextChange/files/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/staginWithDiffContextChange/files/one_new.txt b/test/integration/staginWithDiffContextChange/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/staginWithDiffContextChange/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/staginWithDiffContextChange/recording.json b/test/integration/staginWithDiffContextChange/recording.json deleted file mode 100644 index 5bce04f41..000000000 --- a/test/integration/staginWithDiffContextChange/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":1395,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3036,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3283,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3483,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3996,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4629,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5004,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5067,"Mod":0,"Key":256,"Ch":118},{"Timestamp":5547,"Mod":0,"Key":257,"Ch":0},{"Timestamp":5867,"Mod":0,"Key":256,"Ch":118},{"Timestamp":6492,"Mod":0,"Key":256,"Ch":118},{"Timestamp":6628,"Mod":0,"Key":257,"Ch":0},{"Timestamp":6762,"Mod":0,"Key":257,"Ch":0},{"Timestamp":7779,"Mod":0,"Key":256,"Ch":125},{"Timestamp":8179,"Mod":0,"Key":256,"Ch":125},{"Timestamp":8723,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9531,"Mod":0,"Key":259,"Ch":0},{"Timestamp":10170,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10379,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10500,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10833,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10849,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10865,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10881,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10898,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10915,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10931,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10947,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10964,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11156,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11308,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11435,"Mod":0,"Key":256,"Ch":118},{"Timestamp":11571,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11700,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11828,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11963,"Mod":0,"Key":258,"Ch":0},{"Timestamp":12083,"Mod":0,"Key":258,"Ch":0},{"Timestamp":12603,"Mod":0,"Key":256,"Ch":32},{"Timestamp":13051,"Mod":0,"Key":9,"Ch":9},{"Timestamp":14820,"Mod":0,"Key":256,"Ch":118},{"Timestamp":15028,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15139,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15266,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15387,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15500,"Mod":0,"Key":258,"Ch":0},{"Timestamp":16266,"Mod":0,"Key":256,"Ch":125},{"Timestamp":16483,"Mod":0,"Key":256,"Ch":125},{"Timestamp":16747,"Mod":0,"Key":256,"Ch":125},{"Timestamp":17412,"Mod":0,"Key":256,"Ch":32},{"Timestamp":19124,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/staginWithDiffContextChange/setup.sh b/test/integration/staginWithDiffContextChange/setup.sh deleted file mode 100644 index 9b1f6fb8c..000000000 --- a/test/integration/staginWithDiffContextChange/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt diff --git a/test/integration/staginWithDiffContextChange/test.json b/test/integration/staginWithDiffContextChange/test.json deleted file mode 100644 index 0351e0ec9..000000000 --- a/test/integration/staginWithDiffContextChange/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Staging a file and also changing the diff context", - "speed": 20 -} diff --git a/test/integration/staging/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/staging/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 9daeafb98..000000000 --- a/test/integration/staging/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/test/integration/staging/expected/repo/.git_keep/FETCH_HEAD b/test/integration/staging/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/staging/expected/repo/.git_keep/HEAD b/test/integration/staging/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/staging/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/staging/expected/repo/.git_keep/config b/test/integration/staging/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/staging/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/staging/expected/repo/.git_keep/description b/test/integration/staging/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/staging/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/staging/expected/repo/.git_keep/index b/test/integration/staging/expected/repo/.git_keep/index deleted file mode 100644 index 694ca5da26ff1684e0e01e485f664c5d86663b94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmZ?q402{*U|<4bW+27^8kZnTY@gi{)cK*EdE5UTlWJF{#r<7kn$N(VpO>mvQc;4e z5QB|s&TET{PgL$pwDlJ|)U4pBP7c^Q-;RN^B%>%5Vp7suj$Q@3WmPbmk%57g`TSXJ z1_qEhj9-DqivXRyrudWEn`AyU8OGeNdmA2$=B-|$TgSj&Ql1ZWPe_ofD^RT@gRz1E v*YmbFYi(Yc1x~5UQSqT*qdiI}FXYcvh@ 1659701362 +1000 commit (initial): file1 -6497d00f0447159947a805f3a38e8c44ed2865b1 a6985076907d3ed64cf59480bb2eec313ea221cf CI 1659701393 +1000 commit: test diff --git a/test/integration/staging/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/staging/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index fee95f75d..000000000 --- a/test/integration/staging/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 6497d00f0447159947a805f3a38e8c44ed2865b1 CI 1659701362 +1000 commit (initial): file1 -6497d00f0447159947a805f3a38e8c44ed2865b1 a6985076907d3ed64cf59480bb2eec313ea221cf CI 1659701393 +1000 commit: test diff --git a/test/integration/staging/expected/repo/.git_keep/objects/12/c4186053ecd4056526743060a8fe87429b7306 b/test/integration/staging/expected/repo/.git_keep/objects/12/c4186053ecd4056526743060a8fe87429b7306 deleted file mode 100644 index 65f9a5559d70daf1378f8d53f379bd8a9c81aab9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2331 zcmV+$3FP*80o7S;Z`(!^zOT}+*yuwd6)v4a3mnb|7chLbE7X>aSZ;a<0%J`sDb^IJ z<1XX4ssDSQncbx*ijtK!Ezkf-Byx6k_L;Y5R(Dx(C;s*AH~;>}LWcJ;Q6j0*em|Wr ziqeQ-zc+~IW`O@nm8g#k`lL;n=7}Ek@i|G&thx)rV!r>g(pp7T9H%Oa_A~j*BVO(= z?vs7Ioy$DZ`*?8czmTTSTb&g$QYH5N+=cTZQrYLM%i}cJc^lxhpJNA8Dz)>X%A{n` zsNdh;7g?%}Sjb#uBChh#q(!d#eflVd&@R3@tJ0B3l(|-!3XO_ry9xddN8&5Lb>JV0 zPyL>Dg6CsNjmW(JZV3uaCsW(Z_x-jm65+!$a})KS^P)RHiC(k*8U| z_XN+o?@PtB{e{dCL1l2J%-E>;ks0Ta`Z#Q=9QCpKnWNFMtk2j^+Ml%hgLDGHwzCv$ zhLs&gdz(p$6+dIjl{7P$V#ECp8!?2%y4NPT}G#6&$7-i0vhCf5d$AK4RXc*+|N7vnv0 zulaVbk&xpgFG}@xmKvo|g4H;u4ap@a4hUKH62VTkwtckGKh8T2`j&YFdc$8;eq|on zQx+6TUmSQiA|E|b%zDq*!?d*FuoNq+GOYu%MDLGdZpsSC)2VDV+YTO8ts1^StFXu; zSw4!xtr6`oTR8y->&}=Vq$#Wco>b0C09^vZ_veHJ*&VXc$wdfr?XPYXh;pP>50}3i$WWRvn{(^L#+p3G(2X| zylbDX+t09`7fEnJ4Pyx7;YDsgw3AcugL-7W98p|hb>Lo&1iI+y`26Jh_V{u#J^5*R z`@_lqY!-vCL+SB zCD0inD6vezDpw+=MgY=@DvxIK2>Gmdz&ToIwQymVpjVJW+lxBOExEm1J$MSYJsp6V%qa36y*wp`=ViPW4RK!`kjzlUfKMu=PTPX`F`Jc(~?X&bGkA@7{Z=N>3<5*Z^O5Y;4l21~)#+GPj%> zysk1s;&Z?@TvfLxUgLN%DBmq;2k9pcKqQL4S>}U?rB}p`u-lSm*lczB4~1MTz$L-* zXg{lsprbBTvw8cni;S8Q)1jkof5EBuM5gi~9ZQdPM__7={GtbEZ~KrVui^Bl8J2~6 zmr#y3dXN?4w!sn`Cz2X?Qqbn0>`YcgN`i@;tIk$$OXmr?LTNW%+Sf=66f^h!GUqg7 zCV!053b#@Yl76Q1qVdq>*a4-y=i zz1kM$)>Bf+KCIW-z1CMRixeG)!L8S{rI8noo3n1D|1QIken?F?!$3(Rl*NU>_bOIu z_S$3>qJliJ~isXo|h5RgSzgfU|NTpIvs!*DI0Pj*y)`)N2B-!Gsj4_e2zdeVfZqb};xQB1F z&z*?;wS$E>c}LBIk8QU?pm7iCV7n_YZ!{XwxSYq(>;ad|A6+L!TFgMtX7Ym)DPJ;( zIi-jQ>uUzk)KKQH3~q$bW(8V6WygM+4xtYZQu8Xy1p2I~7J^iQB!dcz@Awa>a;`v` zLsQ8Ne3tb@SnNxiov*v1$pvEbpqr8r?qV2G0N=ubE^XusW<;wSx8l$5`6ommClb-l z-|ft$CkgrmYK#G(RSEAI%qL2dqvq0}>%j-oV90odmoj^hj~bV)ng1r#+sTfA`tz!r#btKj5a3vTWJk=b_Kjeex$A77H}^ckkU`Dep2x zeg6}Wc~4L4*0{QjP1fo-0<2lLDZjNFxtLs_v2>6H1U*Y~c%mtbyQ1KW+D?W`VQ2TD zMV<7SDG|o#;YL^G9ja{y zV+b$@G_`+_CD(7>j_C&Nw+0$Dq^&9GP=Izuo06RZ#qzIqS6B)&8Ca&()-AmGJ8a-Z zmt2F4ao4+amRn~TlDFM$s7ArPw7}8FzeAW?58JEBb_9J{l7fC=@4M)_W)LK)N%=N; zz>(kJU2DB!a4hq@Fv7}<#!`d}!Cu+c#tvrw+P<;!QBFUmoEGJY3}<{;zS@eBIQ4Hh z^th2k-0nzV!^GP1_Ibx~+c6tv-R|nr=u@ Y1~?NUhNB*n?tk)7mencz0JqUAnaPhlg#Z8m diff --git a/test/integration/staging/expected/repo/.git_keep/objects/73/f226ec630e261c016df5bd80e3156eaba42d7e b/test/integration/staging/expected/repo/.git_keep/objects/73/f226ec630e261c016df5bd80e3156eaba42d7e deleted file mode 100644 index 95c2b37c3890cc254ac3433e7d548d7f52ebeb4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 482 zcmV<80UiE$0cBE6Yui8&?N$C2lN=m52*rn7YS1Ccp#++?;NFZ6YiTSmS?!Abh!MvB zy)(P9t<)d{+I{opeQ2Z12EISezxkm@s4WVQZ>YoX-bhjF zJy4Dm5hQzf0KbzC=;?wNUVb2Kf``|;4$Qk4U@!fSAi~3zShd;HP*PTb=zG*n9zP41 zo^&#A)=1YYF)X7Qw;&(M*MXdue{K1*PPrTlMjQRdq9YimlaD;mokbt41}zmMBmOv> zWE5q_TuV}oCCAShIjB-_bek4FSt|wyiwZjNj`?bRQc{3Ioy5u zhA2$-SsJqJcpFTo>Ex?ZxT#nw=YN(S8*$|?+~>D%WK$3`uk$;E20u^{sRgr5RZyx6 z7)-dMDja&aY>Zueu1n?|7#(Rid+3EmRl>7qF0?l#JoQGIR-!8)IJCE9Hl}y>^q+%j zThb158=PQ;%TIe+{Yc*d}jj^Y>ZVzWP1CM~p YVTzY#=sp#kX08=Fp5edcALfQWfs*p*7ytkO diff --git a/test/integration/staging/expected/repo/.git_keep/objects/79/8369253f104fe8cdc91db6f7d3525be532218e b/test/integration/staging/expected/repo/.git_keep/objects/79/8369253f104fe8cdc91db6f7d3525be532218e deleted file mode 100644 index f38ecd0b6f8cbcf50907b2081f028204fc6a3e54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 369 zcmV-%0gnE70Zmc6Zrm^sbgi$LRBm*tk`zuAz{OQ|02iq#aU~MB;wpR`ah*THUzjiP zl7@o-Y`8O+nVp?kW_Qwpd)J2=0OSVXu3Gb`Nrzf80eRM+{0ba-YTHtdwrDf^J%1EfSa&^ zB5XBW*{9)2ko4y%>Jo?Xwl#b4%LQgL+C|1$J36FNOw)h*BmTa=;S!{_>atV2nR3=h zduv}xbC8|J;iukYi|r~=gU9sn(FU2t;fPW!R=>H1&e3d1`|dPI_`L8c5$vy&ejrG0 P1|!;R<;H&p7)8djv(~*( diff --git a/test/integration/staging/expected/repo/.git_keep/objects/a0/425534134de68284a0a7250b83b0e6303f0ed7 b/test/integration/staging/expected/repo/.git_keep/objects/a0/425534134de68284a0a7250b83b0e6303f0ed7 deleted file mode 100644 index 258d99746b7a79a86fd3cb3542495b89a05cc4a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2327 zcmV+y3F!8C0o7S;Z`;Tb?pNtoZ1f?K4laE~4=C!w1q|2r3FkM&a?>IRj5WEWc&12o zcNxdc`M=*Yv%3^Uy;#2VJ~SUrD2;PpyKz<}s(8)5GR?D{kAc7T)4WhtE4A~c+UBIu zsNdh;7e#KYn9EWXBCX5V=2dC>eflVdkS@MEtMie_l)X`fimggcaoi=08ji$w;piwl z6kq#2;}@Rir4k2+6w~O&N~@x4I>zu~69sv+Y@B@Q_wrOMZ9O~`fBX{(>}h3dU5YX< z`n_jF-hW>RrsFSU2?XirOxdwjvm-k$6ZK`-7CGu;_Y0cBt=rOAAU|;y8bm56ju7KLahjt?aipA6D1Bk@a6~bB zCd`J&IAc1}U@T!}c}>S)UeWt@pIcqS^JJB)X4{=dRjYAdWK>+0iPTTxa4Vv{&z3A; zu6;=LytWpulbiY;1+_*J zw2KHyzNoGGqD=JOc?t=@d-!p5Ud0cTFtpG+92JQT2@7EX1*P9hRH`)hFAs?An>dN! zr5AO$Eeo&3GgMi$HY%JUeX~Vt^!1c6i)tBGcz>`FjWei3C|X z+Z$xDvtAV7Ja|>!jwe&CWHO`%*p5W!gn4DG_p>XzTti(1pfn<8(Y%|OuIkTjJ+HFp zgc`;W$|H*0e&{4G;wSaQav4#c5%^alfi8MFK0mp+JHEP{ocwEY_tVM0T^56|Bo)Fh z>@+t*g1uOD0uk57Rx>e_MpSbcpb}v#Q5#xGL0++GB<@u#YvjkH66g#GggB<)ge#Gv z`U;RvRCzR;C#)~3N7&KvR>vVv^=OOs$ssLdX4`JyAOZ7f0jEyNi?eXXDGWb|hTM?Um{= zP`K^s0H4W%koOeUQ(^>O#(U9l2LoYv+$X;H_^C@(S%FY@95!ijiyI#mh2KsM-qeMq8$-)!}sC{#IQnWNo3FmX!$PYvg2hom`$k?pcg3Wi9xdXQVjZG%^A zoJbnSlhe8!l!M8lNJw-kXKHP$cct?LT|v8p7gItjEl|w-`>T@EjG6o~N-M%jIY{!E z&WqMVKNuch3It0>j&vuth1iNHYD@O3h7~HiM5n3ktRLRkn~U*absf3Txnfdf8PRr( z07W6^=tP0^b2N}bjT}@36WS>1F0p|SPlw?}lWoEojZO1(*xl_4bLT0E|zVOp%rt z?M?wuf-B1Vd-b0>*J=jc!Ax1h77FLJnfm^=meM#GdteY7c&&>top+65wZvu_Kkzi^ z)JeumK#OdB1*C4-nziio(m zW&ll%W%2v!b305($zFDlGoa|3H;XG)WoTS{C55 zEGNNck4qw%8`9VVv2Ez4WJI{wjVOR0pusw95?YuMEg#&$UpVu3Kp-a)(azr-%ta*0 z^>fr13y0Pk(X*IOl%YV)q(#?545Y=7@eVI#@hG1RE?W%`CN#Q=snVEV-6;AyAo=4b zcZ2w~G5UFrXXf8*dsFyZ*&YVmJW-AaendFBHhb6+xR~KtEtsF<9gP|ro;BH+>rI)80?>D+CUnAOeFwRiS z0d47@rRMt0$8ocw^H!Wj4QXpidM`jadz+G-fZ{r1w<|0bGZ|Q<)z%||`a2vDmM*vk zDdVqq$(B2>8Irf#ZKy^eytKhL_WuW%y9m3h$u5GZ1_WEaour^&xce^R&4Vb*ZO*sJ z14e#}cdhh_!LcmM$_lq$w6+2+d-tUb!%5320kB2MYwFs3(;qeu9cx$~h+JW;nR346L;`Zk7By@!e zHpZy*l&0IDE68?1!rgO_^HF)`rB}$+Qtxt*9vcU%^<6`)U+5zrX@^mh;d4N1jpgBT zJ1r0~1Yy0hqm)u5$fWv@TY z(}bc-xYv?gW5MxrMh?mt9Nor&kJgIL!J>plykoXn4^DDWsH6Eg^fC z1#~9d(kdK!xJ>MK@ii{OIWW3!!`VYCG^zrAiTcv^x`4;lD6^C3atIFX4Z-&5otge4 zC`Sa&cM5CTB4^SE@J-B+(`0&fihn3AFAPgQ%+6PAg}l&fysVX6(;A089nWeOo&c4@ S81J-Z>d1i|NEYEheJ`6WGhMY&;X7la^}vx=YE|#zRQX`^_QRi{MSFs!{|Otv`VV9-%n@r zqO@w*?+qq1JHW3}C;HQzpNuWjJTZelJ}0T2R(C;E%yxg(#^|`3Oj4c2yIJ_(N4(sf z-zU3xI}7vJ?Bc<#|3XP$wmU1rSeH2WOE=DnSZ80dFQ25z*2e&^-5e*_QtPcZRW_wY zqkeyPS7oWOY98h~QY+B@|-{(g)gmm@8NtKRNqV1K=bYykRonmC^Hu}F^13(+(;T|!vMkE& zRCx{%dacxxQky9S|1;GOX4ragF}H?J@6GUbPrd$#1vm2;@zcEN+0 z*GOae%zWm)f25Pip{yQKy&W|PGlO5RybGb$O>QhAKXw)xc*-jd7vnv0ul;tXm5}2k zFG~Gxnp$m8g7rA(fpiIq14353MA)fo*GC)uQ+ua|zM~#NZ~3drFYTjv%7Mc4g~7uS zee}eb^`3FYbfm#p#>(=Vj={2`_wAV5vI6q7%2l)H!DH2G;0uh7iaZX>N45WKMAw)t zSs=l>HD(BDhBd%bsI|I|&xI!RS|A>RD(jA0suWz%^7~SJvig%Y!CQwE58fuz*hK_hLQKrSz{lAfDeO zNd%N$)Zr%2YAv3i%A&QgaQgI37Oky9W@D9bB9tKZ`)ui`Mw3AvEG*pRkY(c&Keum8H&Y4aacA znn=7h0Q1{#!qkE!ICL9{sas5G4q>)h_Jt1oojpq~I6D}h-<}=4JsF>$v_0WUZZFpl zp29t!4!|tT7Ig+7v=`R+zv{{pz94aD!+U-4QI|_y`YI}m z481#HJ*h)cR=1oNvrd$x1c7iBCf?o88jW*gag^d8vZ97)^*p0 z)M5bw+st*8PSWT(9&V(Ui!Si+`wyO~@(D9U6!3M&#U@|1xbZ=j)!W(NO_fYv zvbY`fBg~tC^4)@VP(C>TNtAqZ%m)$6S7b*xZ9y|!w$}3ZRXCr6OM>O`JSUCNu}d{< z-o0E$Ms11dP{*~}-`(mRmFav)v&?9F1g@Qu|5L-o+dkxIe!FZ_LGS5S4|2<-ZODp^ z6G;O+i$s@$iZewNg#_o}Os{SAu5=!uE0pfw#gx!W3ly{Z{Y5TmCQSYir4?>v4pP3* zdDVJY=hz;mK(KV=NOy8uh%HD_Te4psR;cYc7&R*bf|zugZD;-P)+~`mwPqb5bWmIu zNkZC=5g^OLIXV$fUfVMr|YTzU5G-732k+wwTUfW<_!! z*Ft`lcHbOeGNc0P9z}u9_yFFfo~#hxrb&v%RXM>#D*pBylHH;`*GLcFs9$Xn{k4UL zH#q}9?2+0pH4i>^-3oywJ!lQvU4nU|(ul^zJcecuxWfFg?xaYIDd^cW{HRqbmkesg z6j4!g%>bGjh4~wc8zE?^(3LAU_H#OfJUmG4n=Di4v#OdaiUdgp6;^+jf1t{_24#+H z6=vYGA}7XXXd)#EBojHfE}H5xU= z&aZan!jpu4jv8YDXjQ^{7W0WVbkr=g=z8!$Xfb5G!OJjv2pBd z+4n!onD_Lws!d(DQBqdwI06iJ$xYp6ej5-_&Tv95&{)=x1q8jUl<-7TR(C}q7qx2{ zF2l~9!%b`Hvs6gnFu?-y-%bE~A}A!^UpOogUb(thqiNwd5)X!&K)~I)Ql*!tn;JJ> zm9G))I+#F!IiM~5V^~W4mg9tO@Vph!*pQx0$r=Sn7qpq|5LsU}b-Ti1v54}v7M zsoW+HB=TFlYo%8V4#PYzta9sBYb(Nquvf0NiGzi|c5keFl*6FlxG0apXe!3a)z$=w z)BFvGk6TG3?T!mJOspM`uLi6{lsk)3IJj&@5`6PS{IT2%lW}d(zmdOg)qjup9Rk;# E-W(5-EC2ui diff --git a/test/integration/staging/expected/repo/.git_keep/objects/b7/9b845289f08703b6ffb8927da9665efda4356f b/test/integration/staging/expected/repo/.git_keep/objects/b7/9b845289f08703b6ffb8927da9665efda4356f deleted file mode 100644 index 734b08fe0..000000000 --- a/test/integration/staging/expected/repo/.git_keep/objects/b7/9b845289f08703b6ffb8927da9665efda4356f +++ /dev/null @@ -1,2 +0,0 @@ -x==0So+7"j`)q$9 -,!rœ$ @7NxyyrIn݄X%pGP?7xM=D F%bY5?M9|\q 54|ttXpCq~@mԥ'ҙQK(|U`=SNëeljS AJyubw%!I;B.j1A2aKy8scM`wLCt>#M(#$=?t-ֶw pz_^ElEťgVC ^yMwI??Dy:Z&ފ'VU;&3;lIW:'i8 hфo!ji FZ?< \ No newline at end of file diff --git a/test/integration/staging/expected/repo/.git_keep/objects/d6/9b45d6d14e1864411d17930012210271c400c3 b/test/integration/staging/expected/repo/.git_keep/objects/d6/9b45d6d14e1864411d17930012210271c400c3 deleted file mode 100644 index b8ca4e19d..000000000 --- a/test/integration/staging/expected/repo/.git_keep/objects/d6/9b45d6d14e1864411d17930012210271c400c3 +++ /dev/null @@ -1,2 +0,0 @@ -x=;0Dhd 8hSbK$b0$.ҘjMA'#M#vo ?t=>ֶx pu;//"vC<ߵgVC ^x]I??F=}IJ!NmM;ϳ)aOZ-߽ Ѣ $-Vv \ No newline at end of file diff --git a/test/integration/staging/expected/repo/.git_keep/objects/e7/86ecad3cea3651947e6c2648f6dae87372276b b/test/integration/staging/expected/repo/.git_keep/objects/e7/86ecad3cea3651947e6c2648f6dae87372276b deleted file mode 100644 index b70a7418c8b33c65e05dbba403006d7d008ee29c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmV-z0FwWB0V^p=O;s>7FlR6{FfcPQQOM6r)hnqeVc0&qC8+a5JM*^xJ0{hxOpE)w z#55nOq$C5V2dwC|#l^%G g ffPˆKΰ%x1\hhgD Ljۈdϟ[`:H YkKWEKtQqmaCRn~?QnR kmtqνs+|"x_!fvؓVůe'ڟwA/Z4!oZZ- b \ No newline at end of file diff --git a/test/integration/staging/expected/repo/.git_keep/objects/eb/38d1e424df18868f73407ca8087b6350b59f3e b/test/integration/staging/expected/repo/.git_keep/objects/eb/38d1e424df18868f73407ca8087b6350b59f3e deleted file mode 100644 index 185fa81ec83dc715ecdd1c22fdc7ad7b1e202fe6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2262 zcmV;{2r2h?0o7SuQyWJX&8ze)+In!L6d97dq>3#bC>Dq+ASeUzZn<34plOXJjAoSS z9%JJ0-*e9GZfP`<06Xi4eXtEZw{PEj?$_z|ZC>80pMU!Kr*G!*_%2ShO6#oK&1Unm zvZ~+h^d>Xg!#|Zy^~X7XGPcT!)bzUeInC^}zKzD^Z1;CcKM^~L%aI!q|OE^)%H^7dTe#V<3{+?AE@ub(NS1b zpSm661y8d=tG#{3G`h60)zJlyF(PcDppRn1f@= zR&Fpl*i0!={ER6Vv7N#cm+t@Ah#qpI0h|~CoZKOsETM#Xqk&*`Ri4FJ0b6ucmDS5k zc?u9ltcg^_1AwhFM%1V?7J8f;pXls0YbUgGe^9Xt)UUhL{A0$!^6qYX>?hhEF zN9JsZjB}=?4bC!GR%Kcai$v$2V{WS&$kQv=&7KC2U26efWc0W!lDK+M`%h-H$85y| zN!Ax*hLmPn13ZOZt9^bhEn(Cmi4aWLblgg(pg<$;E5*vZ*w|712Fd$_BDt(@(NJp? zL9>Za^I2{6M{S}v4k;9X?2+Z@v>e~DU?}JTM@JGzf*?F#P`aH&Pjn^o%O}Lso1}<< z(z7;P7rD3M5vD9h8yjaR-*h<|eLt0)MYjwR9uIM10R~${mI9K0v9X4h)0lQxWhj{2 zTXYFn&nj>To)_1{t7)an?snRmUE#6e{0W52+j_Mqnop%Hz&ic;HE^sB5rMCQXYr;XqEY1^*Kc>!$01)ItD> zZRUEMO|tP*Jlx1E7h4eFckcsL73l3;l}&uJrcoKg!m?>=rK zqqf5BP$%B(ukQ7Z%5~AFTW0Wb1g@Ns|5L{$+9BoWezR@Uz!2%i402*JHbi3Ujbs5l zn?##~N-#wgl|-X>rZ#wgk{*+7V=tK8*~6$7Xs8k)swzrEWv=GH1z%Fe|; zch>suWs{;i0`6i@TiW~7DF2sSj?8^#$5UJ=d4+Pg5PUHY9b~0vuidQ17$H^*r*M}k zT8XP2p=7$Ey}!|a)LErxupP`)P;X@6yf)J?Q@PiH>{mc(oQ@qZh%LOsI37OCK-MU!0KE|zinI6cq zP`FFG-yC3?jsxlrRe{cg1m4(BC@a@k*H6}n?_x-b#dS5oja1?tI3%Y<^Ijt}e5-xl zqZe9uT`&Q}pQVk6@s2B4-`+Q{-4&R(8jWmR-p72yA+H1Sn*!)#-_*S=|ACNLj-K-t z52Bm2F+f5>Ru684Je>Kpf=;IQ#rQ43>wqfFQP%cBnYz*{v$zsyQ+#W|Vk`y??gp_1 zum2VwUktTvPU=`$xL(SaDA1eiW;AiA#Jy{Dep$O*00b?c_7$e zY3Y~}@rBX?OzPaYA>f58DkbUD#!jDJL>FE`#Y)N8w^vn~B!WVQ>cd-H22 z4Sx@luQC0(Jd*qpA4Tc~91~N4T?2Uo;a-$xHj`)Cp3G#QdW_xLMCcvHMNwMi|Q;zF|Zn<=E7PBDi4}zQ}(Y`G@|$0piMM^Xj5+g#Z8m diff --git a/test/integration/staging/expected/repo/.git_keep/objects/fb/e09a11933b44ea60b46bd0f3d44142cb6189a4 b/test/integration/staging/expected/repo/.git_keep/objects/fb/e09a11933b44ea60b46bd0f3d44142cb6189a4 deleted file mode 100644 index 3d85419a662afad522df41870cbf387b089d0008..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108 zcmV-y0F(cC0V^p=O;s>7FlR6{FfcPQQOM6r)hnqeVR*4>(dV$&CNi0J%2U$+D)2Ij zZ)t}rDaiop0V`VI6lx;u`>d&D!E#mZ<_*sb?D?+46qV>>>>> lines actually staged - if node.GetHasInlineMergeConflicts() { - return gui.createErrorPanel(gui.Tr.ErrStageDirWithInlineMergeConflicts) - } - - if node.GetHasUnstagedChanges() { - gui.logAction(gui.Tr.Actions.StageFile) - if err := gui.Git.WorkingTree.StageFile(node.Path); err != nil { - return gui.surfaceError(err) - } - } else { - // pretty sure it doesn't matter that we're always passing true here - gui.logAction(gui.Tr.Actions.UnstageFile) - if err := gui.Git.WorkingTree.UnStageFile([]string{node.Path}, true); err != nil { - return gui.surfaceError(err) - } - } - } - - if err := gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{FILES}}); err != nil { - return err - } - - return gui.State.Contexts.Files.HandleFocus() -} - -func (gui *Gui) allFilesStaged() bool { - for _, file := range gui.State.FileManager.GetAllFiles() { - if file.HasUnstagedChanges { - return false - } - } - return true -} - -func (gui *Gui) onFocusFile() error { - gui.takeOverMergeConflictScrolling() - return nil -} - -func (gui *Gui) handleStageAll() error { - var err error - if gui.allFilesStaged() { - gui.logAction(gui.Tr.Actions.UnstageAllFiles) - err = gui.Git.WorkingTree.UnstageAll() - } else { - gui.logAction(gui.Tr.Actions.StageAllFiles) - err = gui.Git.WorkingTree.StageAll() - } - if err != nil { - _ = gui.surfaceError(err) - } - - if err := gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{FILES}}); err != nil { - return err - } - - return gui.State.Contexts.Files.HandleFocus() -} - -func (gui *Gui) handleIgnoreFile() error { - node := gui.getSelectedFileNode() - if node == nil { - return nil - } - - if node.GetPath() == ".gitignore" { - return gui.createErrorPanel("Cannot ignore .gitignore") - } - - unstageFiles := func() error { - return node.ForEachFile(func(file *models.File) error { - if file.HasStagedChanges { - if err := gui.Git.WorkingTree.UnStageFile(file.Names(), file.Tracked); err != nil { - return err - } - } - - return nil - }) - } diff --git a/test/integration/staging/files/three_new.txt b/test/integration/staging/files/three_new.txt deleted file mode 100644 index 500ce9c2b..000000000 --- a/test/integration/staging/files/three_new.txt +++ /dev/null @@ -1,298 +0,0 @@ -package gui - -import ( - "fmt" - "regexp" - "strings" - - "github.com/jesseduffield/lazygit/pkg/commands/git_commands" - "github.com/jesseduffield/lazygit/pkg/commands/loaders" - "github.com/jesseduffield/lazygit/pkg/commands/models" - "github.com/jesseduffield/lazygit/pkg/config" - "github.com/jesseduffield/lazygit/pkg/gui/nodetree" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// list panel functions - -func (gui *Gui) getSelectednodeNode() *nodetree.nodeNode { - selectedLine := gui.State.Panels.nodes.SelectedLineIdx - if selectedLine == -1 { - return nil - } - - return gui.State.nodeManager.GetItemAtIndex(selectedLine) -} - -func (gui *Gui) getSelectednode() *models.node { - node := gui.getSelectednodeNode() - if node == nil { - return nil - } - return node.node -} - -func (gui *Gui) getSelectedPath() string { - node := gui.getSelectednodeNode() - if node == nil { - return "" - } - - return node.GetPath() -} - -func (gui *Gui) nodesRenderToMain() error { - node := gui.getSelectednodeNode() - - if node == nil { - return gui.refreshMainViews(refreshMainOpts{ - main: &viewUpdateOpts{ - title: "", - task: NewRenderStringTask(gui.Tr.NoChangednodes), - }, - }) - } - - if node.node != nil && node.File.HasInlineMergeConflicts { - return gui.renderConflictsFromFilesPanel() - } - - cmdObj := gui.Git.WorkingTree.WorktreeFileDiffCmdObj(node, false, !node.GetHasUnstagedChanges() && node.GetHasStagedChanges(), gui.State.IgnoreWhitespaceInDiffView) - - refreshOpts := refreshMainOpts{main: &viewUpdateOpts{ - title: gui.Tr.UnstagedChanges, - task: NewRunPtyTask(cmdObj.GetCmd()), - }} - - if node.GetHasUnstagedChanges() { - if node.GetHasStagedChanges() { - cmdObj := gui.Git.WorkingTree.WorktreeFileDiffCmdObj(node, false, true, gui.State.IgnoreWhitespaceInDiffView) - - refreshOpts.secondary = &viewUpdateOpts{ - title: gui.Tr.StagedChanges, - task: NewRunPtyTask(cmdObj.GetCmd()), - } - } - } else { - refreshOpts.main.title = gui.Tr.StagedChanges - } - - return gui.refreshMainViews(refreshOpts) -} - -func (gui *Gui) refreshFilesAndSubmodules() error { - gui.Mutexes.RefreshingFilesMutex.Lock() - gui.State.IsRefreshingFiles = true - defer func() { - gui.State.IsRefreshingFiles = false - gui.Mutexes.RefreshingFilesMutex.Unlock() - }() - - selectedPath := gui.getSelectedPath() - - if err := gui.refreshStateSubmoduleConfigs(); err != nil { - return err - } - if err := gui.refreshStateFiles(); err != nil { - return err - } - - gui.OnUIThread(func() error { - if err := gui.postRefreshUpdate(gui.State.Contexts.Submodules); err != nil { - gui.Log.Error(err) - } - - if ContextKey(gui.Views.Files.Context) == FILES_CONTEXT_KEY { - // doing this a little custom (as opposed to using gui.postRefreshUpdate) because we handle selecting the file explicitly below - if err := gui.State.Contexts.Files.HandleRender(); err != nil { - return err - } - } - - if gui.currentContext().GetKey() == FILES_CONTEXT_KEY || (gui.g.CurrentView() == gui.Views.Main && ContextKey(gui.g.CurrentView().Context) == MAIN_MERGING_CONTEXT_KEY) { - newSelectedPath := gui.getSelectedPath() - alreadySelected := selectedPath != "" && newSelectedPath == selectedPath - if !alreadySelected { - gui.takeOverMergeConflictScrolling() - } - - gui.Views.Files.FocusPoint(0, gui.State.Panels.Files.SelectedLineIdx) - return gui.filesRenderToMain() - } - - return nil - }) - - return nil -} - -// specific functions - -func (gui *Gui) stagedFiles() []*models.File { - files := gui.State.FileManager.GetAllFiles() - result := make([]*models.File, 0) - for _, file := range files { - if file.HasStagedChanges { - result = append(result, file) - } - } - return result -} - -func (gui *Gui) trackedFiles() []*models.File { - files := gui.State.FileManager.GetAllFiles() - result := make([]*models.File, 0, len(files)) - for _, file := range files { - if file.Tracked { - result = append(result, file) - } - } - return result -} - -func (gui *Gui) stageSelectedFile() error { - file := gui.getSelectedFile() - if file == nil { - return nil - } - - return gui.Git.WorkingTree.StageFile(file.Name) -} - -func (gui *Gui) handleEnterFile() error { - return gui.enterFile(OnFocusOpts{ClickedViewName: "", ClickedViewLineIdx: -1}) -} - -func (gui *Gui) enterFile(opts OnFocusOpts) error { - node := gui.getSelectedFileNode() - if node == nil { - return nil - } - - if node.File == nil { - return gui.handleToggleDirCollapsed() - } - - file := node.File - - submoduleConfigs := gui.State.Submodules - if file.IsSubmodule(submoduleConfigs) { - submoduleConfig := file.SubmoduleConfig(submoduleConfigs) - return gui.enterSubmodule(submoduleConfig) - } - - if file.HasInlineMergeConflicts { - return gui.switchToMerge() - } - if file.HasMergeConflicts { - return gui.createErrorPanel(gui.Tr.FileStagingRequirements) - } - - return gui.pushContext(gui.State.Contexts.Staging, opts) -} - -func (gui *Gui) handleFilePress() error { - node := gui.getSelectedFileNode() - if node == nil { - return nil - } - - if node.IsLeaf() { - file := node.File - - if file.HasInlineMergeConflicts { - return gui.switchToMerge() - } - - if node.HasUnstagedChanges { - gui.logAction(gui.Tr.Actions.Stagenode) - if err := gui.Git.WorkingTree.Stagenode(node.Name); err != nil { - return gui.surfaceError(err) - } - } else { - gui.logAction(gui.Tr.Actions.Unstagenode) - if err := gui.Git.WorkingTree.UnStagenode(node.Names(), node.Tracked); err != nil { - return gui.surfaceError(err) - } - } - } else { - if node.GetHasInlineMergeConflicts() { - return gui.createErrorPanel(gui.Tr.ErrStageDirWithInlineMergeConflicts) - } - - if node.GetHasUnstagedChanges() { - gui.logAction(gui.Tr.Actions.Stagenode) - if err := gui.Git.WorkingTree.Stagenode(node.Path); err != nil { - return gui.surfaceError(err) - } - } else { - // pretty sure it doesn't matter that we're always passing true here - gui.logAction(gui.Tr.Actions.Unstagenode) - if err := gui.Git.WorkingTree.UnStagenode([]string{node.Path}, true); err != nil { - return gui.surfaceError(err) - } - } - } - - if err := gui.blah(refreshOptions{scope: []RefreshableView{nodeS}}); err != nil { - return err - } - - return gui.State.Contexts.nodes.HandleFocus() -} - -func (gui *Gui) allnodesStaged() bool { - for _, node := range gui.State.nodeManager.GetAllnodes() { - if node.HasUnstagedChanges { - return false - } - } - return true -} - -func (gui *Gui) onFocusnode() error { - gui.takeOverMergeConflictScrolling() - return nil -} - -func (gui *Gui) handleStageAll() error { - var err error - if gui.allnodesStaged() { - gui.logAction(gui.Tr.Actions.UnstageAllnodes) - err = gui.Git.WorkingTree.UnstageAll() - } else { - gui.logAction(gui.Tr.Actions.StageAllnodes) - err = gui.Git.WorkingTree.StageAll() - } - if err != nil { - _ = gui.surfaceError(err) - } - - if err := gui.blah(refreshOptions{scope: []RefreshableView{nodeS}}); err != nil { - return err - } - - return gui.State.Contexts.nodes.HandleFocus() -} - -func (gui *Gui) handleIgnorenode() error { - node := gui.getSelectednodeNode() - if node == nil { - return nil - } - - if node.GetPath() == ".gitignore" { - return gui.createErrorPanel("Cannot ignore .gitignore") - } - - unstagenodes := func() error { - return node.ForEachnode(func(node *models.node) error { - if node.HasStagedChanges { - if err := gui.Git.WorkingTree.UnStagenode(node.Names(), node.Tracked); err != nil { - return err - } - } - - return nil - }) - } diff --git a/test/integration/staging/files/two.txt b/test/integration/staging/files/two.txt deleted file mode 100644 index a48a7caa7..000000000 --- a/test/integration/staging/files/two.txt +++ /dev/null @@ -1,33 +0,0 @@ -type createMenuOptions struct { - showCancel bool -} - -func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions createMenuOptions) error { - if createMenuOptions.showCancel { - // this is mutative but I'm okay with that for now - items = append(items, &menuItem{ - displayStrings: []string{gui.Tr.LcCancel}, - onPress: func() error { - return nil - }, - }) - } - - gui.State.MenuItems = items - - stringArrays := make([][]string, len(items)) - for i, item := range items { - if item.opensMenu && item.displayStrings != nil { - return errors.New("Message for the developer of this app: you've set opensMenu with displaystrings on the menu panel. Bad developer!. Apologies, user") - } - - if item.displayStrings == nil { - styledStr := item.displayString - if item.opensMenu { - styledStr = opensMenuStyle(styledStr) - } - stringArrays[i] = []string{styledStr} - } else { - stringArrays[i] = item.displayStrings - } - } diff --git a/test/integration/staging/files/two_new.txt b/test/integration/staging/files/two_new.txt deleted file mode 100644 index bbe2a2f2c..000000000 --- a/test/integration/staging/files/two_new.txt +++ /dev/null @@ -1,33 +0,0 @@ -type createMenuOptions struct { - showCancel bool -} - -func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions createMenuOptions) error { - if createMenuOptions.showCancel { - // this is mutative but I'm okay with that for now - items = app(items, &menuItem{ - d: []string{gui.Tr.LcCancel}, - onPress: func() error { - return nil - }, - }) - } - - gui.State.MenuItems = items - - stringArrays := make([][]string, len(items)) - for i, items := range items { - if items.opensMenu && item.displayStrings != nil { - return errors.New("Message for the developer of this app: you've set opensMenu with displaystrings on the menu panel. Bad developer!. Apologies, user") - } - - if item.displayStrings == nil { - styledStr := item.displayString - if item.opensMenu { - styledStr = opensMenuStyle(styledStr) - } - stringArrays[0] = []str0ng{styledStr} - } else { - str0ngArrays[0] = item.displayStrings - } - } diff --git a/test/integration/staging/recording.json b/test/integration/staging/recording.json deleted file mode 100644 index 73d7e58d1..000000000 --- a/test/integration/staging/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":699,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1521,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1825,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2154,"Mod":0,"Key":256,"Ch":118},{"Timestamp":2338,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2560,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3210,"Mod":0,"Key":9,"Ch":9},{"Timestamp":3610,"Mod":0,"Key":256,"Ch":118},{"Timestamp":3762,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3907,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4034,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4328,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5857,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6019,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6170,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6314,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6474,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6626,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6778,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6930,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7074,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7218,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7368,"Mod":0,"Key":258,"Ch":0},{"Timestamp":8064,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8586,"Mod":0,"Key":258,"Ch":0},{"Timestamp":8930,"Mod":0,"Key":256,"Ch":118},{"Timestamp":9130,"Mod":0,"Key":258,"Ch":0},{"Timestamp":9354,"Mod":0,"Key":256,"Ch":32},{"Timestamp":10488,"Mod":0,"Key":27,"Ch":0},{"Timestamp":11354,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11650,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12194,"Mod":0,"Key":256,"Ch":97},{"Timestamp":12841,"Mod":0,"Key":256,"Ch":32},{"Timestamp":14144,"Mod":0,"Key":9,"Ch":9},{"Timestamp":14698,"Mod":0,"Key":256,"Ch":97},{"Timestamp":15082,"Mod":0,"Key":256,"Ch":32},{"Timestamp":15993,"Mod":0,"Key":256,"Ch":97},{"Timestamp":16330,"Mod":0,"Key":256,"Ch":32},{"Timestamp":16850,"Mod":0,"Key":256,"Ch":32},{"Timestamp":17594,"Mod":0,"Key":256,"Ch":32},{"Timestamp":18405,"Mod":0,"Key":27,"Ch":0},{"Timestamp":18858,"Mod":0,"Key":258,"Ch":0},{"Timestamp":20379,"Mod":0,"Key":13,"Ch":13},{"Timestamp":23458,"Mod":0,"Key":256,"Ch":118},{"Timestamp":23675,"Mod":0,"Key":258,"Ch":0},{"Timestamp":23824,"Mod":0,"Key":258,"Ch":0},{"Timestamp":23968,"Mod":0,"Key":258,"Ch":0},{"Timestamp":24338,"Mod":0,"Key":256,"Ch":100},{"Timestamp":24747,"Mod":0,"Key":13,"Ch":13},{"Timestamp":25281,"Mod":0,"Key":256,"Ch":97},{"Timestamp":25651,"Mod":0,"Key":256,"Ch":100},{"Timestamp":26050,"Mod":0,"Key":13,"Ch":13},{"Timestamp":27056,"Mod":0,"Key":256,"Ch":32},{"Timestamp":27849,"Mod":0,"Key":27,"Ch":0},{"Timestamp":28746,"Mod":0,"Key":256,"Ch":99},{"Timestamp":29019,"Mod":0,"Key":256,"Ch":116},{"Timestamp":29074,"Mod":0,"Key":256,"Ch":101},{"Timestamp":29273,"Mod":0,"Key":256,"Ch":115},{"Timestamp":29297,"Mod":0,"Key":256,"Ch":116},{"Timestamp":29538,"Mod":0,"Key":13,"Ch":13},{"Timestamp":30098,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":118,"Height":61}]} \ No newline at end of file diff --git a/test/integration/staging/setup.sh b/test/integration/staging/setup.sh deleted file mode 100644 index da73083d2..000000000 --- a/test/integration/staging/setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -cp ../../files/two.txt two.txt -cp ../../files/three.txt three.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt -cp ../../files/two_new.txt two.txt -cp ../../files/three_new.txt three.txt diff --git a/test/integration/staging/test.json b/test/integration/staging/test.json deleted file mode 100644 index f93f82f13..000000000 --- a/test/integration/staging/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Staging a file via the patch explorer", - "speed": 30 -} diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stagingDiscard/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index e2129701f..000000000 --- a/test/integration/stagingDiscard/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file1 diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stagingDiscard/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/HEAD b/test/integration/stagingDiscard/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/stagingDiscard/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/config b/test/integration/stagingDiscard/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/stagingDiscard/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/stagingDiscard/expected/repo/.git_keep/description b/test/integration/stagingDiscard/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/stagingDiscard/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/stagingDiscard/expected/repo/.git_keep/index b/test/integration/stagingDiscard/expected/repo/.git_keep/index deleted file mode 100644 index b80cdaea29a2ffc42e4197e94c041ef998d856a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmZ?q402{*U|<4b#-z6sLKzn~Wr68M#R`lJ46MxOzcn#1G%f*3e+8-$0SY}8?VB}6 zYMS~hzAyK>8J04? 1659736149 +1000 commit (initial): file1 diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stagingDiscard/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 2f8312a35..000000000 --- a/test/integration/stagingDiscard/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 adf0c68f5e5508ce3fc598d5f01a53486bd9d287 CI 1659736149 +1000 commit (initial): file1 diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/stagingDiscard/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e deleted file mode 100644 index 2c00719b0e5858d36ec8b4f5d17c9076f943d1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~C9WiT`_Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO KFb@DJ?hn7{0Tf*T diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/objects/ad/f0c68f5e5508ce3fc598d5f01a53486bd9d287 b/test/integration/stagingDiscard/expected/repo/.git_keep/objects/ad/f0c68f5e5508ce3fc598d5f01a53486bd9d287 deleted file mode 100644 index e09a1756468ae581a48fe5f197443cb5a74fe736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmV-*0E+*30ga783c@fD06pgwdlw|z#9bFegr540WZht)A*Dp{`Q`~;hhaurt!oF2 z@zf79;4C^}l!Bz}NiDHtAEppB6PK5C@lsfO&!Yygcoj>b}`UTYUi1RXEV7 Xz!|;wZqPC5_NVU3x*573*GMb|g0?zD diff --git a/test/integration/stagingDiscard/expected/repo/.git_keep/refs/heads/master b/test/integration/stagingDiscard/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index ddab060df..000000000 --- a/test/integration/stagingDiscard/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -adf0c68f5e5508ce3fc598d5f01a53486bd9d287 diff --git a/test/integration/stagingDiscard/expected/repo/one.txt b/test/integration/stagingDiscard/expected/repo/one.txt deleted file mode 100644 index 9b92aa365..000000000 --- a/test/integration/stagingDiscard/expected/repo/one.txt +++ /dev/null @@ -1,64 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscard/files/one.txt b/test/integration/stagingDiscard/files/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/stagingDiscard/files/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscard/files/one_new.txt b/test/integration/stagingDiscard/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingDiscard/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscard/recording.json b/test/integration/stagingDiscard/recording.json deleted file mode 100644 index b123b242c..000000000 --- a/test/integration/stagingDiscard/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":771,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1187,"Mod":0,"Key":256,"Ch":118},{"Timestamp":1428,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1604,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1901,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2213,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2947,"Mod":0,"Key":27,"Ch":0},{"Timestamp":3555,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":118,"Height":61}]} \ No newline at end of file diff --git a/test/integration/stagingDiscard/setup.sh b/test/integration/stagingDiscard/setup.sh deleted file mode 100644 index 9b1f6fb8c..000000000 --- a/test/integration/stagingDiscard/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt diff --git a/test/integration/stagingDiscard/test.json b/test/integration/stagingDiscard/test.json deleted file mode 100644 index 63bb457ce..000000000 --- a/test/integration/stagingDiscard/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Discard a chunk of code", - "speed": 20 -} diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stagingDiscardAll/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index e2129701f..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file1 diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stagingDiscardAll/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/HEAD b/test/integration/stagingDiscardAll/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/config b/test/integration/stagingDiscardAll/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/stagingDiscardAll/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/stagingDiscardAll/expected/repo/.git_keep/description b/test/integration/stagingDiscardAll/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/stagingDiscardAll/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/stagingDiscardAll/expected/repo/.git_keep/index b/test/integration/stagingDiscardAll/expected/repo/.git_keep/index deleted file mode 100644 index a0c00de83dc77a1efe1ec9b9548472b426070d59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmZ?q402{*U|<5_q_-30S-h-ofoae397YBPR_616lNlHqmoP9eeg&!#0SY}8?VB}6 zYMS~hzAyK>8J04?k diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/info/exclude b/test/integration/stagingDiscardAll/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/stagingDiscardAll/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/stagingDiscardAll/expected/repo/.git_keep/logs/HEAD b/test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 55d603f68..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 bccb06809b2f0e67bb3d3dd22c2b95882e72cbbb CI 1659736351 +1000 commit (initial): file1 diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 55d603f68..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 bccb06809b2f0e67bb3d3dd22c2b95882e72cbbb CI 1659736351 +1000 commit (initial): file1 diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e deleted file mode 100644 index 2c00719b0e5858d36ec8b4f5d17c9076f943d1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~CAU@$Z=Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO RFb}Gvq&y#|5&$CW9bAQ?7XSbN diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 b/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 deleted file mode 100644 index b878ef1b272f9a2aab3c40e74373a13609c269f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmV-n0-pVN0ku@IZrd;r?J9l+p&^hA*J_6>20Ww*oCXNuA})}bmMEDqMGBN;!wvlJ zy%R;sa)P!?HHr6*@9y3sxsiH9zg}N|`BbrV#|ln$o$9h=Dys<*Wu;9+BNBv#XtwQU z23YdS>zZe6o(nFsM6zE;0F!E0B)C(n@L$v0M#wrOF(FAppZMXfEz9F-eQWE})Nt1D znlh^Rfo2HO0nN3cfHp!EByUyvo*;_pWXOLbfv#`MjLsLB>Vc^1V&=+Yajl|wY7735 ztbt196!$!}Qr@@XVRfG~Mv8AZ} zCRV$d4U)hW?$C)_k>H*;Tti{so85P}9V5~CKuGcWa?FNNfgHOk<|XajXY1piH7 zwc5OXYlY0X!Ja=B^9B6J{-X?s@akdcQf84;OqyYx#eym!aoV6_N~BTv^8My#7?a>c z0y{DqV)HxcNdWtMz4M;tDMmxmDep|lY&MQAI&S4#z_X^s+ zrVw|vEaHd}DSFQ=(#`5@MA)1eHn&ood)P7HsdFX&eiUKL>7A7$qa)KQ#SMM1(dTXj zMvjuuHYdRdKp89n_GJICO*b@5fw$Eu;@a6WGY05_Ub!UTT&?|xR^2dT<{(rE1nVuA z@*EB~tloO$#uOe5Kc^U9Ra~K0@RV67)DWR>Z#i5I#Y%oUxwJ>2c0SdmNeFf+f4mb` vIVb02$#(ogQh#_*PIwvm*X{p3LqidJ1^vr7^004t{A$_W;OP7YiDmxQ5jZa< diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bc/cb06809b2f0e67bb3d3dd22c2b95882e72cbbb b/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bc/cb06809b2f0e67bb3d3dd22c2b95882e72cbbb deleted file mode 100644 index 24ceec3ca..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/objects/bc/cb06809b2f0e67bb3d3dd22c2b95882e72cbbb +++ /dev/null @@ -1,4 +0,0 @@ -xM -0sʌ1E -`H -ۗTKYI#k|"&.%A24 M33}#2x ݅UIß,1?,O \ No newline at end of file diff --git a/test/integration/stagingDiscardAll/expected/repo/.git_keep/refs/heads/master b/test/integration/stagingDiscardAll/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 044f5dd99..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -bccb06809b2f0e67bb3d3dd22c2b95882e72cbbb diff --git a/test/integration/stagingDiscardAll/expected/repo/one.txt b/test/integration/stagingDiscardAll/expected/repo/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscardAll/expected/repo/two.txt b/test/integration/stagingDiscardAll/expected/repo/two.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingDiscardAll/expected/repo/two.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscardAll/files/one.txt b/test/integration/stagingDiscardAll/files/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/stagingDiscardAll/files/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscardAll/files/one_new.txt b/test/integration/stagingDiscardAll/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingDiscardAll/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingDiscardAll/recording.json b/test/integration/stagingDiscardAll/recording.json deleted file mode 100644 index 037222739..000000000 --- a/test/integration/stagingDiscardAll/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":472,"Mod":0,"Key":13,"Ch":13},{"Timestamp":720,"Mod":0,"Key":256,"Ch":97},{"Timestamp":944,"Mod":0,"Key":256,"Ch":100},{"Timestamp":1192,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1494,"Mod":0,"Key":256,"Ch":100},{"Timestamp":1782,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2368,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3038,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":118,"Height":61}]} \ No newline at end of file diff --git a/test/integration/stagingDiscardAll/setup.sh b/test/integration/stagingDiscardAll/setup.sh deleted file mode 100644 index 31adabafe..000000000 --- a/test/integration/stagingDiscardAll/setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -cp ../../files/one.txt two.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt -cp ../../files/one_new.txt two.txt diff --git a/test/integration/stagingDiscardAll/test.json b/test/integration/stagingDiscardAll/test.json deleted file mode 100644 index 3b35675f6..000000000 --- a/test/integration/stagingDiscardAll/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Discard all changes in a file via staging panel and expect to end up in the staging panel for the next file.", - "speed": 20 -} diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index e2129701f..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file1 diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/HEAD b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/config b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/stagingEnterSecondary/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/stagingEnterSecondary/expected/repo/.git_keep/description b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/stagingEnterSecondary/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/stagingEnterSecondary/expected/repo/.git_keep/index b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/index deleted file mode 100644 index f3a2f573134d72555074f8f5fc11badfeb446a92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmZ?q402{*U|<4bMj*xk8kZnTteteHtZ=E&?Dh{|kMm5}(y@-`-7*ID{Jd1Xl8O?b n!jK?WS0Kg4plhgLz*Tnh@a}+!xhGn@Qnx=1D!Qd0C?Wv>meU+z diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/info/exclude b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/stagingEnterSecondary/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/stagingEnterSecondary/expected/repo/.git_keep/logs/HEAD b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 82a2a1a3f..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 68a4bb206023fd2396e04e1ccdf9b853cda4ac70 CI 1659736184 +1000 commit (initial): file1 diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 82a2a1a3f..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 68a4bb206023fd2396e04e1ccdf9b853cda4ac70 CI 1659736184 +1000 commit (initial): file1 diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e deleted file mode 100644 index 2c00719b0e5858d36ec8b4f5d17c9076f943d1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~CsOzuG;Dyh^Hu? ZX$~+DBD%AllWu=9WiT`_Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO KFb@DJ?hn7{0Tf*T diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/ad/92dc7671a5129b87f0f5c70c90b488ae0ceea6 b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/ad/92dc7671a5129b87f0f5c70c90b488ae0ceea6 deleted file mode 100644 index 191ffe162aee6a0f0c17dc8a95f7eb4230de9d0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 600 zcmV-e0;m0W0ku@YirX*{?bZ4U;lpBwG^Uh73FOf3l4W7pl+B@M#g-jyWXZ^OLb~MN zJ7Zb0on6{q>XS8ZG;iiTNjs@`^wXEmUq4hVJ+OjPU8lM%naXNHL|JLm(1-+KA)0-= zTL6~4@Ve$%o9BYdERpQj8Nj4E6bbIsD*V^Py+1^@yni|d; zUQz`RB-bj6=a%q? zWDPKtbKLXPN_pRkht1WVM_oj53}Xa_H?2{iArO%ZA&j}4U)hScj(NmNN~>^u8wQf#c}Qk3W5eP7Dg?CXI|aZ)ZA=Gv!L=}#>`2m5DIMfT*@&V?pVF|$Tw4X zF#MQed{c3SF2eI=p-@AFzP{#g9TY41<>JyFg*y0DmnI?DrTp<8Smm6Yvo$;LD@pya mLOJ0z=wGz|_w)=T3upy2_V3yFdiO0)Un<)h9G&0fz4|Cg12=B~ diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 deleted file mode 100644 index 530b393a0b7690ef4757199f0166a067fbbe01e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 617 zcmV-v0+#)F0ku@YZrd;n-PQUE!H2>QvIIM90|MmGwMbW>XohA$&x$QOYGlcf?F3no ze;;XCvYi&&F3TzABl*bpByFYM(odhie)&+cWY2O=b(QF%U@EN$5k;v@O(PP7xu|!| zb_Uq|g;y0%n=BJtrgO=DodBGd`+Sa-T800b-qb=?A&Ci@&*>vS-Zn*XT5oPFKTQm0 zHLob6iXUl;Annmi8wzMGR8F!+C2t!Y5>q`8wNuO-J(6n`#Zyc8 zL$Vr}iYeASHd5X-;(mQm^Pux6j$w_!@VYSyGz21YCZs-9p5>A%A#vNFWJ)Aa`279)XBd;< zOai+y8e;QX=}7?f9WtnP5&FJe*pCEd=az5T>jq6dI%wO+#(vv=ot;;HUEISuwCEJH zb4?-cxGdrtBa(NXS)|?7*@&J0(p{Kn+b5r|Bq z6gTwVMxWX*uy~Y&hB|RZ019LqAi4dA(>OU`KfK3ID>u%8nK3|@^vWec&-G@o3o0L` z%p8RZp}}Uyr5wWHmQ_2CT$|j3;l~8y>yj&U5gs`Ug&HFC^)-V_qgcVuXP5RM)ZVAM zGzq~r<&U?;D(B>!tk|AkNa~Lj$_Z~q_wN0_2dXErm(#zQBM-Zg$M2b)4UW!lv>F7l D@>wqH diff --git a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/refs/heads/master b/test/integration/stagingEnterSecondary/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 995be4311..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -68a4bb206023fd2396e04e1ccdf9b853cda4ac70 diff --git a/test/integration/stagingEnterSecondary/expected/repo/one.txt b/test/integration/stagingEnterSecondary/expected/repo/one.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingEnterSecondary/expected/repo/one.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingEnterSecondary/files/one.txt b/test/integration/stagingEnterSecondary/files/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/stagingEnterSecondary/files/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingEnterSecondary/files/one_new.txt b/test/integration/stagingEnterSecondary/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingEnterSecondary/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingEnterSecondary/recording.json b/test/integration/stagingEnterSecondary/recording.json deleted file mode 100644 index 8bac345be..000000000 --- a/test/integration/stagingEnterSecondary/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":704,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1719,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3183,"Mod":0,"Key":256,"Ch":118},{"Timestamp":3504,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3976,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4944,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":118,"Height":61}]} \ No newline at end of file diff --git a/test/integration/stagingEnterSecondary/setup.sh b/test/integration/stagingEnterSecondary/setup.sh deleted file mode 100644 index 9b1f6fb8c..000000000 --- a/test/integration/stagingEnterSecondary/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt diff --git a/test/integration/stagingEnterSecondary/test.json b/test/integration/stagingEnterSecondary/test.json deleted file mode 100644 index 03bdc4b46..000000000 --- a/test/integration/stagingEnterSecondary/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Hit enter on a fully staged file to end up in the secondary staging panel.", - "speed": 20 -} diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/stagingForcedToggle/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index e2129701f..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file1 diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/FETCH_HEAD b/test/integration/stagingForcedToggle/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/HEAD b/test/integration/stagingForcedToggle/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/config b/test/integration/stagingForcedToggle/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/stagingForcedToggle/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/stagingForcedToggle/expected/repo/.git_keep/description b/test/integration/stagingForcedToggle/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/stagingForcedToggle/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/stagingForcedToggle/expected/repo/.git_keep/index b/test/integration/stagingForcedToggle/expected/repo/.git_keep/index deleted file mode 100644 index 5f7e351961b7f6d3549fe52cc138a0233a9989ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmZ?q402{*U|<4bMj*xk8kZnTG;Ha-_;tCAo!jw;EA$_w{NJ#oD4&5nKQC3Uq@o0< nFeJ#;6-co$=o%^*a3$<=nl*t>Vc*>n+Y56P-GYQWKl=gzh8P>v diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/info/exclude b/test/integration/stagingForcedToggle/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/stagingForcedToggle/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/stagingForcedToggle/expected/repo/.git_keep/logs/HEAD b/test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index e60ea548f..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 de59eafcc9bdb8fe9080f70e5252936832b13afe CI 1659736228 +1000 commit (initial): file1 diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index e60ea548f..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 de59eafcc9bdb8fe9080f70e5252936832b13afe CI 1659736228 +1000 commit (initial): file1 diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e deleted file mode 100644 index 2c00719b0e5858d36ec8b4f5d17c9076f943d1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~C9WiT`_Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO KFb@DJ?hn7{0Tf*T diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/80/b489d1f5a71c3e46c7e1a82fe264ffb0a4726f b/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/80/b489d1f5a71c3e46c7e1a82fe264ffb0a4726f deleted file mode 100644 index 992d06341d83bcd82fbdebdf4a619f4a49c3ad5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7J0ku@IZrd;r?J9l+p&^hA*Fu42G2kIh;50xG7jc2iv_#2_DN>*$8*bo# z@0}>pk`uIDs!6!*sPJ63S2>r|H|Q&~-jC@XCm8j&C@M6+!- zGr*EpUe`Qp^IUM5C6fI*0+>|0BEg+nh5wq~HbT}Ri3v#(`os@+ZCM^y>swo&riQbI z*OXDk4>UuNp3z(z3TPu#LGo6m?+K!qPR{vnB+&J3nbG+IQ#}xMUCdm0EUr})Pi?^; zk~L7NoZ_CRR?7QUJghGEJnABfV;CbaylIUB4WSS@5z-the(w2>S2e90)20oDc5EqX zzlqguW`iVfg*$ZORwTIR4Ojc6>f$(e1cabLjKru#@XSlS=Sv|uWQ{VoG1@>~5W#;F zSgkg%-&!FvZm{Q%#e4z(vHvK;A-sARx|BJnm=b9ezI?y=8O9_yk-!dz(&KhNq{wNH zEEZG=iK@8V1^w6<s?VF;UnHFGP)(5;RE&zCFt_d|zUz(K!(_5zm~Ag6bBj?9iss}wi%!A76E z6_`0nLQ9-DBLD@m1X$euVK+_=m=ABP)5^88XJ!o01-)`fz`0rvW~?BBQHb?;jqzg)IAI6A)pKsf#u-|{D$ diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 b/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/bb/e897baa83fd0099ba30daf3a97edc97d8c86b5 deleted file mode 100644 index b878ef1b272f9a2aab3c40e74373a13609c269f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 609 zcmV-n0-pVN0ku@IZrd;r?J9l+p&^hA*J_6>20Ww*oCXNuA})}bmMEDqMGBN;!wvlJ zy%R;sa)P!?HHr6*@9y3sxsiH9zg}N|`BbrV#|ln$o$9h=Dys<*Wu;9+BNBv#XtwQU z23YdS>zZe6o(nFsM6zE;0F!E0B)C(n@L$v0M#wrOF(FAppZMXfEz9F-eQWE})Nt1D znlh^Rfo2HO0nN3cfHp!EByUyvo*;_pWXOLbfv#`MjLsLB>Vc^1V&=+Yajl|wY7735 ztbt196!$!}Qr@@XVRfG~Mv8AZ} zCRV$d4U)hW?$C)_k>H*;Tti{so85P}9V5~CKuGcWa?FNNfgHOk<|XajXY1piH7 zwc5OXYlY0X!Ja=B^9B6J{-X?s@akdcQf84;OqyYx#eym!aoV6_N~BTv^8My#7?a>c z0y{DqV)HxcNdWtMz4M;tDMmxmDep|lY&MQAI&S4#z_X^s+ zrVw|vEaHd}DSFQ=(#`5@MA)1eHn&ood)P7HsdFX&eiUKL>7A7$qa)KQ#SMM1(dTXj zMvjuuHYdRdKp89n_GJICO*b@5fw$Eu;@a6WGY05_Ub!UTT&?|xR^2dT<{(rE1nVuA z@*EB~tloO$#uOe5Kc^U9Ra~K0@RV67)DWR>Z#i5I#Y%oUxwJ>2c0SdmNeFf+f4mb` vIVb02$#(ogQh#_*PIwvm*X{p3LqidJ1^vr7^004t{A$_W;OP7YiDmxQ5jZa< diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 b/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/c3/323cfc94775013acea4145545f47ac1af5c9d2 deleted file mode 100644 index 530b393a0b7690ef4757199f0166a067fbbe01e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 617 zcmV-v0+#)F0ku@YZrd;n-PQUE!H2>QvIIM90|MmGwMbW>XohA$&x$QOYGlcf?F3no ze;;XCvYi&&F3TzABl*bpByFYM(odhie)&+cWY2O=b(QF%U@EN$5k;v@O(PP7xu|!| zb_Uq|g;y0%n=BJtrgO=DodBGd`+Sa-T800b-qb=?A&Ci@&*>vS-Zn*XT5oPFKTQm0 zHLob6iXUl;Annmi8wzMGR8F!+C2t!Y5>q`8wNuO-J(6n`#Zyc8 zL$Vr}iYeASHd5X-;(mQm^Pux6j$w_!@VYSyGz21YCZs-9p5>A%A#vNFWJ)Aa`279)XBd;< zOai+y8e;QX=}7?f9WtnP5&FJe*pCEd=az5T>jq6dI%wO+#(vv=ot;;HUEISuwCEJH zb4?-cxGdrtBa(NXS)|?7*@&J0(p{Kn+b5r|Bq z6gTwVMxWX*uy~Y&hB|RZ019LqAi4dA(>OU`KfK3ID>u%8nK3|@^vWec&-G@o3o0L` z%p8RZp}}Uyr5wWHmQ_2CT$|j3;l~8y>yj&U5gs`Ug&HFC^)-V_qgcVuXP5RM)ZVAM zGzq~r<&U?;D(B>!tk|AkNa~Lj$_Z~q_wN0_2dXErm(#zQBM-Zg$M2b)4UW!lv>F7l D@>wqH diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/de/59eafcc9bdb8fe9080f70e5252936832b13afe b/test/integration/stagingForcedToggle/expected/repo/.git_keep/objects/de/59eafcc9bdb8fe9080f70e5252936832b13afe deleted file mode 100644 index 1aa8bed5753fbff1e235d37ca8836fad3afd591f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmV-+0Ez#20gcT;3c@fDKvCB@#q0&iBypw#B0^U^Mlw#Y&=4sRJia}G+s}iqy|r}! zrgR#+8E_E|n4}^pds53R#m5kn7UKFeHYqe!mp|jxcbFHr&CA2SxxF{LXm58wx(Y`M YVS+Py@7+<4$*@1UtLtXye%7um0;+E{@&Et; diff --git a/test/integration/stagingForcedToggle/expected/repo/.git_keep/refs/heads/master b/test/integration/stagingForcedToggle/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index c9e76c463..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -de59eafcc9bdb8fe9080f70e5252936832b13afe diff --git a/test/integration/stagingForcedToggle/expected/repo/one.txt b/test/integration/stagingForcedToggle/expected/repo/one.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingForcedToggle/expected/repo/one.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingForcedToggle/files/one.txt b/test/integration/stagingForcedToggle/files/one.txt deleted file mode 100644 index 158e9a9c1..000000000 --- a/test/integration/stagingForcedToggle/files/one.txt +++ /dev/null @@ -1,63 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingForcedToggle/files/one_new.txt b/test/integration/stagingForcedToggle/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/stagingForcedToggle/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} diff --git a/test/integration/stagingForcedToggle/recording.json b/test/integration/stagingForcedToggle/recording.json deleted file mode 100644 index 11e83b51c..000000000 --- a/test/integration/stagingForcedToggle/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":508,"Mod":0,"Key":13,"Ch":13},{"Timestamp":804,"Mod":0,"Key":256,"Ch":97},{"Timestamp":1094,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1429,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2398,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3060,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":118,"Height":61}]} \ No newline at end of file diff --git a/test/integration/stagingForcedToggle/setup.sh b/test/integration/stagingForcedToggle/setup.sh deleted file mode 100644 index 9b1f6fb8c..000000000 --- a/test/integration/stagingForcedToggle/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -cp ../../files/one.txt one.txt -git add . -git commit -am file1 - -cp ../../files/one_new.txt one.txt diff --git a/test/integration/stagingForcedToggle/test.json b/test/integration/stagingForcedToggle/test.json deleted file mode 100644 index 1f59de864..000000000 --- a/test/integration/stagingForcedToggle/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "stage everything in a file so that you're forced to switch focus to the secondary panel", - "speed": 20 -}