From 1d90e1b565ad41892a903e757bcee51466eca37d Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 28 Jan 2022 21:56:01 +1100 Subject: [PATCH] add submodule integration tests --- .gitignore | 10 +- pkg/integration/integration.go | 125 +++++++++++++----- .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 0 .../submoduleAdd/expected/.git_keep/HEAD | 1 + .../submoduleAdd/expected/.git_keep/config | 13 ++ .../expected/.git_keep/description | 1 + .../submoduleAdd/expected/.git_keep/index | Bin 0 -> 361 bytes .../expected/.git_keep/info/exclude | 7 + .../submoduleAdd/expected/.git_keep/logs/HEAD | 3 + .../expected/.git_keep/logs/refs/heads/master | 3 + .../expected/.git_keep/modules/blah/HEAD | 1 + .../expected/.git_keep/modules/blah/config | 14 ++ .../.git_keep/modules/blah/description | 1 + .../expected/.git_keep/modules/blah/index | Bin 0 -> 209 bytes .../.git_keep/modules/blah/info/exclude | 7 + .../expected/.git_keep/modules/blah/logs/HEAD | 1 + .../modules/blah/logs/refs/heads/master | 1 + .../blah/logs/refs/remotes/origin/HEAD | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../.git_keep/modules/blah/packed-refs | 2 + .../.git_keep/modules/blah/refs/heads/master | 1 + .../modules/blah/refs/remotes/origin/HEAD | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../5f/77fb3622a1035782a7dacc0cca12e674066b9e | Bin 0 -> 144 bytes .../6d/e70e35394a99cc437d1bc70b0852b70c5bb03d | Bin 0 -> 146 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../b9/7660affc790464b00ad45c7186a882238d77fb | Bin 0 -> 67 bytes .../expected/.git_keep/refs/heads/master | 1 + .../submoduleAdd/expected/.gitmodules_keep | 3 + .../submoduleAdd/expected/haha/.git_keep | 1 + .../submoduleAdd/expected/haha/myfile1 | 1 + .../submoduleAdd/expected/haha/myfile2 | 1 + .../integration/submoduleAdd/expected/myfile1 | 1 + .../integration/submoduleAdd/expected/myfile2 | 1 + test/integration/submoduleAdd/recording.json | 1 + test/integration/submoduleAdd/setup.sh | 24 ++++ test/integration/submoduleAdd/test.json | 4 + .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 0 .../submoduleEnter/expected/.git_keep/HEAD | 1 + .../submoduleEnter/expected/.git_keep/config | 13 ++ .../expected/.git_keep/description | 1 + .../submoduleEnter/expected/.git_keep/index | Bin 0 -> 441 bytes .../expected/.git_keep/info/exclude | 7 + .../expected/.git_keep/logs/HEAD | 5 + .../expected/.git_keep/logs/refs/heads/master | 5 + .../.git_keep/modules/other_repo/HEAD | 1 + .../.git_keep/modules/other_repo/ORIG_HEAD | 1 + .../.git_keep/modules/other_repo/config | 14 ++ .../.git_keep/modules/other_repo/description | 1 + .../.git_keep/modules/other_repo/index | Bin 0 -> 137 bytes .../.git_keep/modules/other_repo/info/exclude | 7 + .../.git_keep/modules/other_repo/logs/HEAD | 5 + .../modules/other_repo/logs/refs/heads/master | 3 + .../other_repo/logs/refs/remotes/origin/HEAD | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../96/c588f28aac5a8ebd6430526697e82e46b3180c | Bin 0 -> 83 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 | 2 + .../.git_keep/modules/other_repo/packed-refs | 2 + .../modules/other_repo/refs/heads/master | 1 + .../other_repo/refs/remotes/origin/HEAD | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../10/7f435787895be1068f01326df55c355a9d29b1 | Bin 0 -> 154 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../2b/864257bf2d49adbad8785540d85030a60852ff | Bin 0 -> 62 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../59/a9aee220657762e2d1c60799a0f5b03137d906 | Bin 0 -> 155 bytes .../96/c588f28aac5a8ebd6430526697e82e46b3180c | Bin 0 -> 83 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../c8/3cc777cf98a8c0f3c0995d7c1b21db92a71c66 | 2 + .../e1/eb418c0ff98940d4ea817eebcff5dcdde645ce | 4 + .../fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 | 2 + .../expected/.git_keep/refs/heads/master | 1 + .../submoduleEnter/expected/.gitmodules_keep | 3 + .../submoduleEnter/expected/myfile1 | 1 + .../submoduleEnter/expected/myfile2 | 1 + .../submoduleEnter/expected/myfile3 | 1 + .../expected/other_repo/.git_keep | 1 + .../expected/other_repo/myfile1 | 1 + .../integration/submoduleEnter/recording.json | 1 + test/integration/submoduleEnter/setup.sh | 30 +++++ test/integration/submoduleEnter/test.json | 4 + .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 0 .../submoduleRemove/expected/.git_keep/HEAD | 1 + .../submoduleRemove/expected/.git_keep/config | 10 ++ .../expected/.git_keep/description | 1 + .../submoduleRemove/expected/.git_keep/index | Bin 0 -> 289 bytes .../expected/.git_keep/info/exclude | 7 + .../expected/.git_keep/logs/HEAD | 4 + .../expected/.git_keep/logs/refs/heads/master | 4 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../2b/864257bf2d49adbad8785540d85030a60852ff | Bin 0 -> 62 bytes .../2e/eb2c1e6451d1318b506eecddf936b59a5f32b8 | Bin 0 -> 150 bytes .../40/f121d7563ed318d461996b8d84e2ec8632687e | 2 + .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../9d/10a5a0a21eb2cfdb6206f474ed57fd5cd51440 | Bin 0 -> 152 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 0 -> 15 bytes .../f1/43043bb53b17b5727a43b6cfbb1a8d1f5a222d | Bin 0 -> 113 bytes .../expected/.git_keep/refs/heads/master | 1 + .../submoduleRemove/expected/.gitmodules_keep | 0 .../submoduleRemove/expected/myfile1 | 1 + .../submoduleRemove/expected/myfile2 | 1 + .../submoduleRemove/recording.json | 1 + test/integration/submoduleRemove/setup.sh | 27 ++++ test/integration/submoduleRemove/test.json | 4 + .../submoduleReset/config/config.yml | 6 + .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 0 .../submoduleReset/expected/.git_keep/HEAD | 1 + .../submoduleReset/expected/.git_keep/config | 13 ++ .../expected/.git_keep/description | 1 + .../submoduleReset/expected/.git_keep/index | Bin 0 -> 369 bytes .../expected/.git_keep/info/exclude | 7 + .../expected/.git_keep/logs/HEAD | 3 + .../expected/.git_keep/logs/refs/heads/master | 3 + .../.git_keep/modules/other_repo/HEAD | 1 + .../.git_keep/modules/other_repo/ORIG_HEAD | 1 + .../.git_keep/modules/other_repo/config | 14 ++ .../.git_keep/modules/other_repo/description | 1 + .../.git_keep/modules/other_repo/index | Bin 0 -> 209 bytes .../.git_keep/modules/other_repo/info/exclude | 7 + .../.git_keep/modules/other_repo/logs/HEAD | 5 + .../modules/other_repo/logs/refs/heads/master | 2 + .../other_repo/logs/refs/remotes/origin/HEAD | 1 + .../modules/other_repo/logs/refs/stash | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../17/defcd0e1f9ad96542aa66845e53cb46c91c30d | Bin 0 -> 86 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../5a/d28e22767f979da2c198dc6c1003b25964e3da | Bin 0 -> 20 bytes .../84/69b6d9b0a33be075f9e0df61c5a3ebba3ecfd2 | 2 + .../9d/13001fc1d98cd178f9e604f6f2c2e52794079e | Bin 0 -> 177 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../f3/5aba17e85e3fe18f7b01c0f65306c9289c482e | Bin 0 -> 230 bytes .../.git_keep/modules/other_repo/packed-refs | 2 + .../modules/other_repo/refs/heads/master | 1 + .../other_repo/refs/remotes/origin/HEAD | 1 + .../.git_keep/modules/other_repo/refs/stash | 1 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../2b/864257bf2d49adbad8785540d85030a60852ff | Bin 0 -> 62 bytes .../2e/eb2c1e6451d1318b506eecddf936b59a5f32b8 | Bin 0 -> 150 bytes .../42/530e986dbb65877ed8d61ca0c816e425e5c62e | Bin 0 -> 150 bytes .../9d/10a5a0a21eb2cfdb6206f474ed57fd5cd51440 | Bin 0 -> 152 bytes .../a5/0a5125768001a3ea263ffb7cafbc421a508153 | 2 + .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../expected/.git_keep/refs/heads/master | 1 + .../submoduleReset/expected/.gitmodules_keep | 3 + .../submoduleReset/expected/myfile1 | 1 + .../submoduleReset/expected/myfile2 | 1 + .../expected/other_repo/.git_keep | 1 + .../expected/other_repo/myfile1 | 1 + .../expected/other_repo/myfile2 | 1 + .../integration/submoduleReset/recording.json | 1 + test/integration/submoduleReset/setup.sh | 27 ++++ test/integration/submoduleReset/test.json | 4 + 182 files changed, 517 insertions(+), 34 deletions(-) create mode 100644 test/integration/submoduleAdd/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/submoduleAdd/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/config create mode 100644 test/integration/submoduleAdd/expected/.git_keep/description create mode 100644 test/integration/submoduleAdd/expected/.git_keep/index create mode 100644 test/integration/submoduleAdd/expected/.git_keep/info/exclude create mode 100644 test/integration/submoduleAdd/expected/.git_keep/logs/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/config create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/description create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/index create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/info/exclude create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/heads/master create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/packed-refs create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/heads/master create mode 100644 test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/5f/77fb3622a1035782a7dacc0cca12e674066b9e create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/6d/e70e35394a99cc437d1bc70b0852b70c5bb03d create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleAdd/expected/.git_keep/objects/b9/7660affc790464b00ad45c7186a882238d77fb create mode 100644 test/integration/submoduleAdd/expected/.git_keep/refs/heads/master create mode 100644 test/integration/submoduleAdd/expected/.gitmodules_keep create mode 100644 test/integration/submoduleAdd/expected/haha/.git_keep create mode 100644 test/integration/submoduleAdd/expected/haha/myfile1 create mode 100644 test/integration/submoduleAdd/expected/haha/myfile2 create mode 100644 test/integration/submoduleAdd/expected/myfile1 create mode 100644 test/integration/submoduleAdd/expected/myfile2 create mode 100644 test/integration/submoduleAdd/recording.json create mode 100644 test/integration/submoduleAdd/setup.sh create mode 100644 test/integration/submoduleAdd/test.json create mode 100644 test/integration/submoduleEnter/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/submoduleEnter/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/config create mode 100644 test/integration/submoduleEnter/expected/.git_keep/description create mode 100644 test/integration/submoduleEnter/expected/.git_keep/index create mode 100644 test/integration/submoduleEnter/expected/.git_keep/info/exclude create mode 100644 test/integration/submoduleEnter/expected/.git_keep/logs/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/ORIG_HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/config create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/description create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/index create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/info/exclude create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/heads/master create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/96/c588f28aac5a8ebd6430526697e82e46b3180c create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/packed-refs create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/heads/master create mode 100644 test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/10/7f435787895be1068f01326df55c355a9d29b1 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/59/a9aee220657762e2d1c60799a0f5b03137d906 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/96/c588f28aac5a8ebd6430526697e82e46b3180c create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/c8/3cc777cf98a8c0f3c0995d7c1b21db92a71c66 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/e1/eb418c0ff98940d4ea817eebcff5dcdde645ce create mode 100644 test/integration/submoduleEnter/expected/.git_keep/objects/fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 create mode 100644 test/integration/submoduleEnter/expected/.git_keep/refs/heads/master create mode 100644 test/integration/submoduleEnter/expected/.gitmodules_keep create mode 100644 test/integration/submoduleEnter/expected/myfile1 create mode 100644 test/integration/submoduleEnter/expected/myfile2 create mode 100644 test/integration/submoduleEnter/expected/myfile3 create mode 100644 test/integration/submoduleEnter/expected/other_repo/.git_keep create mode 100644 test/integration/submoduleEnter/expected/other_repo/myfile1 create mode 100644 test/integration/submoduleEnter/recording.json create mode 100644 test/integration/submoduleEnter/setup.sh create mode 100644 test/integration/submoduleEnter/test.json create mode 100644 test/integration/submoduleRemove/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/submoduleRemove/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/submoduleRemove/expected/.git_keep/HEAD create mode 100644 test/integration/submoduleRemove/expected/.git_keep/config create mode 100644 test/integration/submoduleRemove/expected/.git_keep/description create mode 100644 test/integration/submoduleRemove/expected/.git_keep/index create mode 100644 test/integration/submoduleRemove/expected/.git_keep/info/exclude create mode 100644 test/integration/submoduleRemove/expected/.git_keep/logs/HEAD create mode 100644 test/integration/submoduleRemove/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/2e/eb2c1e6451d1318b506eecddf936b59a5f32b8 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/40/f121d7563ed318d461996b8d84e2ec8632687e create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/9d/10a5a0a21eb2cfdb6206f474ed57fd5cd51440 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 create mode 100644 test/integration/submoduleRemove/expected/.git_keep/objects/f1/43043bb53b17b5727a43b6cfbb1a8d1f5a222d create mode 100644 test/integration/submoduleRemove/expected/.git_keep/refs/heads/master create mode 100644 test/integration/submoduleRemove/expected/.gitmodules_keep create mode 100644 test/integration/submoduleRemove/expected/myfile1 create mode 100644 test/integration/submoduleRemove/expected/myfile2 create mode 100644 test/integration/submoduleRemove/recording.json create mode 100644 test/integration/submoduleRemove/setup.sh create mode 100644 test/integration/submoduleRemove/test.json create mode 100644 test/integration/submoduleReset/config/config.yml create mode 100644 test/integration/submoduleReset/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/submoduleReset/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/config create mode 100644 test/integration/submoduleReset/expected/.git_keep/description create mode 100644 test/integration/submoduleReset/expected/.git_keep/index create mode 100644 test/integration/submoduleReset/expected/.git_keep/info/exclude create mode 100644 test/integration/submoduleReset/expected/.git_keep/logs/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/ORIG_HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/config create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/description create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/index create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/info/exclude create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/heads/master create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/stash create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/17/defcd0e1f9ad96542aa66845e53cb46c91c30d create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/5a/d28e22767f979da2c198dc6c1003b25964e3da create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/84/69b6d9b0a33be075f9e0df61c5a3ebba3ecfd2 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/9d/13001fc1d98cd178f9e604f6f2c2e52794079e create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/f3/5aba17e85e3fe18f7b01c0f65306c9289c482e create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/packed-refs create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/heads/master create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD create mode 100644 test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/stash create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/2e/eb2c1e6451d1318b506eecddf936b59a5f32b8 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/9d/10a5a0a21eb2cfdb6206f474ed57fd5cd51440 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/submoduleReset/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/submoduleReset/expected/.git_keep/refs/heads/master create mode 100644 test/integration/submoduleReset/expected/.gitmodules_keep create mode 100644 test/integration/submoduleReset/expected/myfile1 create mode 100644 test/integration/submoduleReset/expected/myfile2 create mode 100644 test/integration/submoduleReset/expected/other_repo/.git_keep create mode 100644 test/integration/submoduleReset/expected/other_repo/myfile1 create mode 100644 test/integration/submoduleReset/expected/other_repo/myfile2 create mode 100644 test/integration/submoduleReset/recording.json create mode 100644 test/integration/submoduleReset/setup.sh create mode 100644 test/integration/submoduleReset/test.json diff --git a/.gitignore b/.gitignore index 0e905b107..84258eeee 100644 --- a/.gitignore +++ b/.gitignore @@ -18,19 +18,21 @@ coverage.txt # Binaries lazygit +lazygit.exe # Exceptions !.gitignore !.goreleaser.yml !.circleci/ !.github/ +# these are for our integration tests +!.git_keep +!.gitmodules_keep test/git_server/data test/integration/*/actual/ test/integration/*/actual_remote/ test/integration/*/used_config/ # these sample hooks waste too much space -test/integration/*/expected/.git_keep/hooks/ -test/integration/*/expected_remote/hooks/ -!.git_keep/ -lazygit.exe +test/integration/*/expected/**/hooks/ +test/integration/*/expected_remote/**/hooks/ diff --git a/pkg/integration/integration.go b/pkg/integration/integration.go index 1158fa85f..542624a6f 100644 --- a/pkg/integration/integration.go +++ b/pkg/integration/integration.go @@ -101,6 +101,7 @@ func RunTests( expectedRepoDir := filepath.Join(testPath, "expected") actualRemoteDir := filepath.Join(testPath, "actual_remote") expectedRemoteDir := filepath.Join(testPath, "expected_remote") + otherRepoDir := filepath.Join(testPath, "other_repo") logf("path: %s", testPath) for i, speed := range speeds { @@ -110,7 +111,8 @@ func RunTests( findOrCreateDir(testPath) prepareIntegrationTestDir(actualRepoDir) - removeRemoteDir(actualRemoteDir) + removeDir(otherRepoDir) + removeDir(actualRemoteDir) err := createFixture(testPath, actualRepoDir) if err != nil { return err @@ -128,16 +130,21 @@ func RunTests( return err } + // submodule tests currently make use of a repo called 'other_repo' but we don't want that + // to stick around. Long-term we should have an 'actual' folder which itself contains + // repos, and there we can put the 'repo' repo which is the main one, alongside + // any others that we use as part of the test (including remotes). Then we'll do snapshots for + // each of them. + removeDir(otherRepoDir) + if mode == UPDATE_SNAPSHOT || mode == RECORD { + // create/update snapshot err = oscommands.CopyDir(actualRepoDir, expectedRepoDir) if err != nil { return err } - err = os.Rename( - filepath.Join(expectedRepoDir, ".git"), - filepath.Join(expectedRepoDir, ".git_keep"), - ) - if err != nil { + + if err := renameGitDirs(expectedRepoDir); err != nil { return err } @@ -148,11 +155,12 @@ func RunTests( return err } } else { - removeRemoteDir(expectedRemoteDir) + removeDir(expectedRemoteDir) } - } - if mode != SANDBOX { + logf("%s", "updated snapshot") + } else { + // compare result to snapshot actualRepo, expectedRepo, err := generateSnapshots(actualRepoDir, expectedRepoDir) if err != nil { return err @@ -174,7 +182,7 @@ func RunTests( break } - // if the snapshots and we haven't tried all playback speeds different we'll retry at a slower speed + // if the snapshot doesn't match and we haven't tried all playback speeds different we'll retry at a slower speed if i == len(speeds)-1 { // get the log file and print that bytes, err := ioutil.ReadFile(filepath.Join(configDir, "development.log")) @@ -198,7 +206,7 @@ func RunTests( return nil } -func removeRemoteDir(dir string) { +func removeDir(dir string) { err := os.RemoveAll(dir) if err != nil { panic(err) @@ -334,6 +342,10 @@ func findOrCreateDir(path string) { } } +// note that we don't actually store this snapshot in the lazygit repo. +// Instead we store the whole expected git repo of our test, so that +// we can easily change what we want to compare without needing to regenerate +// snapshots for each test. func generateSnapshot(dir string) (string, error) { osCommand := oscommands.NewDummyOSCommand() @@ -345,18 +357,24 @@ func generateSnapshot(dir string) (string, error) { snapshot := "" cmdStrs := []string{ - fmt.Sprintf(`git -C %s status`, dir), // file tree - fmt.Sprintf(`git -C %s log --pretty=%%B -p -1`, dir), // log - fmt.Sprintf(`git -C %s tag -n`, dir), // tags + `status`, // file tree + `log --pretty=%B -p -1`, // log + `tag -n`, // tags + `stash list`, // stash + `submodule foreach 'git status'`, // submodule status + `submodule foreach 'git log --pretty=%B -p -1'`, // submodule log + `submodule foreach 'git tag -n'`, // submodule tags + `submodule foreach 'git stash list'`, // submodule stash } for _, cmdStr := range cmdStrs { // ignoring error for now. If there's an error it could be that there are no results - output, _ := osCommand.Cmd.New(cmdStr).RunWithOutput() + output, _ := osCommand.Cmd.New(fmt.Sprintf("git -C %s %s", dir, cmdStr)).RunWithOutput() - snapshot += output + "\n" + snapshot += fmt.Sprintf("git %s:\n%s\n", cmdStr, output) } + snapshot += "files in repo:\n" err = filepath.Walk(dir, func(path string, f os.FileInfo, err error) error { if err != nil { return err @@ -373,7 +391,12 @@ func generateSnapshot(dir string) (string, error) { if err != nil { return err } - snapshot += string(bytes) + "\n" + + relativePath, err := filepath.Rel(dir, path) + if err != nil { + return err + } + snapshot += fmt.Sprintf("path: %s\ncontent:\n%s\n", relativePath, string(bytes)) return nil }) @@ -391,24 +414,15 @@ func generateSnapshots(actualDir string, expectedDir string) (string, string, er return "", "", err } - // git refuses to track .git folders in subdirectories so we need to rename it - // to git_keep after running a test, and then change it back again defer func() { - err = os.Rename( - filepath.Join(expectedDir, ".git"), - filepath.Join(expectedDir, ".git_keep"), - ) - - if err != nil { + if err := renameGitDirs(expectedDir); err != nil { panic(err) } }() - // ignoring this error because we might not have a .git_keep file here yet. - _ = os.Rename( - filepath.Join(expectedDir, ".git_keep"), - filepath.Join(expectedDir, ".git"), - ) + if err := restoreGitDirs(expectedDir); err != nil { + return "", "", err + } expected, err := generateSnapshot(expectedDir) if err != nil { @@ -418,6 +432,57 @@ func generateSnapshots(actualDir string, expectedDir string) (string, string, er return actual, expected, nil } +func getPathsToRename(dir string, needle string) []string { + pathsToRename := []string{} + + err := filepath.Walk(dir, func(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } + + if f.Name() == needle { + pathsToRename = append(pathsToRename, path) + } + + return nil + }) + if err != nil { + panic(err) + } + + return pathsToRename +} + +// Git refuses to track .git and .gitmodules folders in subdirectories so we need to rename it +// to git_keep after running a test, and then change it back again +var untrackedGitDirs []string = []string{".git", ".gitmodules"} + +func renameGitDirs(dir string) error { + for _, untrackedGitDir := range untrackedGitDirs { + for _, path := range getPathsToRename(dir, untrackedGitDir) { + err := os.Rename(path, path+"_keep") + if err != nil { + return err + } + } + } + + return nil +} + +func restoreGitDirs(dir string) error { + for _, untrackedGitDir := range untrackedGitDirs { + for _, path := range getPathsToRename(dir, untrackedGitDir+"_keep") { + err := os.Rename(path, strings.TrimSuffix(path, "_keep")) + if err != nil { + return err + } + } + } + + return nil +} + func generateSnapshotsForRemote(actualDir string, expectedDir string) (string, string, error) { actual, err := generateSnapshot(actualDir) if err != nil { diff --git a/test/integration/submoduleAdd/expected/.git_keep/COMMIT_EDITMSG b/test/integration/submoduleAdd/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +test diff --git a/test/integration/submoduleAdd/expected/.git_keep/FETCH_HEAD b/test/integration/submoduleAdd/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/submoduleAdd/expected/.git_keep/HEAD b/test/integration/submoduleAdd/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleAdd/expected/.git_keep/config b/test/integration/submoduleAdd/expected/.git_keep/config new file mode 100644 index 000000000..3770f8692 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/config @@ -0,0 +1,13 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[submodule "blah"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/other_repo + active = true diff --git a/test/integration/submoduleAdd/expected/.git_keep/description b/test/integration/submoduleAdd/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleAdd/expected/.git_keep/index b/test/integration/submoduleAdd/expected/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..df11fba0b9af4c95044b852493ac09cea65c6c90 GIT binary patch literal 361 zcmZ?q402{*U|<4bmc-AGt_pMgYy#7q4grh|46ICg^SKxp8kaCIFn$H95dmV;on;B@ z|5UQ1Y~Z>QQ`okmNx8TDHv_j`dS*#(eoARhYB5j|2!PBH{Jr-WjE0yu?;r!i1E4J2 zyai6dd^2))r?%JKxF)mUgxC|+r^oadSTYhb5<#Yb%{j%gYT;v`Iba%UjxU$;NEM<2tGr8cMI;v(y6sIeC9~ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/info/exclude b/test/integration/submoduleAdd/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# 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/submoduleAdd/expected/.git_keep/logs/HEAD b/test/integration/submoduleAdd/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..df53976dc --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/logs/HEAD @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 6de70e35394a99cc437d1bc70b0852b70c5bb03d CI 1617797593 +1000 commit: test diff --git a/test/integration/submoduleAdd/expected/.git_keep/logs/refs/heads/master b/test/integration/submoduleAdd/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..df53976dc --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 6de70e35394a99cc437d1bc70b0852b70c5bb03d CI 1617797593 +1000 commit: test diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/HEAD b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/config b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/config new file mode 100644 index 000000000..91988eba6 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/config @@ -0,0 +1,14 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true + worktree = ../../../haha +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/other_repo + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/description b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/index b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/index new file mode 100644 index 0000000000000000000000000000000000000000..64a52c7819f377d676bb6dfa9f27a79ee27ac911 GIT binary patch literal 209 zcmZ?q402{*U|<5_#Lthe3VtiEhS7`+46ICg^H~`f8kaCIFn$H95dmVhrF$O#RZYF| zB_cG6C*SEpfLBZRRR;Fl%CyX!R70Qwu>OC_3t%+V95!@wBzS%pH7M;n_j1*u@T&fn zSK9L})M4fr0nG^sa&-k#k_<))23*Tcq#{4uefKl-+5By0O=*|3`BlW6vL>8hd4AJp R`(*7K4)Z>2uH)U*4*)5uOJe{4 literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/info/exclude b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/info/exclude @@ -0,0 +1,7 @@ +# 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/submoduleAdd/expected/.git_keep/modules/blah/logs/HEAD b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/HEAD new file mode 100644 index 000000000..0ed3aba82 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1617797593 +1000 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/other_repo diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/heads/master b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/heads/master new file mode 100644 index 000000000..0ed3aba82 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1617797593 +1000 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/other_repo diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/remotes/origin/HEAD b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/remotes/origin/HEAD new file mode 100644 index 000000000..0ed3aba82 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1617797593 +1000 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/other_repo diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPu`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/packed-refs b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/packed-refs new file mode 100644 index 000000000..2991aad64 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +42530e986dbb65877ed8d61ca0c816e425e5c62e refs/remotes/origin/master diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/heads/master b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/heads/master new file mode 100644 index 000000000..a70ff80c0 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/heads/master @@ -0,0 +1 @@ +42530e986dbb65877ed8d61ca0c816e425e5c62e diff --git a/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/remotes/origin/HEAD b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/remotes/origin/HEAD new file mode 100644 index 000000000..6efe28fff --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/modules/blah/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleAdd/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleAdd/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPu7F=Q|_FfcPQQP4}zEXmDJDa}bOX4qMlu>MaaOUeeWD=~#_ zE1Hyh%YPf1832JoMq)-HgHtfyjNIL+?R7V<$t*Y__C)pRF+Hd;xs_>|IjM#WOZPnf ytD1V_OGIcCPrlQI0I!zrt0+p07$kUp7&R#EJNI(cqVTHzmRH*IEz|+MIXjmQ#zA-h literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/6d/e70e35394a99cc437d1bc70b0852b70c5bb03d b/test/integration/submoduleAdd/expected/.git_keep/objects/6d/e70e35394a99cc437d1bc70b0852b70c5bb03d new file mode 100644 index 0000000000000000000000000000000000000000..8545bdc31607a28527cb075992e07a7a1ae89957 GIT binary patch literal 146 zcmV;D0B!$x0gaA93c@fD06pgwxeKzJG`k6i2tD-~o6U-XwWUVz`SuB3XXY@v%=4pr zEO_XfnNK(7Ta6TgAjHHu2scp$Rl#7y0}$0>Zk5em-47u}u#&0ON+~m2%Z*S4G$Yxr zEhz literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleAdd/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleAdd/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleAdd/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleAdd/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleAdd/expected/.git_keep/objects/b9/7660affc790464b00ad45c7186a882238d77fb b/test/integration/submoduleAdd/expected/.git_keep/objects/b9/7660affc790464b00ad45c7186a882238d77fb new file mode 100644 index 0000000000000000000000000000000000000000..c4d570c9dfb86a4f2c3724727b92592c87badd56 GIT binary patch literal 67 zcmV-J0KETr0ZYosPf{>7W{55>P0GzrDa}b$P)f>4%utHu;w(rk$xyIW$Vkjc myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual other_repo +cd actual diff --git a/test/integration/submoduleAdd/test.json b/test/integration/submoduleAdd/test.json new file mode 100644 index 000000000..d937c5747 --- /dev/null +++ b/test/integration/submoduleAdd/test.json @@ -0,0 +1,4 @@ +{ + "description": "Add submodule", + "speed": 5 +} diff --git a/test/integration/submoduleEnter/expected/.git_keep/COMMIT_EDITMSG b/test/integration/submoduleEnter/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +test diff --git a/test/integration/submoduleEnter/expected/.git_keep/FETCH_HEAD b/test/integration/submoduleEnter/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/submoduleEnter/expected/.git_keep/HEAD b/test/integration/submoduleEnter/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/config b/test/integration/submoduleEnter/expected/.git_keep/config new file mode 100644 index 000000000..6806f15bd --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/config @@ -0,0 +1,13 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[submodule "other_repo"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/other_repo + active = true diff --git a/test/integration/submoduleEnter/expected/.git_keep/description b/test/integration/submoduleEnter/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleEnter/expected/.git_keep/index b/test/integration/submoduleEnter/expected/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..588f5146039f0fec5f015f8205bca91ab9059906 GIT binary patch literal 441 zcmZ?q402{*U|<4b*2K>@nM7n-W5Kl4r*n)zF($pncm{^XB@7IVUx8{wfY?#H%_)4p zuIJiaH!4CMZUh)C;|TiCz^#{_S(2NdQks)m3{(UHAagi0*acxU#Jq;(Xy&mk-Shab zYU+(I5us5$`A!!Cyjr@iGO*`Xre)@&8bZzCw7fM7WDbainzI+(90{HuMh!~)&b?f< zD7>n_<(2k)3w4+|Mo@FOWU_5R=74CZIp;_*#~5M`t67=3I?x<24Gkwj28IVfS$H@# zEaeJREo)$0{7TLKcg^}ePErAl!3w!m?{`>3Di4> qw|7QAWb0=%%KaK+8Z}pQqxkDWx$5+%iPBs1B7S}0+nQ+`FcAQ24u?Dd literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/info/exclude b/test/integration/submoduleEnter/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# 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/submoduleEnter/expected/.git_keep/logs/HEAD b/test/integration/submoduleEnter/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..123fc35c9 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 CI 1534792759 +0100 commit: myfile3 +fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 e1eb418c0ff98940d4ea817eebcff5dcdde645ce CI 1534792759 +0100 commit: add submodule +e1eb418c0ff98940d4ea817eebcff5dcdde645ce c83cc777cf98a8c0f3c0995d7c1b21db92a71c66 CI 1643370762 +1100 commit: test diff --git a/test/integration/submoduleEnter/expected/.git_keep/logs/refs/heads/master b/test/integration/submoduleEnter/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..123fc35c9 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 CI 1534792759 +0100 commit: myfile3 +fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 e1eb418c0ff98940d4ea817eebcff5dcdde645ce CI 1534792759 +0100 commit: add submodule +e1eb418c0ff98940d4ea817eebcff5dcdde645ce c83cc777cf98a8c0f3c0995d7c1b21db92a71c66 CI 1643370762 +1100 commit: test diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/HEAD b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/ORIG_HEAD b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/ORIG_HEAD new file mode 100644 index 000000000..a70ff80c0 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/ORIG_HEAD @@ -0,0 +1 @@ +42530e986dbb65877ed8d61ca0c816e425e5c62e diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/config b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/config new file mode 100644 index 000000000..153285317 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/config @@ -0,0 +1,14 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true + worktree = ../../../other_repo +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/other_repo + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/description b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/index b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/index new file mode 100644 index 0000000000000000000000000000000000000000..385fd7bf9e3555e620b899380041dca2a72442f0 GIT binary patch literal 137 zcmZ?q402{*U|<4b#>CGznS^Z}Q(!bB0|P6QUSlK!L*o*l^jDx75g=w;y65p<)zlkb zB0{5h@|`XOc(rt2Wnj;(Ov}tkH3TXM337D>Qj!dY3I<$!IUkm7pV#a1u!tdVB e*ZkK6ZPJQ=U3 literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/info/exclude b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/info/exclude @@ -0,0 +1,7 @@ +# 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/submoduleEnter/expected/.git_keep/modules/other_repo/logs/HEAD b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/HEAD new file mode 100644 index 000000000..149d30cef --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/other_repo +fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1643370757 +1100 rebase -i (start): checkout 42530e986dbb65877ed8d61ca0c816e425e5c62e +42530e986dbb65877ed8d61ca0c816e425e5c62e 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1643370757 +1100 rebase -i (finish): returning to refs/heads/master +42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370757 +1100 rebase -i (start): checkout a50a5125768001a3ea263ffb7cafbc421a508153 +a50a5125768001a3ea263ffb7cafbc421a508153 a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370757 +1100 rebase -i (finish): returning to refs/heads/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/heads/master b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/heads/master new file mode 100644 index 000000000..b88258014 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/other_repo +fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1643370757 +1100 rebase -i (finish): refs/heads/master onto 42530e986dbb65877ed8d61ca0c816e425e5c62e +42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370757 +1100 rebase -i (finish): refs/heads/master onto a50a5125768001a3ea263ffb7cafbc421a508153 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD new file mode 100644 index 000000000..d08b838c1 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/other_repo diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPu7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB pbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQn@h5&(QbEOn@fC6WLD literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 new file mode 100644 index 000000000..95d1a3bc9 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/objects/fc/4712e93d74ad4fb68e2fd219ac253ae03e19a4 @@ -0,0 +1,2 @@ +xK +0@] L&PDH&S,4z{{㭵k¥":!(gLR*o!($` =:8Fa-bJ-gdQN-Dwn'=C>xkwm\NzNu3W;/x9 \ No newline at end of file diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/packed-refs b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/packed-refs new file mode 100644 index 000000000..ef4e386a6 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 refs/remotes/origin/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/heads/master b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/heads/master new file mode 100644 index 000000000..ab99dc85b --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/heads/master @@ -0,0 +1 @@ +a50a5125768001a3ea263ffb7cafbc421a508153 diff --git a/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD new file mode 100644 index 000000000..6efe28fff --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleEnter/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmbGp0V^p=O;s?oFk&z?FfcPQQP4}zEXmDJDa}bOX3%bP3g55mxpvo$icp6e z0S3!Bg8oC5VvJphnE?~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff b/test/integration/submoduleEnter/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff new file mode 100644 index 0000000000000000000000000000000000000000..5bfb0cefc3370964e04c1d101231d7a71600af5a GIT binary patch literal 62 zcmV-E0Kxxw0ZYosPf{>5Wr!{=P0GzrDa}b$P|7dKNG*ylN-fA&isj-gNG!=vuvI_^ Ua&eXxL*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPuVvJphnE?7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB pbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQn@h5&(QbEOn@fC6WLD literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleEnter/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleEnter/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleEnter/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/c8/3cc777cf98a8c0f3c0995d7c1b21db92a71c66 b/test/integration/submoduleEnter/expected/.git_keep/objects/c8/3cc777cf98a8c0f3c0995d7c1b21db92a71c66 new file mode 100644 index 000000000..7da492489 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/objects/c8/3cc777cf98a8c0f3c0995d7c1b21db92a71c66 @@ -0,0 +1,2 @@ +xK +0FaYE".#?([jo NYz ͑c4oֈ>D`r&RHu՚6#[Z!Z)riMjJJq_6}6_M}}T~1HuP?"9 \ No newline at end of file diff --git a/test/integration/submoduleEnter/expected/.git_keep/objects/e1/eb418c0ff98940d4ea817eebcff5dcdde645ce b/test/integration/submoduleEnter/expected/.git_keep/objects/e1/eb418c0ff98940d4ea817eebcff5dcdde645ce new file mode 100644 index 000000000..9a2e552b8 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/objects/e1/eb418c0ff98940d4ea817eebcff5dcdde645ce @@ -0,0 +1,4 @@ +xK +0@]d29 "tcL +-5ox^7U,,DCJ` :RafMjɒ+KuWZȲd +Nl0pƇ~^`)3ZDsc럹ROm)xkwm\NzNu3W;/x9 \ No newline at end of file diff --git a/test/integration/submoduleEnter/expected/.git_keep/refs/heads/master b/test/integration/submoduleEnter/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..d109221f5 --- /dev/null +++ b/test/integration/submoduleEnter/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +c83cc777cf98a8c0f3c0995d7c1b21db92a71c66 diff --git a/test/integration/submoduleEnter/expected/.gitmodules_keep b/test/integration/submoduleEnter/expected/.gitmodules_keep new file mode 100644 index 000000000..2b864257b --- /dev/null +++ b/test/integration/submoduleEnter/expected/.gitmodules_keep @@ -0,0 +1,3 @@ +[submodule "other_repo"] + path = other_repo + url = ../other_repo diff --git a/test/integration/submoduleEnter/expected/myfile1 b/test/integration/submoduleEnter/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/submoduleEnter/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/submoduleEnter/expected/myfile2 b/test/integration/submoduleEnter/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/submoduleEnter/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/submoduleEnter/expected/myfile3 b/test/integration/submoduleEnter/expected/myfile3 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/submoduleEnter/expected/myfile3 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/submoduleEnter/expected/other_repo/.git_keep b/test/integration/submoduleEnter/expected/other_repo/.git_keep new file mode 100644 index 000000000..32e5ae2e6 --- /dev/null +++ b/test/integration/submoduleEnter/expected/other_repo/.git_keep @@ -0,0 +1 @@ +gitdir: ../.git/modules/other_repo diff --git a/test/integration/submoduleEnter/expected/other_repo/myfile1 b/test/integration/submoduleEnter/expected/other_repo/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/submoduleEnter/expected/other_repo/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/submoduleEnter/recording.json b/test/integration/submoduleEnter/recording.json new file mode 100644 index 000000000..568b008b0 --- /dev/null +++ b/test/integration/submoduleEnter/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":737,"Mod":0,"Key":256,"Ch":93},{"Timestamp":1306,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1937,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2162,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2462,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2687,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3049,"Mod":0,"Key":256,"Ch":100},{"Timestamp":3242,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3862,"Mod":0,"Key":27,"Ch":0},{"Timestamp":5177,"Mod":0,"Key":256,"Ch":91},{"Timestamp":6272,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6752,"Mod":0,"Key":256,"Ch":99},{"Timestamp":7007,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7051,"Mod":0,"Key":256,"Ch":101},{"Timestamp":7232,"Mod":0,"Key":256,"Ch":115},{"Timestamp":7276,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7547,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8251,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/submoduleEnter/setup.sh b/test/integration/submoduleEnter/setup.sh new file mode 100644 index 000000000..2f876d8ae --- /dev/null +++ b/test/integration/submoduleEnter/setup.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +cd $1 + +export GIT_COMMITTER_DATE="Mon 20 Aug 2018 20:19:19 BST" +export GIT_AUTHOR_DATE="Mon 20 Aug 2018 20:19:19 BST" + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test2 > myfile3 +git add . +git commit -am "myfile3" + +cd .. +git clone --bare ./actual other_repo +cd actual + +git submodule add ../other_repo +git commit -am "add submodule" diff --git a/test/integration/submoduleEnter/test.json b/test/integration/submoduleEnter/test.json new file mode 100644 index 000000000..7bc6ff8ba --- /dev/null +++ b/test/integration/submoduleEnter/test.json @@ -0,0 +1,4 @@ +{ + "description": "Add submodule and enter. We enter the submodule, remove a couple of commits, and then stage the change in the parent repo", + "speed": 5 +} diff --git a/test/integration/submoduleRemove/expected/.git_keep/COMMIT_EDITMSG b/test/integration/submoduleRemove/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..5b256d7d3 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +remove submodule diff --git a/test/integration/submoduleRemove/expected/.git_keep/FETCH_HEAD b/test/integration/submoduleRemove/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/submoduleRemove/expected/.git_keep/HEAD b/test/integration/submoduleRemove/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleRemove/expected/.git_keep/config b/test/integration/submoduleRemove/expected/.git_keep/config new file mode 100644 index 000000000..8ae104545 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/config @@ -0,0 +1,10 @@ +[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/submoduleRemove/expected/.git_keep/description b/test/integration/submoduleRemove/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleRemove/expected/.git_keep/index b/test/integration/submoduleRemove/expected/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..5a4c6431fdeca689a0b38b53cba6900fe096d8b0 GIT binary patch literal 289 zcmZ?q402{*U|<4b=ETo8h4_*kOTctORUab*11pnWvor%k;}Ql2#;-s%B0$XWZ0@7k zn=W2+_U_hPR~~ia(376vi45F&>6s7)C?PYl=ZLk8SCm z$A48*Z+wXejpE67x)9*i(tVYIJ-0F~Gbhy$YK~O}YaYlP5Dhh_2;CeBo*zaHO8d^e zT(u~?s=wux_IwL#f$}TZ^ikx1HZD)hi#Rq 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 CI 1534792759 +0100 commit: add submodule +9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 40f121d7563ed318d461996b8d84e2ec8632687e CI 1643370773 +1100 commit: remove submodule diff --git a/test/integration/submoduleRemove/expected/.git_keep/logs/refs/heads/master b/test/integration/submoduleRemove/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..a38da0237 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 CI 1534792759 +0100 commit: add submodule +9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 40f121d7563ed318d461996b8d84e2ec8632687e CI 1643370773 +1100 commit: remove submodule diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleRemove/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff b/test/integration/submoduleRemove/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff new file mode 100644 index 0000000000000000000000000000000000000000..5bfb0cefc3370964e04c1d101231d7a71600af5a GIT binary patch literal 62 zcmV-E0Kxxw0ZYosPf{>5Wr!{=P0GzrDa}b$P|7dKNG*ylN-fA&isj-gNG!=vuvI_^ Ua&eXx7F=sF|FfcPQQP4}zEXmDJDa}bOX3%bP3g55mxpvo$icp6e z0S3!Bg8oC5eFL-0IJ$O E95viYm;e9( literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/40/f121d7563ed318d461996b8d84e2ec8632687e b/test/integration/submoduleRemove/expected/.git_keep/objects/40/f121d7563ed318d461996b8d84e2ec8632687e new file mode 100644 index 000000000..3fed8203a --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/objects/40/f121d7563ed318d461996b8d84e2ec8632687e @@ -0,0 +1,2 @@ +xK +0@] 2U1LPhLx|{/ZCEtAgYfo#h"RaF:g,1Y5%#' &@(.:>S(ƣu=:wR]9Vo6BVn!Kmk"!>] \ No newline at end of file diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleRemove/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPuf02NDxmYnG(q3 z(BR@NRNDKaZF-vZb(-(^rni2Ozo33# G*F5F}&`WRt literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleRemove/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleRemove/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleRemove/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/test/integration/submoduleRemove/expected/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 new file mode 100644 index 0000000000000000000000000000000000000000..711223894375fe1186ac5bfffdc48fb1fa1e65cc GIT binary patch literal 15 Wcmb7uw*baFfcPQQP4}zEXmDJDa}bOW_ULD(dKa3ib_MLmV TYEgJqf6FWF`4;K`*qtzo-d;0c literal 0 HcmV?d00001 diff --git a/test/integration/submoduleRemove/expected/.git_keep/refs/heads/master b/test/integration/submoduleRemove/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..0c4653c44 --- /dev/null +++ b/test/integration/submoduleRemove/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +40f121d7563ed318d461996b8d84e2ec8632687e diff --git a/test/integration/submoduleRemove/expected/.gitmodules_keep b/test/integration/submoduleRemove/expected/.gitmodules_keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/submoduleRemove/expected/myfile1 b/test/integration/submoduleRemove/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/submoduleRemove/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/submoduleRemove/expected/myfile2 b/test/integration/submoduleRemove/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/submoduleRemove/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/submoduleRemove/recording.json b/test/integration/submoduleRemove/recording.json new file mode 100644 index 000000000..ad22a348d --- /dev/null +++ b/test/integration/submoduleRemove/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":912,"Mod":0,"Key":256,"Ch":93},{"Timestamp":1280,"Mod":0,"Key":256,"Ch":100},{"Timestamp":1696,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2544,"Mod":0,"Key":256,"Ch":91},{"Timestamp":2984,"Mod":0,"Key":256,"Ch":99},{"Timestamp":3680,"Mod":0,"Key":256,"Ch":114},{"Timestamp":3736,"Mod":0,"Key":256,"Ch":101},{"Timestamp":3824,"Mod":0,"Key":256,"Ch":109},{"Timestamp":3872,"Mod":0,"Key":256,"Ch":111},{"Timestamp":3944,"Mod":0,"Key":256,"Ch":118},{"Timestamp":3976,"Mod":0,"Key":256,"Ch":101},{"Timestamp":4064,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4152,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4248,"Mod":0,"Key":256,"Ch":117},{"Timestamp":4320,"Mod":0,"Key":256,"Ch":98},{"Timestamp":4560,"Mod":0,"Key":256,"Ch":109},{"Timestamp":4632,"Mod":0,"Key":256,"Ch":111},{"Timestamp":4720,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4824,"Mod":0,"Key":256,"Ch":117},{"Timestamp":4880,"Mod":0,"Key":256,"Ch":108},{"Timestamp":4944,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5152,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5648,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/submoduleRemove/setup.sh b/test/integration/submoduleRemove/setup.sh new file mode 100644 index 000000000..250092ed1 --- /dev/null +++ b/test/integration/submoduleRemove/setup.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +cd $1 + +export GIT_COMMITTER_DATE="Mon 20 Aug 2018 20:19:19 BST" +export GIT_AUTHOR_DATE="Mon 20 Aug 2018 20:19:19 BST" + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual other_repo +cd actual + +git submodule add ../other_repo +git commit -am "add submodule" diff --git a/test/integration/submoduleRemove/test.json b/test/integration/submoduleRemove/test.json new file mode 100644 index 000000000..87daa5360 --- /dev/null +++ b/test/integration/submoduleRemove/test.json @@ -0,0 +1,4 @@ +{ + "description": "Remove a submodule", + "speed": 20 +} diff --git a/test/integration/submoduleReset/config/config.yml b/test/integration/submoduleReset/config/config.yml new file mode 100644 index 000000000..991cda34b --- /dev/null +++ b/test/integration/submoduleReset/config/config.yml @@ -0,0 +1,6 @@ +disableStartupPopups: true +customCommands: + - key: 'N' + description: 'Add file' + context: 'files' + command: 'echo "haha" > output.txt' diff --git a/test/integration/submoduleReset/expected/.git_keep/COMMIT_EDITMSG b/test/integration/submoduleReset/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..ad3cdfdd1 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +add submodule diff --git a/test/integration/submoduleReset/expected/.git_keep/FETCH_HEAD b/test/integration/submoduleReset/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/submoduleReset/expected/.git_keep/HEAD b/test/integration/submoduleReset/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/submoduleReset/expected/.git_keep/config b/test/integration/submoduleReset/expected/.git_keep/config new file mode 100644 index 000000000..30e8aeba3 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/config @@ -0,0 +1,13 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[submodule "other_repo"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleReset/other_repo + active = true diff --git a/test/integration/submoduleReset/expected/.git_keep/description b/test/integration/submoduleReset/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleReset/expected/.git_keep/index b/test/integration/submoduleReset/expected/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..8997e61f4aa35ceae88a22eb2306ae0f9b6ef9f7 GIT binary patch literal 369 zcmZ?q402{*U|<4bmc-9Dr8(vrO#{=jkKANrU|?m^Yq4fvXk5a;!1xuYMg)i*wcDJ+ z_v?DD-F2fP)Zs>e!7`4Z{|wxE>6s9|60eNrk{xsV< eE8b{_^wiDIXWgpa9Qua&Th;HEd~;Xthynn)>V3!n literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/info/exclude b/test/integration/submoduleReset/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# 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/submoduleReset/expected/.git_keep/logs/HEAD b/test/integration/submoduleReset/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..d10fa88d0 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/logs/HEAD @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 CI 1534792759 +0100 commit: add submodule diff --git a/test/integration/submoduleReset/expected/.git_keep/logs/refs/heads/master b/test/integration/submoduleReset/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..d10fa88d0 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI 1534792759 +0100 commit (initial): myfile1 +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI 1534792759 +0100 commit: myfile2 +42530e986dbb65877ed8d61ca0c816e425e5c62e 9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 CI 1534792759 +0100 commit: add submodule diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/HEAD b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/HEAD new file mode 100644 index 000000000..a70ff80c0 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/HEAD @@ -0,0 +1 @@ +42530e986dbb65877ed8d61ca0c816e425e5c62e diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/ORIG_HEAD b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/ORIG_HEAD new file mode 100644 index 000000000..ab99dc85b --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/ORIG_HEAD @@ -0,0 +1 @@ +a50a5125768001a3ea263ffb7cafbc421a508153 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/config b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/config new file mode 100644 index 000000000..3ffcf6005 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/config @@ -0,0 +1,14 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true + worktree = ../../../other_repo +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleReset/other_repo + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/description b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/index b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/index new file mode 100644 index 0000000000000000000000000000000000000000..407447e940fe5eab5620e3c195015c3a7c53f2c6 GIT binary patch literal 209 zcmZ?q402{*U|<5_#LqXS+4pnA!e~YY2397$7BdEh#w834j9-CjM1YuW>7K`bRa0+# zi3pA2$#=RC;MLN7m4Q9CGA%PF)exuvs9#-Qrt}|-hMF@Q-5d#?A4UyI`_8>wwJ5x* zzvY$od<%7$IYvNpLV{dffs`bJk%9r&aucb@4|m`F%zQR~n^{xZC2f8cF 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleReset/other_repo +42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370783 +1100 rebase -i (start): checkout a50a5125768001a3ea263ffb7cafbc421a508153 +a50a5125768001a3ea263ffb7cafbc421a508153 a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370783 +1100 rebase -i (finish): returning to refs/heads/master +a50a5125768001a3ea263ffb7cafbc421a508153 a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370791 +1100 reset: moving to HEAD +a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1643370791 +1100 checkout: moving from master to 42530e986dbb65877ed8d61ca0c816e425e5c62e diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/heads/master b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/heads/master new file mode 100644 index 000000000..227bcfcb6 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/heads/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleReset/other_repo +42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield 1643370783 +1100 rebase -i (finish): refs/heads/master onto a50a5125768001a3ea263ffb7cafbc421a508153 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD new file mode 100644 index 000000000..c0c3c89d8 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleReset/other_repo diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/stash b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/stash new file mode 100644 index 000000000..4d43eb072 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/logs/refs/stash @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 f35aba17e85e3fe18f7b01c0f65306c9289c482e Jesse Duffield 1643370791 +1100 WIP on master: a50a512 myfile1 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmbAW-v4`Ff%bx$gNDv%t~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPuarAQ@vvp|eIeMAo+2uu;C()_3TY4B|mEj|Ip`GT0brTPcwgQ&q*- zJ5RCqy1`m#(I`P{xlJ=%cv%?EYmAA90EhdBL-_LPnkfxCKjkB!)k-<(I)p8vl%l3} fYT>^mB8`EcFpZFDsjmI+0pwRq1EY8Y_Fq&|V@Xvj literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/f3/5aba17e85e3fe18f7b01c0f65306c9289c482e b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/objects/f3/5aba17e85e3fe18f7b01c0f65306c9289c482e new file mode 100644 index 0000000000000000000000000000000000000000..e48c171846463bbbefcbbd33780bce241a522062 GIT binary patch literal 230 zcmVviWAO@BNh;cwHVHV2ZKyEpWF0-VZ(P gR~-7UlHvX3&8=s*(B7Nwum8B^+ooCJ2Z20q4GFez{{R30 literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/packed-refs b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/packed-refs new file mode 100644 index 000000000..2991aad64 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +42530e986dbb65877ed8d61ca0c816e425e5c62e refs/remotes/origin/master diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/heads/master b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/heads/master new file mode 100644 index 000000000..ab99dc85b --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/heads/master @@ -0,0 +1 @@ +a50a5125768001a3ea263ffb7cafbc421a508153 diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD new file mode 100644 index 000000000..6efe28fff --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/stash b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/stash new file mode 100644 index 000000000..4a83bf1dd --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/modules/other_repo/refs/stash @@ -0,0 +1 @@ +f35aba17e85e3fe18f7b01c0f65306c9289c482e diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/submoduleReset/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff b/test/integration/submoduleReset/expected/.git_keep/objects/2b/864257bf2d49adbad8785540d85030a60852ff new file mode 100644 index 0000000000000000000000000000000000000000..5bfb0cefc3370964e04c1d101231d7a71600af5a GIT binary patch literal 62 zcmV-E0Kxxw0ZYosPf{>5Wr!{=P0GzrDa}b$P|7dKNG*ylN-fA&isj-gNG!=vuvI_^ Ua&eXx7F=sF|FfcPQQP4}zEXmDJDa}bOX3%bP3g55mxpvo$icp6e z0S3!Bg8oC5eFL-0IJ$O E95viYm;e9( literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e b/test/integration/submoduleReset/expected/.git_keep/objects/42/530e986dbb65877ed8d61ca0c816e425e5c62e new file mode 100644 index 0000000000000000000000000000000000000000..64d20cb1ea175608a3e05acff298a97ed57eb7b6 GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fDMP26<*$Xn6B$Eb2gsyswNjrlDV@rvkw>L*{``_d7=dISY zS(n499U_*K4~}D2SQZh@l!dYu@-!gPf>=N?I5ImQ@@keNaC8_G4FHb4Fp^g-X=W{R zz}|wvMQ`}s9@}BZ$zI3lE+4M@Q!evXZ?@x*GNzdA861G=Yd_WGPuf02NDxmYnG(q3 z(BR@NRNDKaZF-vZb(-(^rni2Ozo33# G*F5F}&`WRt literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 b/test/integration/submoduleReset/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 new file mode 100644 index 000000000..5dd5f3236 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/objects/a5/0a5125768001a3ea263ffb7cafbc421a508153 @@ -0,0 +1,2 @@ +xM +0@sJ&N  I޾/ZHR%d"r@X<-4dG5?fxN(_& 6]פ˟\ճ5, \ No newline at end of file diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/submoduleReset/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 0000000000000000000000000000000000000000..285df3e5fbab12262e28d85e78af8a31cd0024c1 GIT binary patch literal 21 ccmb`~^A08nuUMF0Q* literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/submoduleReset/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 diff --git a/test/integration/submoduleReset/expected/.git_keep/refs/heads/master b/test/integration/submoduleReset/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..ad2d893d7 --- /dev/null +++ b/test/integration/submoduleReset/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +9d10a5a0a21eb2cfdb6206f474ed57fd5cd51440 diff --git a/test/integration/submoduleReset/expected/.gitmodules_keep b/test/integration/submoduleReset/expected/.gitmodules_keep new file mode 100644 index 000000000..2b864257b --- /dev/null +++ b/test/integration/submoduleReset/expected/.gitmodules_keep @@ -0,0 +1,3 @@ +[submodule "other_repo"] + path = other_repo + url = ../other_repo diff --git a/test/integration/submoduleReset/expected/myfile1 b/test/integration/submoduleReset/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/submoduleReset/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/submoduleReset/expected/myfile2 b/test/integration/submoduleReset/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/submoduleReset/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/submoduleReset/expected/other_repo/.git_keep b/test/integration/submoduleReset/expected/other_repo/.git_keep new file mode 100644 index 000000000..32e5ae2e6 --- /dev/null +++ b/test/integration/submoduleReset/expected/other_repo/.git_keep @@ -0,0 +1 @@ +gitdir: ../.git/modules/other_repo diff --git a/test/integration/submoduleReset/expected/other_repo/myfile1 b/test/integration/submoduleReset/expected/other_repo/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/submoduleReset/expected/other_repo/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/submoduleReset/expected/other_repo/myfile2 b/test/integration/submoduleReset/expected/other_repo/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/submoduleReset/expected/other_repo/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/submoduleReset/recording.json b/test/integration/submoduleReset/recording.json new file mode 100644 index 000000000..2b272d7f5 --- /dev/null +++ b/test/integration/submoduleReset/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":653,"Mod":0,"Key":256,"Ch":93},{"Timestamp":1685,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2749,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2893,"Mod":0,"Key":259,"Ch":0},{"Timestamp":3229,"Mod":0,"Key":256,"Ch":100},{"Timestamp":3661,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4069,"Mod":0,"Key":260,"Ch":0},{"Timestamp":4189,"Mod":0,"Key":260,"Ch":0},{"Timestamp":5180,"Mod":0,"Key":256,"Ch":78},{"Timestamp":6508,"Mod":0,"Key":256,"Ch":32},{"Timestamp":7311,"Mod":0,"Key":27,"Ch":0},{"Timestamp":8212,"Mod":0,"Key":256,"Ch":91},{"Timestamp":10268,"Mod":0,"Key":256,"Ch":100},{"Timestamp":12165,"Mod":0,"Key":13,"Ch":13},{"Timestamp":13741,"Mod":0,"Key":256,"Ch":93},{"Timestamp":14317,"Mod":0,"Key":13,"Ch":13},{"Timestamp":16645,"Mod":0,"Key":259,"Ch":0},{"Timestamp":16805,"Mod":0,"Key":259,"Ch":0},{"Timestamp":17005,"Mod":0,"Key":259,"Ch":0},{"Timestamp":18588,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/submoduleReset/setup.sh b/test/integration/submoduleReset/setup.sh new file mode 100644 index 000000000..250092ed1 --- /dev/null +++ b/test/integration/submoduleReset/setup.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +cd $1 + +export GIT_COMMITTER_DATE="Mon 20 Aug 2018 20:19:19 BST" +export GIT_AUTHOR_DATE="Mon 20 Aug 2018 20:19:19 BST" + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual other_repo +cd actual + +git submodule add ../other_repo +git commit -am "add submodule" diff --git a/test/integration/submoduleReset/test.json b/test/integration/submoduleReset/test.json new file mode 100644 index 000000000..ccac209e4 --- /dev/null +++ b/test/integration/submoduleReset/test.json @@ -0,0 +1,4 @@ +{ + "description": "After making some changes in a submodule, we reset the submodule from the parent repo", + "speed": 10 +}