From dd1bf629b87db297a6336511a4e1ba39ba7afbc8 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 25 Feb 2023 13:08:45 +1100 Subject: [PATCH] migrate patch building tests --- pkg/gui/mergeconflicts/state.go | 23 ++ pkg/integration/components/actions.go | 6 + pkg/integration/components/alert_driver.go | 4 +- .../components/assertion_helper.go | 2 +- .../components/commit_message_panel_driver.go | 2 +- .../components/confirmation_driver.go | 4 +- pkg/integration/components/file_system.go | 2 +- pkg/integration/components/matcher.go | 48 +-- pkg/integration/components/menu_driver.go | 8 +- pkg/integration/components/prompt_driver.go | 10 +- pkg/integration/components/search_driver.go | 2 +- pkg/integration/components/shell.go | 4 + pkg/integration/components/test_driver.go | 64 +--- pkg/integration/components/viewDriver.go | 330 ++++++++++++------ pkg/integration/components/views.go | 101 ++++-- pkg/integration/tests/patch_building/apply.go | 64 ++++ .../tests/patch_building/apply_in_reverse.go | 49 +++ .../patch_building/copy_patch_to_clipboard.go | 8 +- .../tests/patch_building/move_to_index.go | 66 ++++ .../patch_building/move_to_index_partial.go | 98 ++++++ .../move_to_index_with_conflict.go | 89 +++++ .../patch_building/move_to_new_commit.go | 70 ++++ .../patch_building/remove_from_commit.go | 57 +++ .../tests/patch_building/reset_with_escape.go | 43 +++ .../tests/patch_building/select_all_files.go | 42 +++ .../patch_building/specific_selection.go | 167 +++++++++ .../tests/patch_building/start_new_patch.go | 62 ++++ pkg/integration/tests/tests_gen.go | 11 + .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/ORIG_HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 281 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 10 - .../repo/.git_keep/logs/refs/heads/master | 6 - .../01/5689313279311c9356ea3fd3628f73ca4ea797 | Bin 77 -> 0 bytes .../01/ed22faef05591076721466e07fb10962642887 | Bin 119 -> 0 bytes .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../24/4cec6fa9704d5dc61fc5e60faba4125dfe3baa | Bin 156 -> 0 bytes .../24/79abfe7bd6b64a753d3c3797f614bbb422f627 | Bin 148 -> 0 bytes .../47/5a06b7978eef6509efdd2a86e341992d9f2908 | Bin 41 -> 0 bytes .../52/863675692b53d9e34dd72da8c35a72bf0a5b51 | Bin 43 -> 0 bytes .../7a/40dadc0814bf7f1418d005eae184848a9f1c94 | Bin 155 -> 0 bytes .../92/2fc2ed1965fe8436ce7837c634379f14faf3c3 | Bin 149 -> 0 bytes .../92/571130f37c70766612048271f1d4dca63ef0b5 | Bin 146 -> 0 bytes .../93/96d8d0c471661257f6c16c1957452912c0c6f5 | Bin 41 -> 0 bytes .../a3/2f90adf7ee0f14ae300e49cdf8779507746c27 | Bin 103 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../ad/e030587c8ae5d240ad7669bff9030b24bd6385 | Bin 77 -> 0 bytes .../c6/9e35e8cae5688bbfcf8278c20ab43c1b8dbae3 | Bin 153 -> 0 bytes .../ce/024fc694fd464cfb5b43cb7702f0bd7345d882 | Bin 77 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../e3/31050363ceb0b12d9d042e37879d892d867ea0 | Bin 103 -> 0 bytes .../f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a | Bin 39 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../patchBuilding/expected/repo/myfile1 | 1 - .../patchBuilding/expected/repo/myfile2 | 3 - .../patchBuilding/expected/repo/myfile3 | 1 - test/integration/patchBuilding/recording.json | 1 - test/integration/patchBuilding/setup.sh | 26 -- test/integration/patchBuilding/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/ORIG_HEAD | 1 - .../expected/repo/.git_keep/config | 10 - .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 281 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 6 - .../repo/.git_keep/logs/refs/heads/master | 5 - .../expected/repo/.git_keep/logs/refs/stash | 1 - .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../1a/b6a62ed874b19c1191ba2b0106741ca4ca4b50 | Bin 164 -> 0 bytes .../2c/60d208ba3ec966b77ca756237843af7584cf93 | 2 - .../47/5a06b7978eef6509efdd2a86e341992d9f2908 | Bin 41 -> 0 bytes .../50/63202049f1980e035c390732a7e6da8783357f | Bin 150 -> 0 bytes .../52/863675692b53d9e34dd72da8c35a72bf0a5b51 | Bin 43 -> 0 bytes .../9a/939087472cfaf305396d4b177ee888ced193d9 | 3 - .../a3/2f90adf7ee0f14ae300e49cdf8779507746c27 | Bin 103 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../ad/27dd25048bff07da92d2d9d829e4dd75472da4 | Bin 149 -> 0 bytes .../ad/e030587c8ae5d240ad7669bff9030b24bd6385 | Bin 77 -> 0 bytes .../ce/024fc694fd464cfb5b43cb7702f0bd7345d882 | Bin 77 -> 0 bytes .../d0/ec73019f9c5e426c9b37fa58757855367580a5 | Bin 155 -> 0 bytes .../d3/4fc4a9c0c675a5cb11d848e5afef4c89160dc0 | Bin 103 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../e3/31050363ceb0b12d9d042e37879d892d867ea0 | Bin 103 -> 0 bytes .../e4/74bc2d1712ed5fdf14fb7223392f1b0dcc8d37 | Bin 146 -> 0 bytes .../f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a | Bin 39 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/.git_keep/refs/stash | 1 - .../patchBuilding2/expected/repo/myfile1 | 1 - .../patchBuilding2/expected/repo/myfile2 | 3 - .../patchBuilding2/expected/repo/myfile3 | 1 - .../integration/patchBuilding2/recording.json | 1 - test/integration/patchBuilding2/setup.sh | 26 -- test/integration/patchBuilding2/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 163 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 2 - .../repo/.git_keep/logs/refs/heads/master | 2 - .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../41/05b6da4ccc191a4abd24b1ffac6a2031534c0b | Bin 45 -> 0 bytes .../44/eb4bd0e7419049a8e4176945786c20dae60d7c | Bin 126 -> 0 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 15 -> 0 bytes .../4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f | Bin 21 -> 0 bytes .../68/bbd52379d849022495dcfd11b13f2fb3103d37 | Bin 46 -> 0 bytes .../70/28eaec19b2723b62690974057c92ba7d8c1b11 | Bin 121 -> 0 bytes .../83/90c32b5e687b97e242da46498b574ace0e1eb5 | Bin 21 -> 0 bytes .../98/1651deb012f8e684dd306c1f5bf8edd5c3db67 | Bin 106 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../cf/149a94a18c990b2c5cdd0cf15ec4880f51c8b0 | 4 - .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/one/two/three/file3 | 1 - .../patchBuildingToggleAll/recording.json | 1 - .../patchBuildingToggleAll/setup.sh | 23 -- .../patchBuildingToggleAll/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 407 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 - .../expected/repo/.git_keep/logs/HEAD | 3 - .../repo/.git_keep/logs/refs/heads/master | 3 - .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../41/05b6da4ccc191a4abd24b1ffac6a2031534c0b | Bin 45 -> 0 bytes .../43/9a6f2a3c627cd37ba1c5eda6a49c26a85ad610 | Bin 75 -> 0 bytes .../44/eb4bd0e7419049a8e4176945786c20dae60d7c | Bin 126 -> 0 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 15 -> 0 bytes .../4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f | Bin 21 -> 0 bytes .../54/57a1e78421c0c1bf9eb3bcc89f6c0996b9f89e | Bin 80 -> 0 bytes .../5a/abb4aaf3d6cc113fec7f7a3c0a880988085c23 | Bin 46 -> 0 bytes .../68/bbd52379d849022495dcfd11b13f2fb3103d37 | Bin 46 -> 0 bytes .../83/90c32b5e687b97e242da46498b574ace0e1eb5 | Bin 21 -> 0 bytes .../88/981dbb0664057b766113679127284f69f4fb69 | Bin 146 -> 0 bytes .../98/1651deb012f8e684dd306c1f5bf8edd5c3db67 | Bin 106 -> 0 bytes .../9f/aac09750995930a5d55eccf91ad6f802e8c66b | Bin 45 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../b5/e8fb99b011265d28065d0d545ff6b0245b1fa1 | 4 - .../c1/7dc7400fbb649385064c27544ba1e6c4751566 | Bin 121 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/one/two/file2 | 1 - .../expected/repo/one/two/three/file3 | 1 - .../patchBuildingWithFiletree/recording.json | 1 - .../patchBuildingWithFiletree/setup.sh | 23 -- .../patchBuildingWithFiletree/test.json | 1 - 161 files changed, 1204 insertions(+), 489 deletions(-) create mode 100644 pkg/integration/tests/patch_building/apply.go create mode 100644 pkg/integration/tests/patch_building/apply_in_reverse.go create mode 100644 pkg/integration/tests/patch_building/move_to_index.go create mode 100644 pkg/integration/tests/patch_building/move_to_index_partial.go create mode 100644 pkg/integration/tests/patch_building/move_to_index_with_conflict.go create mode 100644 pkg/integration/tests/patch_building/move_to_new_commit.go create mode 100644 pkg/integration/tests/patch_building/remove_from_commit.go create mode 100644 pkg/integration/tests/patch_building/reset_with_escape.go create mode 100644 pkg/integration/tests/patch_building/select_all_files.go create mode 100644 pkg/integration/tests/patch_building/specific_selection.go create mode 100644 pkg/integration/tests/patch_building/start_new_patch.go delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/config delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/description delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/index delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/01/5689313279311c9356ea3fd3628f73ca4ea797 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/01/ed22faef05591076721466e07fb10962642887 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/24/4cec6fa9704d5dc61fc5e60faba4125dfe3baa delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/24/79abfe7bd6b64a753d3c3797f614bbb422f627 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/52/863675692b53d9e34dd72da8c35a72bf0a5b51 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/7a/40dadc0814bf7f1418d005eae184848a9f1c94 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/92/2fc2ed1965fe8436ce7837c634379f14faf3c3 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/92/571130f37c70766612048271f1d4dca63ef0b5 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/93/96d8d0c471661257f6c16c1957452912c0c6f5 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/ad/e030587c8ae5d240ad7669bff9030b24bd6385 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/c6/9e35e8cae5688bbfcf8278c20ab43c1b8dbae3 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/ce/024fc694fd464cfb5b43cb7702f0bd7345d882 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a delete mode 100644 test/integration/patchBuilding/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/patchBuilding/expected/repo/myfile1 delete mode 100644 test/integration/patchBuilding/expected/repo/myfile2 delete mode 100644 test/integration/patchBuilding/expected/repo/myfile3 delete mode 100644 test/integration/patchBuilding/recording.json delete mode 100644 test/integration/patchBuilding/setup.sh delete mode 100644 test/integration/patchBuilding/test.json delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/config delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/description delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/index delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/stash delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/1a/b6a62ed874b19c1191ba2b0106741ca4ca4b50 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/2c/60d208ba3ec966b77ca756237843af7584cf93 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/50/63202049f1980e035c390732a7e6da8783357f delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/52/863675692b53d9e34dd72da8c35a72bf0a5b51 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/9a/939087472cfaf305396d4b177ee888ced193d9 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/ad/27dd25048bff07da92d2d9d829e4dd75472da4 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/ad/e030587c8ae5d240ad7669bff9030b24bd6385 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/ce/024fc694fd464cfb5b43cb7702f0bd7345d882 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/d0/ec73019f9c5e426c9b37fa58757855367580a5 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/d3/4fc4a9c0c675a5cb11d848e5afef4c89160dc0 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/e4/74bc2d1712ed5fdf14fb7223392f1b0dcc8d37 delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/patchBuilding2/expected/repo/.git_keep/refs/stash delete mode 100644 test/integration/patchBuilding2/expected/repo/myfile1 delete mode 100644 test/integration/patchBuilding2/expected/repo/myfile2 delete mode 100644 test/integration/patchBuilding2/expected/repo/myfile3 delete mode 100644 test/integration/patchBuilding2/recording.json delete mode 100644 test/integration/patchBuilding2/setup.sh delete mode 100644 test/integration/patchBuilding2/test.json delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/config delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/description delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/index delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/44/eb4bd0e7419049a8e4176945786c20dae60d7c delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/68/bbd52379d849022495dcfd11b13f2fb3103d37 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/70/28eaec19b2723b62690974057c92ba7d8c1b11 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/98/1651deb012f8e684dd306c1f5bf8edd5c3db67 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/cf/149a94a18c990b2c5cdd0cf15ec4880f51c8b0 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/patchBuildingToggleAll/expected/repo/one/two/three/file3 delete mode 100644 test/integration/patchBuildingToggleAll/recording.json delete mode 100644 test/integration/patchBuildingToggleAll/setup.sh delete mode 100644 test/integration/patchBuildingToggleAll/test.json delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/config delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/description delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/index delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/43/9a6f2a3c627cd37ba1c5eda6a49c26a85ad610 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/44/eb4bd0e7419049a8e4176945786c20dae60d7c delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/54/57a1e78421c0c1bf9eb3bcc89f6c0996b9f89e delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/5a/abb4aaf3d6cc113fec7f7a3c0a880988085c23 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/68/bbd52379d849022495dcfd11b13f2fb3103d37 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/88/981dbb0664057b766113679127284f69f4fb69 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/98/1651deb012f8e684dd306c1f5bf8edd5c3db67 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/9f/aac09750995930a5d55eccf91ad6f802e8c66b delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/b5/e8fb99b011265d28065d0d545ff6b0245b1fa1 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/c1/7dc7400fbb649385064c27544ba1e6c4751566 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/one/two/file2 delete mode 100644 test/integration/patchBuildingWithFiletree/expected/repo/one/two/three/file3 delete mode 100644 test/integration/patchBuildingWithFiletree/recording.json delete mode 100644 test/integration/patchBuildingWithFiletree/setup.sh delete mode 100644 test/integration/patchBuildingWithFiletree/test.json diff --git a/pkg/gui/mergeconflicts/state.go b/pkg/gui/mergeconflicts/state.go index 384fb735f..a3dbcff3a 100644 --- a/pkg/gui/mergeconflicts/state.go +++ b/pkg/gui/mergeconflicts/state.go @@ -1,6 +1,8 @@ package mergeconflicts import ( + "strings" + "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -188,9 +190,30 @@ func (s *State) ContentAfterConflictResolve(selection Selection) (bool, string, func (s *State) GetSelectedLine() int { conflict := s.currentConflict() if conflict == nil { + // TODO: see why this is 1 and not 0 return 1 } selection := s.Selection() startIndex, _ := selection.bounds(conflict) return startIndex + 1 } + +func (s *State) GetSelectedRange() (int, int) { + conflict := s.currentConflict() + if conflict == nil { + return 0, 0 + } + selection := s.Selection() + startIndex, endIndex := selection.bounds(conflict) + return startIndex, endIndex +} + +func (s *State) PlainRenderSelected() string { + startIndex, endIndex := s.GetSelectedRange() + + content := s.GetContent() + + contentLines := utils.SplitLines(content) + + return strings.Join(contentLines[startIndex:endIndex+1], "\n") +} diff --git a/pkg/integration/components/actions.go b/pkg/integration/components/actions.go index 50564233a..5e37fc966 100644 --- a/pkg/integration/components/actions.go +++ b/pkg/integration/components/actions.go @@ -38,3 +38,9 @@ func (self *Actions) ConfirmDiscardLines() { Content(Contains("Are you sure you want to delete the selected lines")). Confirm() } + +func (self *Actions) SelectPatchOption(matcher *Matcher) { + self.t.GlobalPress(self.t.keys.Universal.CreatePatchOptionsMenu) + + self.t.ExpectPopup().Menu().Title(Equals("Patch Options")).Select(matcher).Confirm() +} diff --git a/pkg/integration/components/alert_driver.go b/pkg/integration/components/alert_driver.go index 78247760a..7e1623041 100644 --- a/pkg/integration/components/alert_driver.go +++ b/pkg/integration/components/alert_driver.go @@ -11,7 +11,7 @@ func (self *AlertDriver) getViewDriver() *ViewDriver { } // asserts that the alert view has the expected title -func (self *AlertDriver) Title(expected *matcher) *AlertDriver { +func (self *AlertDriver) Title(expected *Matcher) *AlertDriver { self.getViewDriver().Title(expected) self.hasCheckedTitle = true @@ -20,7 +20,7 @@ func (self *AlertDriver) Title(expected *matcher) *AlertDriver { } // asserts that the alert view has the expected content -func (self *AlertDriver) Content(expected *matcher) *AlertDriver { +func (self *AlertDriver) Content(expected *Matcher) *AlertDriver { self.getViewDriver().Content(expected) self.hasCheckedContent = true diff --git a/pkg/integration/components/assertion_helper.go b/pkg/integration/components/assertion_helper.go index 70f2ff182..23539a8d3 100644 --- a/pkg/integration/components/assertion_helper.go +++ b/pkg/integration/components/assertion_helper.go @@ -13,7 +13,7 @@ type assertionHelper struct { // milliseconds we'll wait when an assertion fails. var retryWaitTimes = []int{0, 1, 1, 1, 1, 1, 5, 10, 20, 40, 100, 200, 500, 1000, 2000, 4000} -func (self *assertionHelper) matchString(matcher *matcher, context string, getValue func() string) { +func (self *assertionHelper) matchString(matcher *Matcher, context string, getValue func() string) { self.assertWithRetries(func() (bool, string) { value := getValue() return matcher.context(context).test(value) diff --git a/pkg/integration/components/commit_message_panel_driver.go b/pkg/integration/components/commit_message_panel_driver.go index b44a6c1dc..e420334bf 100644 --- a/pkg/integration/components/commit_message_panel_driver.go +++ b/pkg/integration/components/commit_message_panel_driver.go @@ -9,7 +9,7 @@ func (self *CommitMessagePanelDriver) getViewDriver() *ViewDriver { } // asserts on the text initially present in the prompt -func (self *CommitMessagePanelDriver) InitialText(expected *matcher) *CommitMessagePanelDriver { +func (self *CommitMessagePanelDriver) InitialText(expected *Matcher) *CommitMessagePanelDriver { self.getViewDriver().Content(expected) return self diff --git a/pkg/integration/components/confirmation_driver.go b/pkg/integration/components/confirmation_driver.go index 5f9500c56..687523833 100644 --- a/pkg/integration/components/confirmation_driver.go +++ b/pkg/integration/components/confirmation_driver.go @@ -11,7 +11,7 @@ func (self *ConfirmationDriver) getViewDriver() *ViewDriver { } // asserts that the confirmation view has the expected title -func (self *ConfirmationDriver) Title(expected *matcher) *ConfirmationDriver { +func (self *ConfirmationDriver) Title(expected *Matcher) *ConfirmationDriver { self.getViewDriver().Title(expected) self.hasCheckedTitle = true @@ -20,7 +20,7 @@ func (self *ConfirmationDriver) Title(expected *matcher) *ConfirmationDriver { } // asserts that the confirmation view has the expected content -func (self *ConfirmationDriver) Content(expected *matcher) *ConfirmationDriver { +func (self *ConfirmationDriver) Content(expected *Matcher) *ConfirmationDriver { self.getViewDriver().Content(expected) self.hasCheckedContent = true diff --git a/pkg/integration/components/file_system.go b/pkg/integration/components/file_system.go index 4ac064838..cdc7413fb 100644 --- a/pkg/integration/components/file_system.go +++ b/pkg/integration/components/file_system.go @@ -26,7 +26,7 @@ func (self *FileSystem) PathNotPresent(path string) { } // Asserts that the file at the given path has the given content -func (self *FileSystem) FileContent(path string, matcher *matcher) { +func (self *FileSystem) FileContent(path string, matcher *Matcher) { self.assertWithRetries(func() (bool, string) { _, err := os.Stat(path) if os.IsNotExist(err) { diff --git a/pkg/integration/components/matcher.go b/pkg/integration/components/matcher.go index ebec084a8..a87234654 100644 --- a/pkg/integration/components/matcher.go +++ b/pkg/integration/components/matcher.go @@ -9,7 +9,7 @@ import ( ) // for making assertions on string values -type matcher struct { +type Matcher struct { rules []matcherRule // this is printed when there's an error so that it's clear what the context of the assertion is @@ -24,12 +24,12 @@ type matcherRule struct { testFn func(string) (bool, string) } -func NewMatcher(name string, testFn func(string) (bool, string)) *matcher { +func NewMatcher(name string, testFn func(string) (bool, string)) *Matcher { rules := []matcherRule{{name: name, testFn: testFn}} - return &matcher{rules: rules} + return &Matcher{rules: rules} } -func (self *matcher) name() string { +func (self *Matcher) name() string { if len(self.rules) == 0 { return "anything" } @@ -40,7 +40,7 @@ func (self *matcher) name() string { ) } -func (self *matcher) test(value string) (bool, string) { +func (self *Matcher) test(value string) (bool, string) { for _, rule := range self.rules { ok, message := rule.testFn(value) if ok { @@ -57,7 +57,7 @@ func (self *matcher) test(value string) (bool, string) { return true, "" } -func (self *matcher) Contains(target string) *matcher { +func (self *Matcher) Contains(target string) *Matcher { return self.appendRule(matcherRule{ name: fmt.Sprintf("contains '%s'", target), testFn: func(value string) (bool, string) { @@ -71,7 +71,7 @@ func (self *matcher) Contains(target string) *matcher { }) } -func (self *matcher) DoesNotContain(target string) *matcher { +func (self *Matcher) DoesNotContain(target string) *Matcher { return self.appendRule(matcherRule{ name: fmt.Sprintf("does not contain '%s'", target), testFn: func(value string) (bool, string) { @@ -80,7 +80,7 @@ func (self *matcher) DoesNotContain(target string) *matcher { }) } -func (self *matcher) MatchesRegexp(target string) *matcher { +func (self *Matcher) MatchesRegexp(target string) *Matcher { return self.appendRule(matcherRule{ name: fmt.Sprintf("matches regular expression '%s'", target), testFn: func(value string) (bool, string) { @@ -93,7 +93,7 @@ func (self *matcher) MatchesRegexp(target string) *matcher { }) } -func (self *matcher) Equals(target string) *matcher { +func (self *Matcher) Equals(target string) *Matcher { return self.appendRule(matcherRule{ name: fmt.Sprintf("equals '%s'", target), testFn: func(value string) (bool, string) { @@ -106,7 +106,7 @@ const IS_SELECTED_RULE_NAME = "is selected" // special rule that is only to be used in the TopLines and Lines methods, as a way of // asserting that a given line is selected. -func (self *matcher) IsSelected() *matcher { +func (self *Matcher) IsSelected() *Matcher { return self.appendRule(matcherRule{ name: IS_SELECTED_RULE_NAME, testFn: func(value string) (bool, string) { @@ -115,7 +115,7 @@ func (self *matcher) IsSelected() *matcher { }) } -func (self *matcher) appendRule(rule matcherRule) *matcher { +func (self *Matcher) appendRule(rule matcherRule) *Matcher { self.rules = append(self.rules, rule) return self @@ -123,39 +123,43 @@ func (self *matcher) appendRule(rule matcherRule) *matcher { // adds context so that if the matcher test(s) fails, we understand what we were trying to test. // E.g. prefix: "Unexpected content in view 'files'." -func (self *matcher) context(prefix string) *matcher { +func (self *Matcher) context(prefix string) *Matcher { self.prefix = prefix return self } // if the matcher has an `IsSelected` rule, it returns true, along with the matcher after that rule has been removed -func (self *matcher) checkIsSelected() (bool, *matcher) { - check := lo.ContainsBy(self.rules, func(rule matcherRule) bool { return rule.name == IS_SELECTED_RULE_NAME }) +func (self *Matcher) checkIsSelected() (bool, *Matcher) { + // copying into a new matcher in case we want to re-use the original later + newMatcher := &Matcher{} + *newMatcher = *self - self.rules = lo.Filter(self.rules, func(rule matcherRule, _ int) bool { return rule.name != IS_SELECTED_RULE_NAME }) + check := lo.ContainsBy(newMatcher.rules, func(rule matcherRule) bool { return rule.name == IS_SELECTED_RULE_NAME }) - return check, self + newMatcher.rules = lo.Filter(newMatcher.rules, func(rule matcherRule, _ int) bool { return rule.name != IS_SELECTED_RULE_NAME }) + + return check, newMatcher } // this matcher has no rules meaning it always passes the test. Use this // when you don't care what value you're dealing with. -func Anything() *matcher { - return &matcher{} +func Anything() *Matcher { + return &Matcher{} } -func Contains(target string) *matcher { +func Contains(target string) *Matcher { return Anything().Contains(target) } -func DoesNotContain(target string) *matcher { +func DoesNotContain(target string) *Matcher { return Anything().DoesNotContain(target) } -func MatchesRegexp(target string) *matcher { +func MatchesRegexp(target string) *Matcher { return Anything().MatchesRegexp(target) } -func Equals(target string) *matcher { +func Equals(target string) *Matcher { return Anything().Equals(target) } diff --git a/pkg/integration/components/menu_driver.go b/pkg/integration/components/menu_driver.go index b8155aaf7..326435f52 100644 --- a/pkg/integration/components/menu_driver.go +++ b/pkg/integration/components/menu_driver.go @@ -10,7 +10,7 @@ func (self *MenuDriver) getViewDriver() *ViewDriver { } // asserts that the popup has the expected title -func (self *MenuDriver) Title(expected *matcher) *MenuDriver { +func (self *MenuDriver) Title(expected *Matcher) *MenuDriver { self.getViewDriver().Title(expected) self.hasCheckedTitle = true @@ -30,19 +30,19 @@ func (self *MenuDriver) Cancel() { self.getViewDriver().PressEscape() } -func (self *MenuDriver) Select(option *matcher) *MenuDriver { +func (self *MenuDriver) Select(option *Matcher) *MenuDriver { self.getViewDriver().NavigateToListItem(option) return self } -func (self *MenuDriver) Lines(matchers ...*matcher) *MenuDriver { +func (self *MenuDriver) Lines(matchers ...*Matcher) *MenuDriver { self.getViewDriver().Lines(matchers...) return self } -func (self *MenuDriver) TopLines(matchers ...*matcher) *MenuDriver { +func (self *MenuDriver) TopLines(matchers ...*Matcher) *MenuDriver { self.getViewDriver().TopLines(matchers...) return self diff --git a/pkg/integration/components/prompt_driver.go b/pkg/integration/components/prompt_driver.go index 59e3587ef..58051bc70 100644 --- a/pkg/integration/components/prompt_driver.go +++ b/pkg/integration/components/prompt_driver.go @@ -10,7 +10,7 @@ func (self *PromptDriver) getViewDriver() *ViewDriver { } // asserts that the popup has the expected title -func (self *PromptDriver) Title(expected *matcher) *PromptDriver { +func (self *PromptDriver) Title(expected *Matcher) *PromptDriver { self.getViewDriver().Title(expected) self.hasCheckedTitle = true @@ -19,7 +19,7 @@ func (self *PromptDriver) Title(expected *matcher) *PromptDriver { } // asserts on the text initially present in the prompt -func (self *PromptDriver) InitialText(expected *matcher) *PromptDriver { +func (self *PromptDriver) InitialText(expected *Matcher) *PromptDriver { self.getViewDriver().Content(expected) return self @@ -55,13 +55,13 @@ func (self *PromptDriver) checkNecessaryChecksCompleted() { } } -func (self *PromptDriver) SuggestionLines(matchers ...*matcher) *PromptDriver { +func (self *PromptDriver) SuggestionLines(matchers ...*Matcher) *PromptDriver { self.t.Views().Suggestions().Lines(matchers...) return self } -func (self *PromptDriver) SuggestionTopLines(matchers ...*matcher) *PromptDriver { +func (self *PromptDriver) SuggestionTopLines(matchers ...*Matcher) *PromptDriver { self.t.Views().Suggestions().TopLines(matchers...) return self @@ -75,7 +75,7 @@ func (self *PromptDriver) ConfirmFirstSuggestion() { PressEnter() } -func (self *PromptDriver) ConfirmSuggestion(matcher *matcher) { +func (self *PromptDriver) ConfirmSuggestion(matcher *Matcher) { self.t.press(self.t.keys.Universal.TogglePanel) self.t.Views().Suggestions(). IsFocused(). diff --git a/pkg/integration/components/search_driver.go b/pkg/integration/components/search_driver.go index 4ab4a4103..66a2fae41 100644 --- a/pkg/integration/components/search_driver.go +++ b/pkg/integration/components/search_driver.go @@ -12,7 +12,7 @@ func (self *SearchDriver) getViewDriver() *ViewDriver { } // asserts on the text initially present in the prompt -func (self *SearchDriver) InitialText(expected *matcher) *SearchDriver { +func (self *SearchDriver) InitialText(expected *Matcher) *SearchDriver { self.getViewDriver().Content(expected) return self diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index 8d47083ad..2f2d4b719 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -136,6 +136,10 @@ func (self *Shell) EmptyCommit(message string) *Shell { return self.RunCommand(fmt.Sprintf("git commit --allow-empty -m \"%s\"", message)) } +func (self *Shell) Revert(ref string) *Shell { + return self.RunCommand(fmt.Sprintf("git revert %s", ref)) +} + func (self *Shell) CreateLightweightTag(name string, ref string) *Shell { return self.RunCommand(fmt.Sprintf("git tag %s %s", name, ref)) } diff --git a/pkg/integration/components/test_driver.go b/pkg/integration/components/test_driver.go index 694a59dbf..d645b7f0a 100644 --- a/pkg/integration/components/test_driver.go +++ b/pkg/integration/components/test_driver.go @@ -2,7 +2,6 @@ package components import ( "fmt" - "strings" "time" "github.com/atotto/clipboard" @@ -71,65 +70,6 @@ func (self *TestDriver) Shell() *Shell { return self.shell } -// this will look for a list item in the current panel and if it finds it, it will -// enter the keypresses required to navigate to it. -// The test will fail if: -// - the user is not in a list item -// - no list item is found containing the given text -// - multiple list items are found containing the given text in the initial page of items -// -// NOTE: this currently assumes that ViewBufferLines returns all the lines that can be accessed. -// If this changes in future, we'll need to update this code to first attempt to find the item -// in the current page and failing that, jump to the top of the view and iterate through all of it, -// looking for the item. -func (self *TestDriver) navigateToListItem(matcher *matcher) { - currentContext := self.gui.CurrentContext() - - view := currentContext.GetView() - - var matchIndex int - - self.assertWithRetries(func() (bool, string) { - matchIndex = -1 - var matches []string - lines := view.ViewBufferLines() - // first we look for a duplicate on the current screen. We won't bother looking beyond that though. - for i, line := range lines { - ok, _ := matcher.test(line) - if ok { - matches = append(matches, line) - matchIndex = i - } - } - if len(matches) > 1 { - return false, fmt.Sprintf("Found %d matches for `%s`, expected only a single match. Matching lines:\n%s", len(matches), matcher.name(), strings.Join(matches, "\n")) - } else if len(matches) == 0 { - return false, fmt.Sprintf("Could not find item matching: %s. Lines:\n%s", matcher.name(), strings.Join(lines, "\n")) - } else { - return true, "" - } - }) - - selectedLineIdx := view.SelectedLineIdx() - if selectedLineIdx == matchIndex { - self.Views().current().SelectedLine(matcher) - return - } - if selectedLineIdx < matchIndex { - for i := selectedLineIdx; i < matchIndex; i++ { - self.Views().current().SelectNextItem() - } - self.Views().current().SelectedLine(matcher) - return - } else { - for i := selectedLineIdx; i > matchIndex; i-- { - self.Views().current().SelectPreviousItem() - } - self.Views().current().SelectedLine(matcher) - return - } -} - // for making assertions on lazygit views func (self *TestDriver) Views() *Views { return &Views{t: self} @@ -140,11 +80,11 @@ func (self *TestDriver) ExpectPopup() *Popup { return &Popup{t: self} } -func (self *TestDriver) ExpectToast(matcher *matcher) { +func (self *TestDriver) ExpectToast(matcher *Matcher) { self.Views().AppStatus().Content(matcher) } -func (self *TestDriver) ExpectClipboard(matcher *matcher) { +func (self *TestDriver) ExpectClipboard(matcher *Matcher) { self.assertWithRetries(func() (bool, string) { text, err := clipboard.ReadAll() if err != nil { diff --git a/pkg/integration/components/viewDriver.go b/pkg/integration/components/viewDriver.go index 3f0b9726b..5060a4d1d 100644 --- a/pkg/integration/components/viewDriver.go +++ b/pkg/integration/components/viewDriver.go @@ -10,45 +10,12 @@ import ( type ViewDriver struct { // context is prepended to any error messages e.g. 'context: "current view"' - context string - getView func() *gocui.View - t *TestDriver - getSelectedLinesFn func() ([]string, error) -} - -// asserts that the view has the expected title -func (self *ViewDriver) Title(expected *matcher) *ViewDriver { - self.t.assertWithRetries(func() (bool, string) { - actual := self.getView().Title - return expected.context(fmt.Sprintf("%s title", self.context)).test(actual) - }) - - return self -} - -// asserts that the view has lines matching the given matchers. So if three matchers -// are passed, we only check the first three lines of the view. -// This method is convenient when you have a list of commits but you only want to -// assert on the first couple of commits. -func (self *ViewDriver) TopLines(matchers ...*matcher) *ViewDriver { - if len(matchers) < 1 { - self.t.fail("TopLines method requires at least one matcher. If you are trying to assert that there are no lines, use .IsEmpty()") - } - - self.t.assertWithRetries(func() (bool, string) { - lines := self.getView().BufferLines() - return len(lines) >= len(matchers), fmt.Sprintf("unexpected number of lines in view. Expected at least %d, got %d", len(matchers), len(lines)) - }) - - return self.assertLines(matchers...) -} - -// asserts that the view has lines matching the given matchers. One matcher must be passed for each line. -// If you only care about the top n lines, use the TopLines method instead. -func (self *ViewDriver) Lines(matchers ...*matcher) *ViewDriver { - self.LineCount(len(matchers)) - - return self.assertLines(matchers...) + context string + getView func() *gocui.View + t *TestDriver + getSelectedLinesFn func() ([]string, error) + getSelectedRangeFn func() (int, int, error) + getSelectedLineIdxFn func() (int, error) } func (self *ViewDriver) getSelectedLines() ([]string, error) { @@ -61,7 +28,114 @@ func (self *ViewDriver) getSelectedLines() ([]string, error) { return self.getSelectedLinesFn() } -func (self *ViewDriver) SelectedLines(matchers ...*matcher) *ViewDriver { +func (self *ViewDriver) getSelectedRange() (int, int, error) { + if self.getSelectedRangeFn == nil { + view := self.t.gui.View(self.getView().Name()) + idx := view.SelectedLineIdx() + + return idx, idx, nil + } + + return self.getSelectedRangeFn() +} + +// even if you have a selected range, there may still be a line within that range +// which the cursor points at. This function returns that line index. +func (self *ViewDriver) getSelectedLineIdx() (int, error) { + if self.getSelectedLineIdxFn == nil { + view := self.t.gui.View(self.getView().Name()) + + return view.SelectedLineIdx(), nil + } + + return self.getSelectedLineIdxFn() +} + +// asserts that the view has the expected title +func (self *ViewDriver) Title(expected *Matcher) *ViewDriver { + self.t.assertWithRetries(func() (bool, string) { + actual := self.getView().Title + return expected.context(fmt.Sprintf("%s title", self.context)).test(actual) + }) + + return self +} + +// asserts that the view has lines matching the given matchers. One matcher must be passed for each line. +// If you only care about the top n lines, use the TopLines method instead. +func (self *ViewDriver) Lines(matchers ...*Matcher) *ViewDriver { + self.validateMatchersPassed(matchers) + self.LineCount(len(matchers)) + + return self.assertLines(0, matchers...) +} + +// asserts that the view has lines matching the given matchers. So if three matchers +// are passed, we only check the first three lines of the view. +// This method is convenient when you have a list of commits but you only want to +// assert on the first couple of commits. +func (self *ViewDriver) TopLines(matchers ...*Matcher) *ViewDriver { + self.validateMatchersPassed(matchers) + self.validateEnoughLines(matchers) + + return self.assertLines(0, matchers...) +} + +func (self *ViewDriver) ContainsLines(matchers ...*Matcher) *ViewDriver { + self.validateMatchersPassed(matchers) + self.validateEnoughLines(matchers) + + self.t.assertWithRetries(func() (bool, string) { + content := self.getView().Buffer() + lines := strings.Split(content, "\n") + + startIdx, endIdx, err := self.getSelectedRange() + + for i := 0; i < len(lines)-len(matchers)+1; i++ { + matches := true + for j, matcher := range matchers { + checkIsSelected, matcher := matcher.checkIsSelected() // strip the IsSelected matcher out + lineIdx := i + j + ok, _ := matcher.test(lines[lineIdx]) + if !ok { + matches = false + break + } + if checkIsSelected { + if err != nil { + matches = false + break + } + if lineIdx < startIdx || lineIdx > endIdx { + matches = false + break + } + } + } + if matches { + return true, "" + } + } + + expectedContent := expectedContentFromMatchers(matchers) + + return false, fmt.Sprintf( + "Expected the following to be contained in the staging panel:\n-----\n%s\n-----\nBut got:\n-----\n%s\n-----\nSelected range: %d-%d", + expectedContent, + content, + startIdx, + endIdx, + ) + }) + + return self +} + +// asserts on the lines that are selected in the view. +func (self *ViewDriver) SelectedLines(matchers ...*Matcher) *ViewDriver { + self.validateMatchersPassed(matchers) + self.validateEnoughLines(matchers) + self.t.assertWithRetries(func() (bool, string) { selectedLines, err := self.getSelectedLines() if err != nil { @@ -76,7 +150,12 @@ func (self *ViewDriver) SelectedLines(matchers ...*matcher) *ViewDriver { } for i, line := range selectedLines { - ok, message := matchers[i].test(line) + checkIsSelected, matcher := matchers[i].checkIsSelected() + if checkIsSelected { + self.t.fail("You cannot use the IsSelected matcher with the SelectedLines method") + } + + ok, message := matcher.test(line) if !ok { return false, fmt.Sprintf("Error: %s. Expected the following to be selected:\n-----\n%s\n-----\nBut got:\n-----\n%s\n-----", message, expectedContent, selectedContent) } @@ -88,53 +167,51 @@ func (self *ViewDriver) SelectedLines(matchers ...*matcher) *ViewDriver { return self } -func (self *ViewDriver) ContainsLines(matchers ...*matcher) *ViewDriver { - self.t.assertWithRetries(func() (bool, string) { - content := self.getView().Buffer() - lines := strings.Split(content, "\n") - - for i := 0; i < len(lines)-len(matchers)+1; i++ { - matches := true - for j, matcher := range matchers { - ok, _ := matcher.test(lines[i+j]) - if !ok { - matches = false - break - } - } - if matches { - return true, "" - } - } - - expectedContent := expectedContentFromMatchers(matchers) - - return false, fmt.Sprintf( - "Expected the following to be contained in the staging panel:\n-----\n%s\n-----\nBut got:\n-----\n%s\n-----", - expectedContent, - content, - ) - }) - - return self +func (self *ViewDriver) validateMatchersPassed(matchers []*Matcher) { + if len(matchers) < 1 { + self.t.fail("'Lines' methods require at least one matcher to be passed as an argument. If you are trying to assert that there are no lines, use .IsEmpty()") + } } -func (self *ViewDriver) assertLines(matchers ...*matcher) *ViewDriver { +func (self *ViewDriver) validateEnoughLines(matchers []*Matcher) { + self.t.assertWithRetries(func() (bool, string) { + lines := self.getView().BufferLines() + return len(lines) >= len(matchers), fmt.Sprintf("unexpected number of lines in view. Expected at least %d, got %d", len(matchers), len(lines)) + }) +} + +func (self *ViewDriver) assertLines(offset int, matchers ...*Matcher) *ViewDriver { view := self.getView() - for i, matcher := range matchers { + for matcherIndex, matcher := range matchers { + lineIdx := matcherIndex + offset checkIsSelected, matcher := matcher.checkIsSelected() self.t.matchString(matcher, fmt.Sprintf("Unexpected content in view '%s'.", view.Name()), func() string { - return view.BufferLines()[i] + return view.BufferLines()[lineIdx] }, ) if checkIsSelected { self.t.assertWithRetries(func() (bool, string) { - lineIdx := view.SelectedLineIdx() - return lineIdx == i, fmt.Sprintf("Unexpected selected line index in view '%s'. Expected %d, got %d", view.Name(), i, lineIdx) + startIdx, endIdx, err := self.getSelectedRange() + if err != nil { + return false, err.Error() + } + + if lineIdx < startIdx || lineIdx > endIdx { + if startIdx == endIdx { + return false, fmt.Sprintf("Unexpected selected line index in view '%s'. Expected %d, got %d", view.Name(), lineIdx, startIdx) + } else { + lines, err := self.getSelectedLines() + if err != nil { + return false, err.Error() + } + return false, fmt.Sprintf("Unexpected selected line index in view '%s'. Expected line %d to be in range %d to %d. Selected lines:\n---\n%s\n---\n\nExpected line: '%s'", view.Name(), lineIdx, startIdx, endIdx, strings.Join(lines, "\n"), matcher.name()) + } + } + return true, "" }) } } @@ -143,7 +220,7 @@ func (self *ViewDriver) assertLines(matchers ...*matcher) *ViewDriver { } // asserts on the content of the view i.e. the stuff within the view's frame. -func (self *ViewDriver) Content(matcher *matcher) *ViewDriver { +func (self *ViewDriver) Content(matcher *Matcher) *ViewDriver { self.t.matchString(matcher, fmt.Sprintf("%s: Unexpected content.", self.context), func() string { return self.getView().Buffer() @@ -153,40 +230,27 @@ func (self *ViewDriver) Content(matcher *matcher) *ViewDriver { return self } -// asserts on the selected line of the view -func (self *ViewDriver) SelectedLine(matcher *matcher) *ViewDriver { +// asserts on the selected line of the view. If your view has multiple lines selected, +// but also has a concept of a cursor position, this will assert on the line that +// the cursor is on. Otherwise it will assert on the first line of the selection. +func (self *ViewDriver) SelectedLine(matcher *Matcher) *ViewDriver { self.t.assertWithRetries(func() (bool, string) { - selectedLines, err := self.getSelectedLines() + selectedLineIdx, err := self.getSelectedLineIdx() if err != nil { return false, err.Error() } - if len(selectedLines) == 0 { - return false, "No line selected. Expected exactly one line to be selected" - } else if len(selectedLines) > 1 { - return false, fmt.Sprintf( - "Multiple lines selected. Expected only a single line to be selected. Selected lines:\n---\n%s\n---\n\nExpected line: %s", - strings.Join(selectedLines, "\n"), - matcher.name(), - ) + viewLines := self.getView().BufferLines() + + if selectedLineIdx >= len(viewLines) { + return false, fmt.Sprintf("%s: Expected view to have at least %d lines, but it only has %d", self.context, selectedLineIdx+1, len(viewLines)) } - value := selectedLines[0] + value := viewLines[selectedLineIdx] + return matcher.context(fmt.Sprintf("%s: Unexpected selected line.", self.context)).test(value) }) - self.t.matchString(matcher, fmt.Sprintf("%s: Unexpected selected line.", self.context), - func() string { - selectedLines, err := self.getSelectedLines() - if err != nil { - self.t.gui.Fail(err.Error()) - return "" - } - - return selectedLines[0] - }, - ) - return self } @@ -298,10 +362,63 @@ func (self *ViewDriver) PressEscape() *ViewDriver { return self.Press(self.t.keys.Universal.Return) } -func (self *ViewDriver) NavigateToListItem(matcher *matcher) *ViewDriver { +// this will look for a list item in the current panel and if it finds it, it will +// enter the keypresses required to navigate to it. +// The test will fail if: +// - the user is not in a list item +// - no list item is found containing the given text +// - multiple list items are found containing the given text in the initial page of items +// +// NOTE: this currently assumes that BufferLines returns all the lines that can be accessed. +// If this changes in future, we'll need to update this code to first attempt to find the item +// in the current page and failing that, jump to the top of the view and iterate through all of it, +// looking for the item. +func (self *ViewDriver) NavigateToListItem(matcher *Matcher) *ViewDriver { self.IsFocused() - self.t.navigateToListItem(matcher) + view := self.getView() + + var matchIndex int + + self.t.assertWithRetries(func() (bool, string) { + matchIndex = -1 + var matches []string + lines := view.BufferLines() + // first we look for a duplicate on the current screen. We won't bother looking beyond that though. + for i, line := range lines { + ok, _ := matcher.test(line) + if ok { + matches = append(matches, line) + matchIndex = i + } + } + if len(matches) > 1 { + return false, fmt.Sprintf("Found %d matches for `%s`, expected only a single match. Matching lines:\n%s", len(matches), matcher.name(), strings.Join(matches, "\n")) + } else if len(matches) == 0 { + return false, fmt.Sprintf("Could not find item matching: %s. Lines:\n%s", matcher.name(), strings.Join(lines, "\n")) + } else { + return true, "" + } + }) + + selectedLineIdx, err := self.getSelectedLineIdx() + if err != nil { + self.t.fail(err.Error()) + return self + } + if selectedLineIdx == matchIndex { + self.SelectedLine(matcher) + } else if selectedLineIdx < matchIndex { + for i := selectedLineIdx; i < matchIndex; i++ { + self.SelectNextItem() + } + self.SelectedLine(matcher) + } else { + for i := selectedLineIdx; i > matchIndex; i-- { + self.SelectPreviousItem() + } + self.SelectedLine(matcher) + } return self } @@ -349,8 +466,13 @@ func (self *ViewDriver) Tap(f func()) *ViewDriver { return self } -func expectedContentFromMatchers(matchers []*matcher) string { - return strings.Join(lo.Map(matchers, func(matcher *matcher, _ int) string { +// This purely exists as a convenience method for those who hate the trailing periods in multi-line method chains +func (self *ViewDriver) Self() *ViewDriver { + return self +} + +func expectedContentFromMatchers(matchers []*Matcher) string { + return strings.Join(lo.Map(matchers, func(matcher *Matcher, _ int) string { return matcher.name() }), "\n") } diff --git a/pkg/integration/components/views.go b/pkg/integration/components/views.go index 1061d6262..ceac6e8fc 100644 --- a/pkg/integration/components/views.go +++ b/pkg/integration/components/views.go @@ -40,34 +40,97 @@ func (self *Views) Secondary() *ViewDriver { } func (self *Views) regularView(viewName string) *ViewDriver { - return self.newStaticViewDriver(viewName, nil) + return self.newStaticViewDriver(viewName, nil, nil, nil) } func (self *Views) patchExplorerViewByName(viewName string) *ViewDriver { - return self.newStaticViewDriver(viewName, func() ([]string, error) { - ctx := self.t.gui.ContextForView(viewName).(*context.PatchExplorerContext) - state := ctx.GetState() - if state == nil { - return nil, errors.New("Expected patch explorer to be activated") - } - selectedContent := state.PlainRenderSelected() - // the above method returns a string with a trailing newline so we need to remove that before splitting - selectedLines := strings.Split(strings.TrimSuffix(selectedContent, "\n"), "\n") - return selectedLines, nil - }) + return self.newStaticViewDriver( + viewName, + func() ([]string, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.PatchExplorerContext) + state := ctx.GetState() + if state == nil { + return nil, errors.New("Expected patch explorer to be activated") + } + selectedContent := state.PlainRenderSelected() + // the above method returns a string with a trailing newline so we need to remove that before splitting + selectedLines := strings.Split(strings.TrimSuffix(selectedContent, "\n"), "\n") + return selectedLines, nil + }, + func() (int, int, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.PatchExplorerContext) + state := ctx.GetState() + if state == nil { + return 0, 0, errors.New("Expected patch explorer to be activated") + } + startIdx, endIdx := state.SelectedRange() + return startIdx, endIdx, nil + }, + func() (int, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.PatchExplorerContext) + state := ctx.GetState() + if state == nil { + return 0, errors.New("Expected patch explorer to be activated") + } + return state.GetSelectedLineIdx(), nil + }, + ) } // 'static' because it'll always refer to the same view, as opposed to the 'main' view which could actually be // one of several views, or the 'current' view which depends on focus. -func (self *Views) newStaticViewDriver(viewName string, getSelectedLinesFn func() ([]string, error)) *ViewDriver { +func (self *Views) newStaticViewDriver( + viewName string, + getSelectedLinesFn func() ([]string, error), + getSelectedLineRangeFn func() (int, int, error), + getSelectedLineIdxFn func() (int, error), +) *ViewDriver { return &ViewDriver{ - context: fmt.Sprintf("%s view", viewName), - getView: func() *gocui.View { return self.t.gui.View(viewName) }, - getSelectedLinesFn: getSelectedLinesFn, - t: self.t, + context: fmt.Sprintf("%s view", viewName), + getView: func() *gocui.View { return self.t.gui.View(viewName) }, + getSelectedLinesFn: getSelectedLinesFn, + getSelectedRangeFn: getSelectedLineRangeFn, + getSelectedLineIdxFn: getSelectedLineIdxFn, + t: self.t, } } +func (self *Views) MergeConflicts() *ViewDriver { + viewName := "mergeConflicts" + return self.newStaticViewDriver( + viewName, + func() ([]string, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.MergeConflictsContext) + state := ctx.GetState() + if state == nil { + return nil, errors.New("Expected patch explorer to be activated") + } + selectedContent := strings.Split(state.PlainRenderSelected(), "\n") + + return selectedContent, nil + }, + func() (int, int, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.MergeConflictsContext) + state := ctx.GetState() + if state == nil { + return 0, 0, errors.New("Expected patch explorer to be activated") + } + startIdx, endIdx := state.GetSelectedRange() + return startIdx, endIdx, nil + }, + // there is no concept of a cursor in the merge conflicts panel so we just return the start of the selection + func() (int, error) { + ctx := self.t.gui.ContextForView(viewName).(*context.MergeConflictsContext) + state := ctx.GetState() + if state == nil { + return 0, errors.New("Expected patch explorer to be activated") + } + startIdx, _ := state.GetSelectedRange() + return startIdx, nil + }, + ) +} + func (self *Views) Commits() *ViewDriver { return self.regularView("commits") } @@ -158,10 +221,6 @@ func (self *Views) Suggestions() *ViewDriver { return self.regularView("suggestions") } -func (self *Views) MergeConflicts() *ViewDriver { - return self.regularView("mergeConflicts") -} - func (self *Views) Search() *ViewDriver { return self.regularView("search") } diff --git a/pkg/integration/tests/patch_building/apply.go b/pkg/integration/tests/patch_building/apply.go new file mode 100644 index 000000000..4fbc235c2 --- /dev/null +++ b/pkg/integration/tests/patch_building/apply.go @@ -0,0 +1,64 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var Apply = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Apply a custom patch", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.NewBranch("branch-a") + shell.CreateFileAndAdd("file1", "first line\n") + shell.Commit("first commit") + + shell.NewBranch("branch-b") + shell.UpdateFileAndAdd("file1", "first line\nsecond line\n") + shell.Commit("update") + + shell.Checkout("branch-a") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Branches(). + Focus(). + Lines( + Contains("branch-a").IsSelected(), + Contains("branch-b"), + ). + Press(keys.Universal.NextItem). + PressEnter() + + t.Views().SubCommits(). + IsFocused(). + Lines( + Contains("update").IsSelected(), + Contains("first commit"), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("M file1").IsSelected(), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Views().PatchBuildingSecondary().Content(Contains("second line")) + + t.Actions().SelectPatchOption(MatchesRegexp(`apply patch$`)) + + t.Views().Files(). + Focus(). + Lines( + Contains("file1").IsSelected(), + ) + + t.Views().Main(). + Content(Contains("second line")) + }, +}) diff --git a/pkg/integration/tests/patch_building/apply_in_reverse.go b/pkg/integration/tests/patch_building/apply_in_reverse.go new file mode 100644 index 000000000..ec7b94fbc --- /dev/null +++ b/pkg/integration/tests/patch_building/apply_in_reverse.go @@ -0,0 +1,49 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var ApplyInReverse = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Apply a custom patch in reverse", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content\n") + shell.CreateFileAndAdd("file2", "file2 content\n") + shell.Commit("first commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("first commit").IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + Contains("file2"), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Views().PatchBuildingSecondary().Content(Contains("+file1 content")) + + t.Actions().SelectPatchOption(Contains("apply patch in reverse")) + + t.Views().Files(). + Focus(). + Lines( + Contains("D").Contains("file1").IsSelected(), + ) + + t.Views().Main(). + Content(Contains("-file1 content")) + }, +}) diff --git a/pkg/integration/tests/patch_building/copy_patch_to_clipboard.go b/pkg/integration/tests/patch_building/copy_patch_to_clipboard.go index 609924a11..ad65f63e9 100644 --- a/pkg/integration/tests/patch_building/copy_patch_to_clipboard.go +++ b/pkg/integration/tests/patch_building/copy_patch_to_clipboard.go @@ -8,7 +8,7 @@ import ( var CopyPatchToClipboard = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Create a patch from the commits and copy the patch to clipbaord.", ExtraCmdArgs: "", - Skip: true, + Skip: true, // skipping because CI doesn't have clipboard functionality SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.NewBranch("branch-a") @@ -40,11 +40,7 @@ var CopyPatchToClipboard = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Information().Content(Contains("building patch")) - t.Views(). - CommitFiles(). - Press(keys.Universal.CreatePatchOptionsMenu) - - t.ExpectPopup().Menu().Title(Equals("Patch Options")).Select(Contains("copy patch to clipboard")).Confirm() + t.Actions().SelectPatchOption(Contains("copy patch to clipboard")) t.ExpectToast(Contains("Patch copied to clipboard")) diff --git a/pkg/integration/tests/patch_building/move_to_index.go b/pkg/integration/tests/patch_building/move_to_index.go new file mode 100644 index 000000000..0ba8fcf43 --- /dev/null +++ b/pkg/integration/tests/patch_building/move_to_index.go @@ -0,0 +1,66 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var MoveToIndex = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Move a patch from a commit to the index", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content\n") + shell.CreateFileAndAdd("file2", "file2 content\n") + shell.Commit("first commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("first commit").IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + Contains("file2"), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Views().PatchBuildingSecondary().Content(Contains("+file1 content")) + + t.Actions().SelectPatchOption(Contains("move patch out into index")) + + t.Views().Files(). + Lines( + Contains("A").Contains("file1"), + ) + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file2").IsSelected(), + ). + PressEscape() + + t.Views().Main(). + Content(Contains("+file2 content")) + + t.Views().Commits(). + Lines( + Contains("first commit").IsSelected(), + ) + + t.Views().Files(). + Focus() + + t.Views().Main(). + Content(Contains("file1 content")) + }, +}) diff --git a/pkg/integration/tests/patch_building/move_to_index_partial.go b/pkg/integration/tests/patch_building/move_to_index_partial.go new file mode 100644 index 000000000..772c6ed23 --- /dev/null +++ b/pkg/integration/tests/patch_building/move_to_index_partial.go @@ -0,0 +1,98 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var MoveToIndexPartial = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Move a patch from a commit to the index. This is different from the MoveToIndex test in that we're only selecting a partial patch from a file", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "first line\nsecond line\nthird line\n") + shell.Commit("first commit") + + shell.UpdateFileAndAdd("file1", "first line2\nsecond line\nthird line2\n") + shell.Commit("second commit") + + shell.CreateFileAndAdd("file2", "file1 content") + shell.Commit("third commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("third commit").IsSelected(), + Contains("second commit"), + Contains("first commit"), + ). + NavigateToListItem(Contains("second commit")). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEnter() + + t.Views().PatchBuilding(). + IsFocused(). + ContainsLines( + Contains(`-first line`).IsSelected(), + Contains(`+first line2`), + Contains(` second line`), + Contains(`-third line`), + Contains(`+third line2`), + ). + PressPrimaryAction(). + SelectNextItem(). + PressPrimaryAction(). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + + t.Views().PatchBuildingSecondary(). + ContainsLines( + Contains(`-first line`), + Contains(`+first line2`), + Contains(` second line`), + Contains(` third line`), + ) + + t.Actions().SelectPatchOption(Contains("move patch out into index")) + + t.Views().Files(). + Lines( + Contains("M").Contains("file1"), + ) + }) + + // Focus is automatically returned to the commit files panel. Arguably it shouldn't be. + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1"), + ) + + t.Views().Main(). + ContainsLines( + Contains(` first line`), + Contains(` second line`), + Contains(`-third line`), + Contains(`+third line2`), + ) + + t.Views().Files(). + Focus() + + t.Views().Main(). + ContainsLines( + Contains(`-first line`), + Contains(`+first line2`), + Contains(` second line`), + Contains(` third line2`), + ) + }, +}) diff --git a/pkg/integration/tests/patch_building/move_to_index_with_conflict.go b/pkg/integration/tests/patch_building/move_to_index_with_conflict.go new file mode 100644 index 000000000..6f9b961d0 --- /dev/null +++ b/pkg/integration/tests/patch_building/move_to_index_with_conflict.go @@ -0,0 +1,89 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var MoveToIndexWithConflict = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Move a patch from a commit to the index, causing a conflict", + ExtraCmdArgs: "", + Skip: true, // Skipping until https://github.com/jesseduffield/lazygit/pull/2471 is merged + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content") + shell.Commit("first commit") + + shell.UpdateFileAndAdd("file1", "file1 content with old changes") + shell.Commit("second commit") + + shell.UpdateFileAndAdd("file1", "file1 content with new changes") + shell.Commit("third commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("third commit").IsSelected(), + Contains("second commit"), + Contains("first commit"), + ). + SelectNextItem(). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Actions().SelectPatchOption(Contains("move patch out into index")) + + t.Actions().AcknowledgeConflicts() + + t.Views().Files(). + IsFocused(). + Lines( + Contains("UU").Contains("file1"), + ). + PressPrimaryAction() + + t.Views().MergeConflicts(). + IsFocused(). + ContainsLines( + Contains("<<<<<<< HEAD").IsSelected(), + Contains("file1 content").IsSelected(), + Contains("=======").IsSelected(), + Contains("file1 content with new changes"), + Contains(">>>>>>>"), + ). + PressPrimaryAction() + + t.Actions().ContinueOnConflictsResolved() + + t.ExpectPopup().Alert(). + Title(Equals("Error")). + Content(Contains("Applied patch to 'file1' with conflicts")). + Confirm() + + t.Views().Files(). + IsFocused(). + Lines( + Contains("UU").Contains("file1"), + ). + PressEnter() + + t.Views().MergeConflicts(). + TopLines( + Contains("<<<<<<< ours"), + Contains("file1 content"), + Contains("======="), + Contains("file1 content with old changes"), + Contains(">>>>>>> theirs"), + ). + IsFocused() + }, +}) diff --git a/pkg/integration/tests/patch_building/move_to_new_commit.go b/pkg/integration/tests/patch_building/move_to_new_commit.go new file mode 100644 index 000000000..3ef9f7df6 --- /dev/null +++ b/pkg/integration/tests/patch_building/move_to_new_commit.go @@ -0,0 +1,70 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var MoveToNewCommit = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Move a patch from a commit to a new commit", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content") + shell.Commit("first commit") + + shell.UpdateFileAndAdd("file1", "file1 content with old changes") + shell.Commit("second commit") + + shell.UpdateFileAndAdd("file1", "file1 content with new changes") + shell.Commit("third commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("third commit").IsSelected(), + Contains("second commit"), + Contains("first commit"), + ). + SelectNextItem(). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Actions().SelectPatchOption(Contains("move patch into new commit")) + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressEscape() + + t.Views().Commits(). + IsFocused(). + Lines( + Contains("third commit"), + Contains(`Split from "second commit"`).IsSelected(), + Contains("second commit"), + Contains("first commit"), + ). + SelectNextItem(). + PressEnter() + + // the original commit has no more files in it + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("(none)"), + ) + }, +}) diff --git a/pkg/integration/tests/patch_building/remove_from_commit.go b/pkg/integration/tests/patch_building/remove_from_commit.go new file mode 100644 index 000000000..0d920c2a5 --- /dev/null +++ b/pkg/integration/tests/patch_building/remove_from_commit.go @@ -0,0 +1,57 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var RemoveFromCommit = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Remove a custom patch from a commit", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content\n") + shell.CreateFileAndAdd("file2", "file2 content\n") + shell.Commit("first commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("first commit").IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + Contains("file2"), + ). + PressPrimaryAction() + + t.Views().Information().Content(Contains("building patch")) + + t.Views().PatchBuildingSecondary().Content(Contains("+file1 content")) + + t.Actions().SelectPatchOption(Contains("remove patch from original commit")) + + t.Views().Files().IsEmpty() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file2").IsSelected(), + ). + PressEscape() + + t.Views().Main(). + Content(Contains("+file2 content")) + + t.Views().Commits(). + Lines( + Contains("first commit").IsSelected(), + ) + }, +}) diff --git a/pkg/integration/tests/patch_building/reset_with_escape.go b/pkg/integration/tests/patch_building/reset_with_escape.go new file mode 100644 index 000000000..714ea5f0b --- /dev/null +++ b/pkg/integration/tests/patch_building/reset_with_escape.go @@ -0,0 +1,43 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var ResetWithEscape = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Reset a custom patch with the escape keybinding", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content") + shell.Commit("first commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("first commit").IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressPrimaryAction(). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + }). + PressEscape() + + // hitting escape at the top level will reset the patch + t.Views().Commits(). + IsFocused(). + PressEscape() + + t.Views().Information().Content(DoesNotContain("building patch")) + }, +}) diff --git a/pkg/integration/tests/patch_building/select_all_files.go b/pkg/integration/tests/patch_building/select_all_files.go new file mode 100644 index 000000000..17744786f --- /dev/null +++ b/pkg/integration/tests/patch_building/select_all_files.go @@ -0,0 +1,42 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var SelectAllFiles = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "All all files of a commit to a custom patch with the 'a' keybinding", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content") + shell.CreateFileAndAdd("file2", "file2 content") + shell.CreateFileAndAdd("file3", "file3 content") + shell.Commit("first commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("first commit").IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + Contains("file2"), + Contains("file3"), + ). + Press(keys.Files.ToggleStagedAll) + + t.Views().Information().Content(Contains("building patch")) + + t.Views().Secondary().Content( + Contains("file1").Contains("file3").Contains("file3"), + ) + }, +}) diff --git a/pkg/integration/tests/patch_building/specific_selection.go b/pkg/integration/tests/patch_building/specific_selection.go new file mode 100644 index 000000000..1823f24f2 --- /dev/null +++ b/pkg/integration/tests/patch_building/specific_selection.go @@ -0,0 +1,167 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var SpecificSelection = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Build a custom patch with a specific selection of lines, adding individual lines, as well as a range and hunk, and adding a file directly", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("hunk-file", "1a\n1b\n1c\n1d\n1e\n1f\n1g\n1h\n1i\n1j\n1k\n1l\n1m\n1n\n1o\n1p\n1q\n1r\n1s\n1t\n1u\n1v\n1w\n1x\n1y\n1z\n") + shell.Commit("first commit") + + // making changes in two separate places for the sake of having two hunks + shell.UpdateFileAndAdd("hunk-file", "aa\n1b\ncc\n1d\n1e\n1f\n1g\n1h\n1i\n1j\n1k\n1l\n1m\n1n\n1o\n1p\n1q\n1r\n1s\ntt\nuu\nvv\n1w\n1x\n1y\n1z\n") + + shell.CreateFileAndAdd("line-file", "2a\n2b\n2c\n2d\n2e\n2f\n2g\n2h\n2i\n2j\n2k\n2l\n2m\n2n\n2o\n2p\n2q\n2r\n2s\n2t\n2u\n2v\n2w\n2x\n2y\n2z\n") + shell.CreateFileAndAdd("direct-file", "direct file content") + shell.Commit("second commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("second commit").IsSelected(), + Contains("first commit"), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("direct-file").IsSelected(), + Contains("hunk-file"), + Contains("line-file"), + ). + PressPrimaryAction(). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + + t.Views().Secondary().Content(Contains("direct file content")) + }). + NavigateToListItem(Contains("hunk-file")). + PressEnter() + + t.Views().PatchBuilding(). + IsFocused(). + SelectedLines( + Contains("-1a"), + ). + Press(keys.Main.ToggleSelectHunk). + SelectedLines( + Contains(`@@ -1,6 +1,6 @@`), + Contains(`-1a`), + Contains(`+aa`), + Contains(` 1b`), + Contains(`-1c`), + Contains(`+cc`), + Contains(` 1d`), + Contains(` 1e`), + Contains(` 1f`), + ). + PressPrimaryAction(). + // unlike in the staging panel, we don't remove lines from the patch building panel + // upon 'adding' them. So the same lines will be selected + SelectedLines( + Contains(`@@ -1,6 +1,6 @@`), + Contains(`-1a`), + Contains(`+aa`), + Contains(` 1b`), + Contains(`-1c`), + Contains(`+cc`), + Contains(` 1d`), + Contains(` 1e`), + Contains(` 1f`), + ). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + + t.Views().Secondary().Content( + // when we're inside the patch building panel, we only show the patch + // in the secondary panel that relates to the selected file + DoesNotContain("direct file content"). + Contains("@@ -1,6 +1,6 @@"). + Contains(" 1f"), + ) + }). + PressEscape() + + t.Views().CommitFiles(). + IsFocused(). + NavigateToListItem(Contains("line-file")). + PressEnter() + + t.Views().PatchBuilding(). + IsFocused(). + // hunk is selected because selection mode persists across files + ContainsLines( + Contains("@@ -0,0 +1,26 @@").IsSelected(), + ). + Press(keys.Main.ToggleSelectHunk). + SelectedLines( + Contains("+2a"), + ). + PressPrimaryAction(). + NavigateToListItem(Contains("+2c")). + Press(keys.Main.ToggleDragSelect). + NavigateToListItem(Contains("+2e")). + PressPrimaryAction(). + NavigateToListItem(Contains("+2g")). + PressPrimaryAction(). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + + t.Views().Secondary().ContainsLines( + Contains("+2a"), + Contains("+2c"), + Contains("+2d"), + Contains("+2e"), + Contains("+2g"), + ) + }). + PressEscape(). + Tap(func() { + t.Views().Secondary().ContainsLines( + // direct-file patch + Contains(`diff --git a/direct-file b/direct-file`), + Contains(`new file mode 100644`), + Contains(`index`), + Contains(`--- /dev/null`), + Contains(`+++ b/direct-file`), + Contains(`@@ -0,0 +1 @@`), + Contains(`+direct file content`), + Contains(`\ No newline at end of file`), + // hunk-file patch + Contains(`diff --git a/hunk-file b/hunk-file`), + Contains(`index`), + Contains(`--- a/hunk-file`), + Contains(`+++ b/hunk-file`), + Contains(`@@ -1,6 +1,6 @@`), + Contains(`-1a`), + Contains(`+aa`), + Contains(` 1b`), + Contains(`-1c`), + Contains(`+cc`), + Contains(` 1d`), + Contains(` 1e`), + Contains(` 1f`), + // line-file patch + Contains(`diff --git a/line-file b/line-file`), + Contains(`new file mode 100644`), + Contains(`index`), + Contains(`--- /dev/null`), + Contains(`+++ b/line-file`), + Contains(`@@ -0,0 +1,5 @@`), + Contains(`+2a`), + Contains(`+2c`), + Contains(`+2d`), + Contains(`+2e`), + Contains(`+2g`), + ) + }) + }, +}) diff --git a/pkg/integration/tests/patch_building/start_new_patch.go b/pkg/integration/tests/patch_building/start_new_patch.go new file mode 100644 index 000000000..d020a561c --- /dev/null +++ b/pkg/integration/tests/patch_building/start_new_patch.go @@ -0,0 +1,62 @@ +package patch_building + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var StartNewPatch = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Attempt to add a file from another commit to a patch, then agree to start a new patch", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFileAndAdd("file1", "file1 content") + shell.Commit("first commit") + + shell.CreateFileAndAdd("file2", "file2 content") + shell.Commit("second commit") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Focus(). + Lines( + Contains("second commit").IsSelected(), + Contains("first commit"), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file2").IsSelected(), + ). + PressPrimaryAction(). + Tap(func() { + t.Views().Information().Content(Contains("building patch")) + + t.Views().Secondary().Content(Contains("file2")) + }). + PressEscape() + + t.Views().Commits(). + IsFocused(). + NavigateToListItem(Contains("first commit")). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("file1").IsSelected(), + ). + PressPrimaryAction(). + Tap(func() { + t.ExpectPopup().Confirmation(). + Title(Contains("Discard Patch")). + Content(Contains("You can only build a patch from one commit/stash-entry at a time. Discard current patch?")). + Confirm() + + t.Views().Secondary().Content(Contains("file1").DoesNotContain("file2")) + }) + }, +}) diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index 6814ae631..16cf7d92a 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -94,7 +94,18 @@ var tests = []*components.IntegrationTest{ interactive_rebase.SwapWithConflict, misc.ConfirmOnQuit, misc.InitialOpen, + patch_building.Apply, + patch_building.ApplyInReverse, patch_building.CopyPatchToClipboard, + patch_building.MoveToIndex, + patch_building.MoveToIndexPartial, + patch_building.MoveToIndexWithConflict, + patch_building.MoveToNewCommit, + patch_building.RemoveFromCommit, + patch_building.ResetWithEscape, + patch_building.SelectAllFiles, + patch_building.SpecificSelection, + patch_building.StartNewPatch, reflog.Checkout, reflog.CherryPick, reflog.Patch, diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/patchBuilding/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 9daeafb98..000000000 --- a/test/integration/patchBuilding/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/FETCH_HEAD b/test/integration/patchBuilding/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/HEAD b/test/integration/patchBuilding/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/patchBuilding/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/ORIG_HEAD b/test/integration/patchBuilding/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index c41f6f982..000000000 --- a/test/integration/patchBuilding/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -7a40dadc0814bf7f1418d005eae184848a9f1c94 diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/config b/test/integration/patchBuilding/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/patchBuilding/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/patchBuilding/expected/repo/.git_keep/description b/test/integration/patchBuilding/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/patchBuilding/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/patchBuilding/expected/repo/.git_keep/index b/test/integration/patchBuilding/expected/repo/.git_keep/index deleted file mode 100644 index 41d8b9d800207d5b52c9583d8b65ea556c2f599e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmZ?q402{*U|<4b=7j96>Sm98ZDBMc0|N`2u5bbaL*o(#2F9;IH6lRFwsg zzC?sZ@#H&Q2=Hp@zRJL!TbY)blWGW50MxH*q@x=JqoL;fLNiA(sLiZ2Q#<(PW8dq# zD-K5$?dOUPgqdRmHOEkQf-J}!5Dhiw37R=<_p^Dm&y+oT!+%QQkh*}Ezs9a3(lB$3 zf#!q+xw--=Nd{vD1FpsT6V`rz$1k$ZfY0;nkMgPPB{}MfE<(~v*VnV|c=%e(o2R-Y I@cglv0MqzX+yDRo diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/info/exclude b/test/integration/patchBuilding/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/patchBuilding/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/patchBuilding/expected/repo/.git_keep/logs/HEAD b/test/integration/patchBuilding/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index fbfbb9e34..000000000 --- a/test/integration/patchBuilding/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,10 +0,0 @@ -0000000000000000000000000000000000000000 01ed22faef05591076721466e07fb10962642887 CI 1617671463 +1000 commit (initial): myfile1 -01ed22faef05591076721466e07fb10962642887 922fc2ed1965fe8436ce7837c634379f14faf3c3 CI 1617671463 +1000 commit: myfile2 -922fc2ed1965fe8436ce7837c634379f14faf3c3 7a40dadc0814bf7f1418d005eae184848a9f1c94 CI 1617671463 +1000 commit: myfile2 update -7a40dadc0814bf7f1418d005eae184848a9f1c94 2479abfe7bd6b64a753d3c3797f614bbb422f627 CI 1617671463 +1000 commit: myfile3 -2479abfe7bd6b64a753d3c3797f614bbb422f627 922fc2ed1965fe8436ce7837c634379f14faf3c3 CI 1617671469 +1000 rebase -i (start): checkout 922fc2ed1965fe8436ce7837c634379f14faf3c3 -922fc2ed1965fe8436ce7837c634379f14faf3c3 7a40dadc0814bf7f1418d005eae184848a9f1c94 CI 1617671469 +1000 rebase -i: fast-forward -7a40dadc0814bf7f1418d005eae184848a9f1c94 244cec6fa9704d5dc61fc5e60faba4125dfe3baa CI 1617671469 +1000 commit (amend): myfile2 update -244cec6fa9704d5dc61fc5e60faba4125dfe3baa c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 CI 1617671469 +1000 rebase -i (pick): myfile3 -c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 CI 1617671469 +1000 rebase -i (finish): returning to refs/heads/master -c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 92571130f37c70766612048271f1d4dca63ef0b5 CI 1617671472 +1000 commit: test diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/patchBuilding/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 80ec4b0e9..000000000 --- a/test/integration/patchBuilding/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,6 +0,0 @@ -0000000000000000000000000000000000000000 01ed22faef05591076721466e07fb10962642887 CI 1617671463 +1000 commit (initial): myfile1 -01ed22faef05591076721466e07fb10962642887 922fc2ed1965fe8436ce7837c634379f14faf3c3 CI 1617671463 +1000 commit: myfile2 -922fc2ed1965fe8436ce7837c634379f14faf3c3 7a40dadc0814bf7f1418d005eae184848a9f1c94 CI 1617671463 +1000 commit: myfile2 update -7a40dadc0814bf7f1418d005eae184848a9f1c94 2479abfe7bd6b64a753d3c3797f614bbb422f627 CI 1617671463 +1000 commit: myfile3 -2479abfe7bd6b64a753d3c3797f614bbb422f627 c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 CI 1617671469 +1000 rebase -i (finish): refs/heads/master onto 922fc2ed1965fe8436ce7837c634379f14faf3c3 -c69e35e8cae5688bbfcf8278c20ab43c1b8dbae3 92571130f37c70766612048271f1d4dca63ef0b5 CI 1617671472 +1000 commit: test diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/01/5689313279311c9356ea3fd3628f73ca4ea797 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/01/5689313279311c9356ea3fd3628f73ca4ea797 deleted file mode 100644 index 4854085f468665b4187f73ee209dcd4d870a069e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tNceUCcJI>UdugL)bV<8>{=HMc{ diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/01/ed22faef05591076721466e07fb10962642887 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/01/ed22faef05591076721466e07fb10962642887 deleted file mode 100644 index 8bc75322327a02410eda3111dbc6764e37f80b72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmV--0Eqv10ga783c@fD06pgwdlzK4T{jU#gr540G}&OGOG=5Lzc)|tIt(+Znyn3p z<U9B7DCJTE+E;S$qzaPi$<^?+%H`!qlG6K&u0lBzv`guM8k Z9N|oe=sN9_rhn?rzGdB%+z&C@EXzQDImQ40 diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb?JaeE+C`Uo^FYAFkO=)5LJ01#$5gXFdH&_De#-o`==XJ! KX6_5S**oZw2uwEs diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/24/79abfe7bd6b64a753d3c3797f614bbb422f627 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/24/79abfe7bd6b64a753d3c3797f614bbb422f627 deleted file mode 100644 index 5a46f9e626d2b432f3fc55a00128e4f229262ff9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gaA93c@fDMP26<*$Xn$Ofw0H2wn9UV=}=)V@rvkw>L+Szk9p~KW()x z&0?feJ5;T>p+t~eSQQGAr~^=nDVM+;M_?wO1~$7K`f8SiAWKdVkRFA5fguBoDvE*n zBo<7OjJ(@(JM1*u>oni>BXwW(lD2xY=#f1md1ucE0H)J^s_CD)so%1!>dX)8R60t= C1VXF; diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 deleted file mode 100644 index 5b95c00396c4b9b108a0376c45fe5107f9d1e493..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41 xcmbX$+mfp#eXS|1F zB(W%2fI#J=zt&xklfIABlRvp_3*TsM4{f~-K3Mdiuhtl&&U#LD{*$Zrm3d*OkFDm; J>IaZmJoivsOi=&; diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/92/2fc2ed1965fe8436ce7837c634379f14faf3c3 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/92/2fc2ed1965fe8436ce7837c634379f14faf3c3 deleted file mode 100644 index cc91b81d519c9a721590bd545497f2b15bba80d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaA93d0}}MZ5MC?h9pRqN746g{*Q6jUx@jCIk!Z?duV`{qH^a%UNJ@->jvmU4UA)i=}O>WCx?;06<)~i8Z5dc(Q`>7^>>Z*Rrx(TTtT|7A> DT`xi8 diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/92/571130f37c70766612048271f1d4dca63ef0b5 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/92/571130f37c70766612048271f1d4dca63ef0b5 deleted file mode 100644 index e19be1d70814302c64009895425514eed427b5ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmV;D0B!$x0gaA93c@fD06pgwxeKzJq}c?D2tD-~o9zY#V@r+T^X(J74#P0Aw)W^2 zGoJdcYT3J*ftO0EP%*H201a7|nuziML?MbJv+=I4ZY5^*gC=1eVoIe{smW0i2V8;| zENLl6#PFxz*WFID9jE!GUvAq|FS53)#fTIM137y}05AtVrn>&Ao38I}ey3PENG>@; A)c^nh diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/93/96d8d0c471661257f6c16c1957452912c0c6f5 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/93/96d8d0c471661257f6c16c1957452912c0c6f5 deleted file mode 100644 index 449805fe8d0cc3998bf4327d616d6a48159fad1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41 xcmbX$+mfp#eXS_`xY5Dn{JMYc7ai^D&QMZB)gG?8n4gg@550wA_ diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 deleted file mode 100644 index e75108b148bc6f181734e1c850fb34b46e716f3c..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#E;CW>%W19ene#?{(c3hog%2b43TDC^2TZpUta%rtH}p{!`~^A08nuUMF0Q* diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/ad/e030587c8ae5d240ad7669bff9030b24bd6385 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/ad/e030587c8ae5d240ad7669bff9030b24bd6385 deleted file mode 100644 index 4b5b62ee96692a48251a54a27956bb9022430efb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tkWYrARm7<@qMNuLn_)KQPAE`NCZan(L`UWC*a H?72F~GRscz diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/ce/024fc694fd464cfb5b43cb7702f0bd7345d882 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/ce/024fc694fd464cfb5b43cb7702f0bd7345d882 deleted file mode 100644 index d42bbeb9afa6c49cd53409b95cfda4af3b3d9dfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%t>`CU&08otwO#lD@ diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 b/test/integration/patchBuilding/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 deleted file mode 100644 index a71694532131dddcef3f2ab3d4e802250e4e4bc2..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#MGc#kPHV-}_X~_jk409y`v|ov+D(qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8USYDD;;DzG6?_x diff --git a/test/integration/patchBuilding/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a b/test/integration/patchBuilding/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a deleted file mode 100644 index 50c8c7bdcad292142ea81d4faf077667cfc702df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39 vcmb myfile1 -git add . -git commit -am "myfile1" -echo firstline > myfile2 -echo secondline >> myfile2 -echo thirdline >> myfile2 -git add . -git commit -am "myfile2" -echo firstline2 > myfile2 -echo secondline >> myfile2 -echo thirdline2 >> myfile2 -git commit -am "myfile2 update" -echo test3 > myfile3 -git add . -git commit -am "myfile3" diff --git a/test/integration/patchBuilding/test.json b/test/integration/patchBuilding/test.json deleted file mode 100644 index 4b851d414..000000000 --- a/test/integration/patchBuilding/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "", "speed": 7 } diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/patchBuilding2/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 9daeafb98..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/FETCH_HEAD b/test/integration/patchBuilding2/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/HEAD b/test/integration/patchBuilding2/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/ORIG_HEAD b/test/integration/patchBuilding2/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index 1af6e19fc..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -ad27dd25048bff07da92d2d9d829e4dd75472da4 diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/config b/test/integration/patchBuilding2/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/patchBuilding2/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/patchBuilding2/expected/repo/.git_keep/description b/test/integration/patchBuilding2/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/patchBuilding2/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/patchBuilding2/expected/repo/.git_keep/index b/test/integration/patchBuilding2/expected/repo/.git_keep/index deleted file mode 100644 index a3c15b76ee2d36ebb123ecdf68673e37087b595e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmZ?q402{*U|<4b=7j96MuLkBmcnR81_l;3U6CRNhQ=if42)laYD9pTZRwuJe^pa& ze2EB+;>mZq5a89)eU*Vdw=yj=C)E(B0I1(t?SPO1jE0)?5X~F~_b9gQ)BE11a=yQ- z)%MtNrtW-A4wyMc5Oa(~o=j~6xd%i;%~^?N4%_`~UhOkw&))E#QaGe8;N`Ee>xeYW z9Alt4AwjOLKuVIqSiyknu^}sS^0^Hgb?36^nYYjF)NQL<@Pf6xe(pSn{BJ+2zI|hf KSl1vC;SB)#YFF<7 diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/info/exclude b/test/integration/patchBuilding2/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/patchBuilding2/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/patchBuilding2/expected/repo/.git_keep/logs/HEAD b/test/integration/patchBuilding2/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 507fc33cd..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,6 +0,0 @@ -0000000000000000000000000000000000000000 9a939087472cfaf305396d4b177ee888ced193d9 CI 1617671474 +1000 commit (initial): myfile1 -9a939087472cfaf305396d4b177ee888ced193d9 5063202049f1980e035c390732a7e6da8783357f CI 1617671474 +1000 commit: myfile2 -5063202049f1980e035c390732a7e6da8783357f d0ec73019f9c5e426c9b37fa58757855367580a5 CI 1617671474 +1000 commit: myfile2 update -d0ec73019f9c5e426c9b37fa58757855367580a5 ad27dd25048bff07da92d2d9d829e4dd75472da4 CI 1617671474 +1000 commit: myfile3 -ad27dd25048bff07da92d2d9d829e4dd75472da4 ad27dd25048bff07da92d2d9d829e4dd75472da4 CI 1617671483 +1000 reset: moving to HEAD -ad27dd25048bff07da92d2d9d829e4dd75472da4 e474bc2d1712ed5fdf14fb7223392f1b0dcc8d37 CI 1617671494 +1000 commit: test diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 4789bfb1e..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 9a939087472cfaf305396d4b177ee888ced193d9 CI 1617671474 +1000 commit (initial): myfile1 -9a939087472cfaf305396d4b177ee888ced193d9 5063202049f1980e035c390732a7e6da8783357f CI 1617671474 +1000 commit: myfile2 -5063202049f1980e035c390732a7e6da8783357f d0ec73019f9c5e426c9b37fa58757855367580a5 CI 1617671474 +1000 commit: myfile2 update -d0ec73019f9c5e426c9b37fa58757855367580a5 ad27dd25048bff07da92d2d9d829e4dd75472da4 CI 1617671474 +1000 commit: myfile3 -ad27dd25048bff07da92d2d9d829e4dd75472da4 e474bc2d1712ed5fdf14fb7223392f1b0dcc8d37 CI 1617671494 +1000 commit: test diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/stash b/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/stash deleted file mode 100644 index 26825b7bb..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/logs/refs/stash +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 2c60d208ba3ec966b77ca756237843af7584cf93 CI 1617671483 +1000 On master: asd diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb)0P^c{@z}^dmUzA(o)J; z!J2rgn+R}&IU&WQQ|leMG#JAHgE-2PF@vP$l>*3b*580`#lU&kL?qFKuTW>Hla5h?NbiWBa^2y^QjrszqheM&u98Z1# diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/2c/60d208ba3ec966b77ca756237843af7584cf93 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/2c/60d208ba3ec966b77ca756237843af7584cf93 deleted file mode 100644 index 824ef6445..000000000 --- a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/2c/60d208ba3ec966b77ca756237843af7584cf93 +++ /dev/null @@ -1,2 +0,0 @@ -xϻjA  Akn!+Wy!׬ǐ6_+KUԔDmDVxTJh]6M ,DzlRVBu6ˑs0?OҒV27JTIhH2 -kyu/׳ȸ(L\p D\O|`co J \ No newline at end of file diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/47/5a06b7978eef6509efdd2a86e341992d9f2908 deleted file mode 100644 index 5b95c00396c4b9b108a0376c45fe5107f9d1e493..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41 xcmbX$+mfp#eXS|_r;+Ñ1ute5 -?2~, \ No newline at end of file diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/a3/2f90adf7ee0f14ae300e49cdf8779507746c27 deleted file mode 100644 index e75108b148bc6f181734e1c850fb34b46e716f3c..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#E;CW>%W19ene#?{(c3hog%2b43TDC^2TZpUta%rtH}p{!`~^A08nuUMF0Q* diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/ad/27dd25048bff07da92d2d9d829e4dd75472da4 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/ad/27dd25048bff07da92d2d9d829e4dd75472da4 deleted file mode 100644 index d7ecb6bbe2d42f061b8ee0419e00001a4c17da21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gcW<3c@fDKvCB@MfQSBnoK4GB0^U^#+Xj9(3nyp=bX&yQ&pG6b6|KsX}o<)B|YXJeNeo2t*;~fy^emzPg=3GkI`aIHQIkW`1}of{Bn4 zqK||L1dY7=v+Z`A>~);(`jNV=ddaQctc#8!xj@059RQf49#dWaAU@$Z=Ff%bx$gNDv%tAU@$Z=Ff%bx$gNDv%t5KwJ#mv`3=yhT8up_(CpfOXjpz!oEm zFEMbi)^Szw=&yCx7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#M(I#DbD%(M%WjnE9;d_7N3Z{quDciV|an``NtOXUd+v;XkEtNL|3oUt`x1 JX#k!iEJ9Z2F<1Zq diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/patchBuilding2/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/patchBuilding2/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/e3/31050363ceb0b12d9d042e37879d892d867ea0 deleted file mode 100644 index a71694532131dddcef3f2ab3d4e802250e4e4bc2..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#MGc#kPHV-}_X~_jk409y`v|ov+D(qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8USYDD;;DzG6?_x diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/e4/74bc2d1712ed5fdf14fb7223392f1b0dcc8d37 b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/e4/74bc2d1712ed5fdf14fb7223392f1b0dcc8d37 deleted file mode 100644 index a8916d6ef65ce3bfecb6f1756b14b73302b5d063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmV;D0B!$x0gaA93c@fD06pgwdlzIkNwW!v2tD-~+wK+xV@r+T^Q}MdI?TXKORe_? zROrw)Gq4Z{I}9mIHsVNLi(>Q^ICIflyynCv=vLY6*+A5@s_!u7ah{P?cI6jkUo5I} z7ul;sC+~J!Hs}X9_rujbQrCx_rlnqh5^-XRCBl&q(d~4fYWAn@n!TF)0{E;sC*<5l A=>Px# diff --git a/test/integration/patchBuilding2/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a b/test/integration/patchBuilding2/expected/repo/.git_keep/objects/f3/c8a074e65b02d1bc364caf0b4c1516abf9eb5a deleted file mode 100644 index 50c8c7bdcad292142ea81d4faf077667cfc702df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39 vcmb myfile1 -git add . -git commit -am "myfile1" -echo firstline > myfile2 -echo secondline >> myfile2 -echo thirdline >> myfile2 -git add . -git commit -am "myfile2" -echo firstline2 > myfile2 -echo secondline >> myfile2 -echo thirdline2 >> myfile2 -git commit -am "myfile2 update" -echo test3 > myfile3 -git add . -git commit -am "myfile3" diff --git a/test/integration/patchBuilding2/test.json b/test/integration/patchBuilding2/test.json deleted file mode 100644 index 21fc106b8..000000000 --- a/test/integration/patchBuilding2/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "", "speed": 5 } diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 907b30816..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -blah diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/FETCH_HEAD b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/HEAD b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/config b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/patchBuildingToggleAll/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/patchBuildingToggleAll/expected/repo/.git_keep/description b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/patchBuildingToggleAll/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/patchBuildingToggleAll/expected/repo/.git_keep/index b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/index deleted file mode 100644 index 291d34ebebffe18e21251c8c853556342abe66a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmZ?q402{*U|<4b#w2TjQs$!90UFB0$V`Kbu$kOxd$H z{HGKSsS9}dYwS8A%^;kgm#SY6UGC(>&Oarc?3yyPmeeUHbdQ!3BfN08|tA<%=0J-ZfZ~y=R diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/info/exclude b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/patchBuildingToggleAll/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/patchBuildingToggleAll/expected/repo/.git_keep/logs/HEAD b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 30dd712e1..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 7028eaec19b2723b62690974057c92ba7d8c1b11 CI 1648038005 +1100 commit (initial): first commit -7028eaec19b2723b62690974057c92ba7d8c1b11 cf149a94a18c990b2c5cdd0cf15ec4880f51c8b0 CI 1648038005 +1100 commit: blah diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 30dd712e1..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 7028eaec19b2723b62690974057c92ba7d8c1b11 CI 1648038005 +1100 commit (initial): first commit -7028eaec19b2723b62690974057c92ba7d8c1b11 cf149a94a18c990b2c5cdd0cf15ec4880f51c8b0 CI 1648038005 +1100 commit: blah diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 deleted file mode 100644 index f74bf2335bbc5999ad0faff94fb04165d8ab5c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb~ZE#08nZNMgRZ+ diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b deleted file mode 100644 index a35700d0e194beeac2dbf4a54a84aa39ea6a1bc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 zcmb7HexU|FfcPQQAo?oNi}3xy65p<)zlkbB0{5h@|`XOc(rt2 zMN(kIAi?v)s6lDpxtFUJg;({rywaX;p^l`$nBjglulAX;XK(mVDI8K4@bcH#bwnCT gfeFJUlcNv9{}~-CdzJp;w8fXC*jukd0F1skmKlsaH2?qr diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 deleted file mode 100644 index adf64119a33d7621aeeaa505d30adb58afaa5559..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15 Wcmb{;fo08o?%QUCw| diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/68/bbd52379d849022495dcfd11b13f2fb3103d37 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/68/bbd52379d849022495dcfd11b13f2fb3103d37 deleted file mode 100644 index 15e2a131e84692e3d53bfa3c48d999c254444784..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46 zcmbHR*A?9DejUHPx;=k6GsE9o0-*qn C^b>mk diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/70/28eaec19b2723b62690974057c92ba7d8c1b11 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/70/28eaec19b2723b62690974057c92ba7d8c1b11 deleted file mode 100644 index a3f20d2e948191e2afb72611db44508657965d60..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 121 zcmV-<0EYi~0ga783c@fD06pgwdlzIAH(>)JLQj20l5VhIh{P58{1*Ix*I|Y!y|q=r zdVA6#0+iYLr37*%2gxyEK=G6-FCjYSnnfrgne^3XA27{uo92gXsl8uvDZSmn24cK2 bqKC7!h~}WjMCDK2)OCCmewEn)8D1{oTiiGJ diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 deleted file mode 100644 index be495f3991a70f570da18905f0d6f17de4d85e73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb#rs)x-b@6iPCH1~Rz3_P+4kaf0WHC*ql|6*&sG Mp7GWI01x&lI9Dz+CjbBd diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/patchBuildingToggleAll/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/patchBuildingToggleAll/expected/repo/.git_keep/objects/cf/149a94a18c990b2c5cdd0cf15ec4880f51c8b0 b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/cf/149a94a18c990b2c5cdd0cf15ec4880f51c8b0 deleted file mode 100644 index 5d9dcc080..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/cf/149a94a18c990b2c5cdd0cf15ec4880f51c8b0 +++ /dev/null @@ -1,4 +0,0 @@ -xM -@ @as ADHҔ -[9ǷxjSi "=R ]`\D}lpN08nuUO8@`> diff --git a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/patchBuildingToggleAll/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/patchBuildingToggleAll/expected/repo/.git_keep/refs/heads/master b/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 6e12466a8..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -cf149a94a18c990b2c5cdd0cf15ec4880f51c8b0 diff --git a/test/integration/patchBuildingToggleAll/expected/repo/one/two/three/file3 b/test/integration/patchBuildingToggleAll/expected/repo/one/two/three/file3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/patchBuildingToggleAll/expected/repo/one/two/three/file3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/patchBuildingToggleAll/recording.json b/test/integration/patchBuildingToggleAll/recording.json deleted file mode 100644 index 52feb4966..000000000 --- a/test/integration/patchBuildingToggleAll/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":624,"Mod":0,"Key":259,"Ch":0},{"Timestamp":813,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1216,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1841,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2456,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2624,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2841,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3600,"Mod":2,"Key":16,"Ch":16},{"Timestamp":4795,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5193,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5696,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7345,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/patchBuildingToggleAll/setup.sh b/test/integration/patchBuildingToggleAll/setup.sh deleted file mode 100644 index c552b9e56..000000000 --- a/test/integration/patchBuildingToggleAll/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -git commit --allow-empty -m "first commit" - -mkdir -p one/two/three -echo test1 > one/two/three/file1 -echo test2 > one/two/three/file2 -echo test3 > one/two/three/file3 -echo test4 > one/two/three/file4 -echo test5 > one/two/file1 -echo test6 > one/two/file2 - -git add . -git commit -m "blah" diff --git a/test/integration/patchBuildingToggleAll/test.json b/test/integration/patchBuildingToggleAll/test.json deleted file mode 100644 index 1804ea8aa..000000000 --- a/test/integration/patchBuildingToggleAll/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "messing with our patch building flow in both flat and tree view", "speed": 10 } diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index d72af3146..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -asd diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/FETCH_HEAD b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/HEAD b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/config b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/patchBuildingWithFiletree/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/patchBuildingWithFiletree/expected/repo/.git_keep/description b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/patchBuildingWithFiletree/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/patchBuildingWithFiletree/expected/repo/.git_keep/index b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/index deleted file mode 100644 index 8df96033352f649b2e725f646283166aade14d18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 407 zcmZ?q402{*U|<4b=7j96?jp{|e!^%*1_l;3UD0X=hQ=if42)laYD9pTt$D&>?YNBU z>5rUlxp{Vnd!6Hx+seS3pO>m%Ql77$mYI`k1XP9(fXqVx37#KD4NCjYy!Ezzt3!k?r9yqvv-sU|g=I3xu+xcT2*b59s3I<%xv+}iUl4>qj mFFg8o*^)VGE26FmG_IOF>;JvwtemRy%DGl=RdUX$ya52U_kq;_ diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/info/exclude b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/patchBuildingWithFiletree/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/patchBuildingWithFiletree/expected/repo/.git_keep/logs/HEAD b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 233b507f8..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 c17dc7400fbb649385064c27544ba1e6c4751566 CI 1617671495 +1000 commit (initial): first commit -c17dc7400fbb649385064c27544ba1e6c4751566 b5e8fb99b011265d28065d0d545ff6b0245b1fa1 CI 1617671495 +1000 commit: blah -b5e8fb99b011265d28065d0d545ff6b0245b1fa1 88981dbb0664057b766113679127284f69f4fb69 CI 1617671504 +1000 commit: asd diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 233b507f8..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 c17dc7400fbb649385064c27544ba1e6c4751566 CI 1617671495 +1000 commit (initial): first commit -c17dc7400fbb649385064c27544ba1e6c4751566 b5e8fb99b011265d28065d0d545ff6b0245b1fa1 CI 1617671495 +1000 commit: blah -b5e8fb99b011265d28065d0d545ff6b0245b1fa1 88981dbb0664057b766113679127284f69f4fb69 CI 1617671504 +1000 commit: asd diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 deleted file mode 100644 index f74bf2335bbc5999ad0faff94fb04165d8ab5c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb~ZE#08nZNMgRZ+ diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/41/05b6da4ccc191a4abd24b1ffac6a2031534c0b deleted file mode 100644 index a35700d0e194beeac2dbf4a54a84aa39ea6a1bc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 zcmb6V=y!@Ff%bxNXyJgHDZw9`C-(cwC~)@Rg1!_`deOU&$m!V hQeez*Kbu$kOxd$H{HGKSsS9}dYwS8A4FI-D8w%QAA-w7HexU|FfcPQQAo?oNi}3xy65p<)zlkbB0{5h@|`XOc(rt2 zMN(kIAi?v)s6lDpxtFUJg;({rywaX;p^l`$nBjglulAX;XK(mVDI8K4@bcH#bwnCT gfeFJUlcNv9{}~-CdzJp;w8fXC*jukd0F1skmKlsaH2?qr diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 deleted file mode 100644 index adf64119a33d7621aeeaa505d30adb58afaa5559..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15 Wcmb{;fo08o?%QUCw| diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/54/57a1e78421c0c1bf9eb3bcc89f6c0996b9f89e b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/54/57a1e78421c0c1bf9eb3bcc89f6c0996b9f89e deleted file mode 100644 index 72cceab2fb857f2d6160204ba0cf3dfeceffe72f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80 zcmV-W0I&ae0V^p=O;s>6WiT`_Ff%bxNXyJgHDYLl m7yyAnNd{0ogY&F>Et{m8%hd~yzFoFtj@pW-YXShA&l~Rx^dqhS diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/5a/abb4aaf3d6cc113fec7f7a3c0a880988085c23 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/5a/abb4aaf3d6cc113fec7f7a3c0a880988085c23 deleted file mode 100644 index 9da21301e7401e1fa88b819f864390bc291ffff3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46 zcmbHR*A?9DejUHPx;=k6GsE9o0-*qn C^b>mk diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/83/90c32b5e687b97e242da46498b574ace0e1eb5 deleted file mode 100644 index be495f3991a70f570da18905f0d6f17de4d85e73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb{i+I)qN&SmYFjkhDbFe*a?*eGK(3) zKp9QY$*13!%}=wxO!G~@($=S*%F?bLBaU%Ig25jV0Nif(sjh$KPTtl10QcrNza)A| AlK=n! diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/98/1651deb012f8e684dd306c1f5bf8edd5c3db67 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/98/1651deb012f8e684dd306c1f5bf8edd5c3db67 deleted file mode 100644 index 0db8d98310bd1849abcf99891f41336bb7824a3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106 zcmV-w0G0oE0V^p=O;xb8U@$Z=Ff%bxNXyJgHDvHN$(OpiOH=%oBIl!5i$2}o-S&|m zNr4eV^Mu3NaT(RqA35D}^Xv}yI>#rs)x-b@6iPCH1~Rz3_P+4kaf0WHC*ql|6*&sG Mp7GWI01x&lI9Dz+CjbBd diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/9f/aac09750995930a5d55eccf91ad6f802e8c66b b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/9f/aac09750995930a5d55eccf91ad6f802e8c66b deleted file mode 100644 index 0ac15a51b3e2d862c12a176c109e802ea37b045b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 zcmb`~^A08nuUMF0Q* diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/b5/e8fb99b011265d28065d0d545ff6b0245b1fa1 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/b5/e8fb99b011265d28065d0d545ff6b0245b1fa1 deleted file mode 100644 index f8deebc64..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/b5/e8fb99b011265d28065d0d545ff6b0245b1fa1 +++ /dev/null @@ -1,4 +0,0 @@ -xA -@ @Ѯ/D3 -R -uَ8Ƨl+3R zNU3~8 \ No newline at end of file diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/c1/7dc7400fbb649385064c27544ba1e6c4751566 b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/c1/7dc7400fbb649385064c27544ba1e6c4751566 deleted file mode 100644 index ded22a0e19135861f3ea88083405f9938ab8e5ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 121 zcmV-<0EYi~0ga783c@fD06pgwdlzIkY_}lpN08nuUO8@`> diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/patchBuildingWithFiletree/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/patchBuildingWithFiletree/expected/repo/.git_keep/refs/heads/master b/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index ad0c05c58..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -88981dbb0664057b766113679127284f69f4fb69 diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/one/two/file2 b/test/integration/patchBuildingWithFiletree/expected/repo/one/two/file2 deleted file mode 100644 index 8390c32b5..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/one/two/file2 +++ /dev/null @@ -1 +0,0 @@ -test6 diff --git a/test/integration/patchBuildingWithFiletree/expected/repo/one/two/three/file3 b/test/integration/patchBuildingWithFiletree/expected/repo/one/two/three/file3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/patchBuildingWithFiletree/expected/repo/one/two/three/file3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/patchBuildingWithFiletree/recording.json b/test/integration/patchBuildingWithFiletree/recording.json deleted file mode 100644 index 78ff38e52..000000000 --- a/test/integration/patchBuildingWithFiletree/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":621,"Mod":0,"Key":259,"Ch":0},{"Timestamp":981,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1733,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2653,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2846,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2949,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3077,"Mod":0,"Key":256,"Ch":96},{"Timestamp":3389,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3757,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3894,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4085,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4221,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4854,"Mod":2,"Key":16,"Ch":16},{"Timestamp":5244,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5741,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5981,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6398,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6637,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6941,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7149,"Mod":0,"Key":256,"Ch":32},{"Timestamp":7541,"Mod":0,"Key":256,"Ch":99},{"Timestamp":7941,"Mod":0,"Key":256,"Ch":97},{"Timestamp":8317,"Mod":0,"Key":256,"Ch":115},{"Timestamp":8405,"Mod":0,"Key":256,"Ch":100},{"Timestamp":8733,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9669,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/patchBuildingWithFiletree/setup.sh b/test/integration/patchBuildingWithFiletree/setup.sh deleted file mode 100644 index c552b9e56..000000000 --- a/test/integration/patchBuildingWithFiletree/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -git commit --allow-empty -m "first commit" - -mkdir -p one/two/three -echo test1 > one/two/three/file1 -echo test2 > one/two/three/file2 -echo test3 > one/two/three/file3 -echo test4 > one/two/three/file4 -echo test5 > one/two/file1 -echo test6 > one/two/file2 - -git add . -git commit -m "blah" diff --git a/test/integration/patchBuildingWithFiletree/test.json b/test/integration/patchBuildingWithFiletree/test.json deleted file mode 100644 index 1804ea8aa..000000000 --- a/test/integration/patchBuildingWithFiletree/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "messing with our patch building flow in both flat and tree view", "speed": 10 }