From 76a1b501f270e15cca37a54f64dbbee41ce37648 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 13:51:45 +1100 Subject: [PATCH] migrate more force push tests --- .../sync/force_push_multiple_matching.go | 53 +++++++++++++ .../sync/force_push_multiple_upstream.go | 71 ++++++++++++++++++ pkg/integration/tests/tests_gen.go | 2 + .../expected/origin/HEAD | 1 - .../expected/origin/config | 8 -- .../expected/origin/description | 1 - .../expected/origin/info/exclude | 7 -- .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../7a/35f0bb6bd8dc18ae462465e51f02362ba6babe | 2 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../bd/739fb752ed02ccd49422196e31599c87ff90ad | Bin 149 -> 0 bytes .../ce/0848710343a75263ea72cb5bdfa666b9ecda68 | Bin 103 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../e6/7f344f42afdb79c87a590f22537160241d8d61 | Bin 150 -> 0 bytes .../fe/67c3eaf819025990d3688d5f147a064e669ca5 | Bin 150 -> 0 bytes .../expected/origin/packed-refs | 3 - .../expected/origin/refs/heads/master | 1 - .../expected/origin/refs/heads/other_branch | 1 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 2 - .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/ORIG_HEAD | 1 - .../expected/repo/.git_keep/config | 21 ------ .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 209 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 -- .../expected/repo/.git_keep/logs/HEAD | 10 --- .../repo/.git_keep/logs/refs/heads/master | 4 - .../.git_keep/logs/refs/heads/other_branch | 3 - .../.git_keep/logs/refs/remotes/origin/master | 3 - .../logs/refs/remotes/origin/other_branch | 3 - .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../7a/35f0bb6bd8dc18ae462465e51f02362ba6babe | 2 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../bd/739fb752ed02ccd49422196e31599c87ff90ad | Bin 149 -> 0 bytes .../ce/0848710343a75263ea72cb5bdfa666b9ecda68 | Bin 103 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../e6/7f344f42afdb79c87a590f22537160241d8d61 | Bin 150 -> 0 bytes .../fe/67c3eaf819025990d3688d5f147a064e669ca5 | Bin 150 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../repo/.git_keep/refs/heads/other_branch | 1 - .../repo/.git_keep/refs/remotes/origin/master | 1 - .../refs/remotes/origin/other_branch | 1 - .../expected/repo/myfile1 | 1 - .../expected/repo/myfile2 | 1 - .../forcePushMultipleMatching/recording.json | 1 - .../forcePushMultipleMatching/setup.sh | 54 ------------- .../forcePushMultipleMatching/test.json | 4 - .../expected/origin/HEAD | 1 - .../expected/origin/config | 8 -- .../expected/origin/description | 1 - .../expected/origin/info/exclude | 7 -- .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../48/6301f318c84045827013a3c3246b8c6a319eb8 | Bin 148 -> 0 bytes .../49/ea44f3ec1792142714930c8e4c3073f137936c | Bin 150 -> 0 bytes .../81/bdc116083cd4b4655333f4eb94dc0320197082 | 3 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../c8/4375dda9d81c1f2103defe4384e31f859dac86 | 5 -- .../ce/0848710343a75263ea72cb5bdfa666b9ecda68 | Bin 103 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/origin/packed-refs | 3 - .../expected/origin/refs/heads/master | 1 - .../expected/origin/refs/heads/other_branch | 1 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 2 - .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/ORIG_HEAD | 1 - .../expected/repo/.git_keep/config | 21 ------ .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 209 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 7 -- .../expected/repo/.git_keep/logs/HEAD | 10 --- .../repo/.git_keep/logs/refs/heads/master | 4 - .../.git_keep/logs/refs/heads/other_branch | 3 - .../.git_keep/logs/refs/remotes/origin/master | 3 - .../logs/refs/remotes/origin/other_branch | 2 - .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../48/6301f318c84045827013a3c3246b8c6a319eb8 | Bin 148 -> 0 bytes .../49/ea44f3ec1792142714930c8e4c3073f137936c | Bin 150 -> 0 bytes .../81/bdc116083cd4b4655333f4eb94dc0320197082 | 3 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../c8/4375dda9d81c1f2103defe4384e31f859dac86 | 5 -- .../ce/0848710343a75263ea72cb5bdfa666b9ecda68 | Bin 103 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../repo/.git_keep/refs/heads/other_branch | 1 - .../repo/.git_keep/refs/remotes/origin/master | 1 - .../refs/remotes/origin/other_branch | 1 - .../expected/repo/myfile1 | 1 - .../expected/repo/myfile2 | 1 - .../forcePushMultipleUpstream/recording.json | 1 - .../forcePushMultipleUpstream/setup.sh | 54 ------------- .../forcePushMultipleUpstream/test.json | 4 - 109 files changed, 126 insertions(+), 307 deletions(-) create mode 100644 pkg/integration/tests/sync/force_push_multiple_matching.go create mode 100644 pkg/integration/tests/sync/force_push_multiple_upstream.go delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/HEAD delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/config delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/description delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/info/exclude delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/packed-refs delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/refs/heads/master delete mode 100644 test/integration/forcePushMultipleMatching/expected/origin/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/config delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/description delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/index delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/master delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/master delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/other_branch delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/myfile1 delete mode 100644 test/integration/forcePushMultipleMatching/expected/repo/myfile2 delete mode 100644 test/integration/forcePushMultipleMatching/recording.json delete mode 100644 test/integration/forcePushMultipleMatching/setup.sh delete mode 100644 test/integration/forcePushMultipleMatching/test.json delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/HEAD delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/config delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/description delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/info/exclude delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/49/ea44f3ec1792142714930c8e4c3073f137936c delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/packed-refs delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/master delete mode 100644 test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/config delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/description delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/index delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/master delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/49/ea44f3ec1792142714930c8e4c3073f137936c delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/other_branch delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/master delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/other_branch delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/myfile1 delete mode 100644 test/integration/forcePushMultipleUpstream/expected/repo/myfile2 delete mode 100644 test/integration/forcePushMultipleUpstream/recording.json delete mode 100644 test/integration/forcePushMultipleUpstream/setup.sh delete mode 100644 test/integration/forcePushMultipleUpstream/test.json diff --git a/pkg/integration/tests/sync/force_push_multiple_matching.go b/pkg/integration/tests/sync/force_push_multiple_matching.go new file mode 100644 index 000000000..133554471 --- /dev/null +++ b/pkg/integration/tests/sync/force_push_multiple_matching.go @@ -0,0 +1,53 @@ +package sync + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var ForcePushMultipleMatching = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Force push to multiple branches because the user has push.default matching", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) { + }, + SetupRepo: func(shell *Shell) { + shell.SetConfig("push.default", "matching") + + createTwoBranchesReadyToForcePush(shell) + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Lines( + Contains("one"), + ) + + t.Views().Status().Content(Contains("↓1 repo → master")) + + t.Views().Branches(). + Lines( + Contains("master ↓1"), + Contains("other_branch ↓1"), + ) + + t.Views().Files().IsFocused().Press(keys.Universal.Push) + + t.ExpectPopup().Confirmation(). + Title(Equals("Force push")). + Content(Equals("Your branch has diverged from the remote branch. Press 'esc' to cancel, or 'enter' to force push.")). + Confirm() + + t.Views().Commits(). + Lines( + Contains("one"), + ) + + t.Views().Status().Content(Contains("✓ repo → master")) + + t.Views().Branches(). + Lines( + Contains("master ✓"), + Contains("other_branch ✓"), + ) + }, +}) diff --git a/pkg/integration/tests/sync/force_push_multiple_upstream.go b/pkg/integration/tests/sync/force_push_multiple_upstream.go new file mode 100644 index 000000000..d8833c12f --- /dev/null +++ b/pkg/integration/tests/sync/force_push_multiple_upstream.go @@ -0,0 +1,71 @@ +package sync + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +func createTwoBranchesReadyToForcePush(shell *Shell) { + shell.EmptyCommit("one") + shell.EmptyCommit("two") + + shell.NewBranch("other_branch") + + shell.CloneIntoRemote("origin") + + shell.SetBranchUpstream("master", "origin/master") + shell.SetBranchUpstream("other_branch", "origin/other_branch") + + // remove the 'two' commit so that we have something to pull from the remote + shell.HardReset("HEAD^") + + shell.Checkout("master") + // doing the same for master + shell.HardReset("HEAD^") +} + +var ForcePushMultipleUpstream = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Force push to only the upstream branch of the current branch because the user has push.default upstream", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.SetConfig("push.default", "upstream") + + createTwoBranchesReadyToForcePush(shell) + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Lines( + Contains("one"), + ) + + t.Views().Status().Content(Contains("↓1 repo → master")) + + t.Views().Branches(). + Lines( + Contains("master ↓1"), + Contains("other_branch ↓1"), + ) + + t.Views().Files().IsFocused().Press(keys.Universal.Push) + + t.ExpectPopup().Confirmation(). + Title(Equals("Force push")). + Content(Equals("Your branch has diverged from the remote branch. Press 'esc' to cancel, or 'enter' to force push.")). + Confirm() + + t.Views().Commits(). + Lines( + Contains("one"), + ) + + t.Views().Status().Content(Contains("✓ repo → master")) + + t.Views().Branches(). + Lines( + Contains("master ✓"), + Contains("other_branch ↓1"), + ) + }, +}) diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index ef6ed229b..dedd93e6c 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -73,6 +73,8 @@ var tests = []*components.IntegrationTest{ submodule.Reset, sync.FetchPrune, sync.ForcePush, + sync.ForcePushMultipleMatching, + sync.ForcePushMultipleUpstream, sync.Pull, sync.PullAndSetUpstream, sync.RenameBranchAndPull, diff --git a/test/integration/forcePushMultipleMatching/expected/origin/HEAD b/test/integration/forcePushMultipleMatching/expected/origin/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/forcePushMultipleMatching/expected/origin/config b/test/integration/forcePushMultipleMatching/expected/origin/config deleted file mode 100644 index 41711784a..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/config +++ /dev/null @@ -1,8 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true - ignorecase = true - precomposeunicode = true -[remote "origin"] - url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/forcePushMultiple/actual/./repo diff --git a/test/integration/forcePushMultipleMatching/expected/origin/description b/test/integration/forcePushMultipleMatching/expected/origin/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePushMultipleMatching/expected/origin/info/exclude b/test/integration/forcePushMultipleMatching/expected/origin/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/info/exclude +++ /dev/null @@ -1,7 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -.DS_Store diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePushMultipleMatching/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePushMultipleMatching/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe b/test/integration/forcePushMultipleMatching/expected/origin/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe deleted file mode 100644 index c58bcbe9b..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@ѮsJ&N\y1P!ER#tyS5[ mSs?hDs XzLE=8w`1N/>R' ShpEޝ4;;ʲ*2K, \ No newline at end of file diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePushMultipleMatching/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePushMultipleMatching/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad b/test/integration/forcePushMultipleMatching/expected/origin/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad deleted file mode 100644 index fcaa0a8780d24739d5ad11f70a44f6b751a3e800..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaAJ3c@fH0A1%4*$a~QX+9t#bk$>|$$MBZwv-5ZdwT>|1H&w)tgS8G zLgG{3MJ&z`s6-D{nMgB}YOX*UU5PURmf>I#v*lf0-HH!N%*vRx&LNc;@{pV&4ivyU zWT>%vF!|jd>u$%%UdQP!pWL>mT*}&R7CcAd#0d5b;G8+^G1cYI+_bMQPa*RI@IE?2 DVyi~F diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePushMultipleMatching/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 deleted file mode 100644 index 5e9361d3548aa14bca5d35e0871b31e326387c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQr#ZlF88r;s1<|mAy)TaoXZbQtYkQ JApo0YFGO2mGTHzD diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePushMultipleMatching/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePushMultipleMatching/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 b/test/integration/forcePushMultipleMatching/expected/origin/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 deleted file mode 100644 index e1d86f23c77acd71d78937ead55b7b794285b9ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcW<3c@fDKvCB@MfQSZCdo7b5uvLdW2Tv4!PrtF=4Sa&;4_Bu{?{czi!dYRXDvp^yFkOP7}12|`ndQ5fwlbiOf%Tv+(00iJV Eq{C-O9{>OV diff --git a/test/integration/forcePushMultipleMatching/expected/origin/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 b/test/integration/forcePushMultipleMatching/expected/origin/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 deleted file mode 100644 index 114e72ec5c45d8d5f3a8a642b646b236307422c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcW<3d0}}K+&!}h5JHrbQ~2*DP)ynj5^XlZ9=fn-o80Px1YE8W$k?# z8WNtyE~1N=h%tb1=s0*wPB_?-eXfm(C?_eEDXNWkc?~TTnnP@8xz!v}iGh7G&06mQ zkg*6gRszNE@mO~~&H6gcclmJNo^mN`ziA+h4ij3?X8>c=QIDx1e{$8oZFvf+AGN1B E^6vXZ4*&oF diff --git a/test/integration/forcePushMultipleMatching/expected/origin/packed-refs b/test/integration/forcePushMultipleMatching/expected/origin/packed-refs deleted file mode 100644 index 970c0dc0b..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/packed-refs +++ /dev/null @@ -1,3 +0,0 @@ -# pack-refs with: peeled fully-peeled sorted -e67f344f42afdb79c87a590f22537160241d8d61 refs/heads/master -e67f344f42afdb79c87a590f22537160241d8d61 refs/heads/other_branch diff --git a/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/master b/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/master deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/other_branch b/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/other_branch deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/origin/refs/heads/other_branch +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 51be8ec3d..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -myfile4 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/FETCH_HEAD b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index 0a4e5da7e..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/FETCH_HEAD +++ /dev/null @@ -1,2 +0,0 @@ -bd739fb752ed02ccd49422196e31599c87ff90ad branch 'master' of ../origin -fe67c3eaf819025990d3688d5f147a064e669ca5 not-for-merge branch 'other_branch' of ../origin diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/HEAD b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/ORIG_HEAD b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index e7aee65c4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -fe67c3eaf819025990d3688d5f147a064e669ca5 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/config b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/config deleted file mode 100644 index 2be68507e..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/config +++ /dev/null @@ -1,21 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true -[user] - email = CI@example.com - name = CI -[push] - default = matching -[remote "origin"] - url = ../origin - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "master"] - remote = origin - merge = refs/heads/master -[branch "other_branch"] - remote = origin - merge = refs/heads/other_branch diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/description b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/index b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/index deleted file mode 100644 index 5c83b42dcdec4a11995f594f24a2642f6a783553..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmZ?q402{*U|<5_B>M|*b!IP`45Jwt7+9I+xfnArG%jIaVEhVHBLc*1OZPnftD1V_ zOGIcCPrlQI0I!zrs|@V9m1&tdsfIuWApN=(`@g_ws5xHf=1B1TFltcRckbn?Md4Nb zEw8laTd2d#F#?(s66ER%q$C-P6b!hQn@B}|xclyB=Ck?R%$m|JY4fXyDb>H&;-*~t SdW!pwS2n-fS#x%kRsaA`97+%X diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/info/exclude b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,7 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -.DS_Store diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/HEAD b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index fa818156f..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,10 +0,0 @@ -0000000000000000000000000000000000000000 7a35f0bb6bd8dc18ae462465e51f02362ba6babe CI 1648349421 +1100 commit (initial): myfile1 -7a35f0bb6bd8dc18ae462465e51f02362ba6babe e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 commit: myfile2 -e67f344f42afdb79c87a590f22537160241d8d61 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 checkout: moving from master to other_branch -e67f344f42afdb79c87a590f22537160241d8d61 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 checkout: moving from other_branch to master -e67f344f42afdb79c87a590f22537160241d8d61 bd739fb752ed02ccd49422196e31599c87ff90ad CI 1648349421 +1100 commit: myfile3 -bd739fb752ed02ccd49422196e31599c87ff90ad e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 reset: moving to HEAD^ -e67f344f42afdb79c87a590f22537160241d8d61 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 checkout: moving from master to other_branch -e67f344f42afdb79c87a590f22537160241d8d61 fe67c3eaf819025990d3688d5f147a064e669ca5 CI 1648349421 +1100 commit: myfile4 -fe67c3eaf819025990d3688d5f147a064e669ca5 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349422 +1100 reset: moving to HEAD^ -e67f344f42afdb79c87a590f22537160241d8d61 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349422 +1100 checkout: moving from other_branch to master diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 7c4a7732c..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,4 +0,0 @@ -0000000000000000000000000000000000000000 7a35f0bb6bd8dc18ae462465e51f02362ba6babe CI 1648349421 +1100 commit (initial): myfile1 -7a35f0bb6bd8dc18ae462465e51f02362ba6babe e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 commit: myfile2 -e67f344f42afdb79c87a590f22537160241d8d61 bd739fb752ed02ccd49422196e31599c87ff90ad CI 1648349421 +1100 commit: myfile3 -bd739fb752ed02ccd49422196e31599c87ff90ad e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 reset: moving to HEAD^ diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/other_branch b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/other_branch deleted file mode 100644 index 76c0be40c..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/heads/other_branch +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 branch: Created from HEAD -e67f344f42afdb79c87a590f22537160241d8d61 fe67c3eaf819025990d3688d5f147a064e669ca5 CI 1648349421 +1100 commit: myfile4 -fe67c3eaf819025990d3688d5f147a064e669ca5 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349422 +1100 reset: moving to HEAD^ diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/master b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/master deleted file mode 100644 index f6e6b60bd..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/master +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 fetch origin: storing head -e67f344f42afdb79c87a590f22537160241d8d61 bd739fb752ed02ccd49422196e31599c87ff90ad CI 1648349421 +1100 update by push -bd739fb752ed02ccd49422196e31599c87ff90ad e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349423 +1100 update by push diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch deleted file mode 100644 index 5672ee50e..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349421 +1100 fetch origin: storing head -e67f344f42afdb79c87a590f22537160241d8d61 fe67c3eaf819025990d3688d5f147a064e669ca5 CI 1648349421 +1100 update by push -fe67c3eaf819025990d3688d5f147a064e669ca5 e67f344f42afdb79c87a590f22537160241d8d61 CI 1648349423 +1100 update by push diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe deleted file mode 100644 index c58bcbe9b..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/7a/35f0bb6bd8dc18ae462465e51f02362ba6babe +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@ѮsJ&N\y1P!ER#tyS5[ mSs?hDs XzLE=8w`1N/>R' ShpEޝ4;;ʲ*2K, \ No newline at end of file diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/bd/739fb752ed02ccd49422196e31599c87ff90ad deleted file mode 100644 index fcaa0a8780d24739d5ad11f70a44f6b751a3e800..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaAJ3c@fH0A1%4*$a~QX+9t#bk$>|$$MBZwv-5ZdwT>|1H&w)tgS8G zLgG{3MJ&z`s6-D{nMgB}YOX*UU5PURmf>I#v*lf0-HH!N%*vRx&LNc;@{pV&4ivyU zWT>%vF!|jd>u$%%UdQP!pWL>mT*}&R7CcAd#0d5b;G8+^G1cYI+_bMQPa*RI@IE?2 DVyi~F diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 deleted file mode 100644 index 5e9361d3548aa14bca5d35e0871b31e326387c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQr#ZlF88r;s1<|mAy)TaoXZbQtYkQ JApo0YFGO2mGTHzD diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/e6/7f344f42afdb79c87a590f22537160241d8d61 deleted file mode 100644 index e1d86f23c77acd71d78937ead55b7b794285b9ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcW<3c@fDKvCB@MfQSZCdo7b5uvLdW2Tv4!PrtF=4Sa&;4_Bu{?{czi!dYRXDvp^yFkOP7}12|`ndQ5fwlbiOf%Tv+(00iJV Eq{C-O9{>OV diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/objects/fe/67c3eaf819025990d3688d5f147a064e669ca5 deleted file mode 100644 index 114e72ec5c45d8d5f3a8a642b646b236307422c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcW<3d0}}K+&!}h5JHrbQ~2*DP)ynj5^XlZ9=fn-o80Px1YE8W$k?# z8WNtyE~1N=h%tb1=s0*wPB_?-eXfm(C?_eEDXNWkc?~TTnnP@8xz!v}iGh7G&06mQ zkg*6gRszNE@mO~~&H6gcclmJNo^mN`ziA+h4ij3?X8>c=QIDx1e{$8oZFvf+AGN1B E^6vXZ4*&oF diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/master b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/other_branch b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/other_branch deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/heads/other_branch +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/master b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/master deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/master +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/other_branch b/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/other_branch deleted file mode 100644 index 51eb490a4..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/.git_keep/refs/remotes/origin/other_branch +++ /dev/null @@ -1 +0,0 @@ -e67f344f42afdb79c87a590f22537160241d8d61 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/myfile1 b/test/integration/forcePushMultipleMatching/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/forcePushMultipleMatching/expected/repo/myfile2 b/test/integration/forcePushMultipleMatching/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/forcePushMultipleMatching/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/forcePushMultipleMatching/recording.json b/test/integration/forcePushMultipleMatching/recording.json deleted file mode 100644 index ae367f16d..000000000 --- a/test/integration/forcePushMultipleMatching/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":892,"Mod":0,"Key":256,"Ch":80},{"Timestamp":1379,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2132,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":135,"Height":36}]} \ No newline at end of file diff --git a/test/integration/forcePushMultipleMatching/setup.sh b/test/integration/forcePushMultipleMatching/setup.sh deleted file mode 100644 index 185ea46e9..000000000 --- a/test/integration/forcePushMultipleMatching/setup.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" -git config push.default matching - -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo test2 > myfile2 -git add . -git commit -am "myfile2" - -git checkout -b other_branch -git checkout master - -cd .. -git clone --bare ./repo origin - -cd repo - -git remote add origin ../origin -git fetch origin -git branch --set-upstream-to=origin/master master -git branch --set-upstream-to=origin/other_branch other_branch - -echo test3 > myfile3 -git add . -git commit -am "myfile3" - -git push origin master -git reset --hard HEAD^ - -git checkout other_branch - -echo test4 > myfile4 -git add . -git commit -am "myfile4" - -git push origin other_branch -git reset --hard HEAD^ - -git checkout master - -# at this point, both branches have diverged from their remote counterparts, meaning if you -# attempt to push either, it'll ask if you want to force push. diff --git a/test/integration/forcePushMultipleMatching/test.json b/test/integration/forcePushMultipleMatching/test.json deleted file mode 100644 index e62caa40f..000000000 --- a/test/integration/forcePushMultipleMatching/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Force push to multiple branches because the user has push.default matching", - "speed": 10 -} diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/HEAD b/test/integration/forcePushMultipleUpstream/expected/origin/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/config b/test/integration/forcePushMultipleUpstream/expected/origin/config deleted file mode 100644 index 6504f87b4..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/config +++ /dev/null @@ -1,8 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true - ignorecase = true - precomposeunicode = true -[remote "origin"] - url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/forcePushMultipleUpstream/actual/./repo diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/description b/test/integration/forcePushMultipleUpstream/expected/origin/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/info/exclude b/test/integration/forcePushMultipleUpstream/expected/origin/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/info/exclude +++ /dev/null @@ -1,7 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -.DS_Store diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePushMultipleUpstream/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 deleted file mode 100644 index c1564b80fe29af50d9b0c2337fd1383aee76549d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gaA93c@fD06pgwxeJobZkq&(2tD-~>2?X z7!vku^1D9w(~grJ#_1uST#ij{yqCL$o+47}$lEJ`bEergRprmzl&`Lvp!os3pgHL6 Cnn^7H diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/49/ea44f3ec1792142714930c8e4c3073f137936c b/test/integration/forcePushMultipleUpstream/expected/origin/objects/49/ea44f3ec1792142714930c8e4c3073f137936c deleted file mode 100644 index 52bacd10573bc907dbf03369ffb3d858a9a362cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcX03c@fDKw;N8MfQTsB-3dIM1-z-jQmWnU~DN7^!D}$ZXe&`<+Zh? zTNFC=UDd|X6UIR*l%iUNMOkWM&%rSl=Mq#$$YzVXzPb&VN=9S|J{L;F!{EKIq)Dh` z@D5N$2+qWJf2_NmW_z9HyMAKZo_fh^yIEuko@5|r&xio#sK->-Ke=h&x;)jHA91KT EV2qwhr2qf` diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 deleted file mode 100644 index b9233622d..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 +++ /dev/null @@ -1,3 +0,0 @@ -xA -0@ѮsJ&cR -<ƘL#tyS5[ S0jDs XZLER۫0p~Mo)v4;9i'w-~3, \ No newline at end of file diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 deleted file mode 100644 index 3054cb14b..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 +++ /dev/null @@ -1,5 +0,0 @@ -xM -0@s %R -<8N`H -}|'[KU+ 9v>r2u\80eC2;j2QAIRt `=7B; -99On, 9 \ No newline at end of file diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 deleted file mode 100644 index 5e9361d3548aa14bca5d35e0871b31e326387c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQr#ZlF88r;s1<|mAy)TaoXZbQtYkQ JApo0YFGO2mGTHzD diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePushMultipleUpstream/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePushMultipleUpstream/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/packed-refs b/test/integration/forcePushMultipleUpstream/expected/origin/packed-refs deleted file mode 100644 index 06b105db2..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/packed-refs +++ /dev/null @@ -1,3 +0,0 @@ -# pack-refs with: peeled fully-peeled sorted -49ea44f3ec1792142714930c8e4c3073f137936c refs/heads/master -49ea44f3ec1792142714930c8e4c3073f137936c refs/heads/other_branch diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/master b/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/master deleted file mode 100644 index f29b96944..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -49ea44f3ec1792142714930c8e4c3073f137936c diff --git a/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/other_branch b/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/other_branch deleted file mode 100644 index 7c9ad8321..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/origin/refs/heads/other_branch +++ /dev/null @@ -1 +0,0 @@ -c84375dda9d81c1f2103defe4384e31f859dac86 diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 51be8ec3d..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -myfile4 diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/FETCH_HEAD b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e799afa43..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/FETCH_HEAD +++ /dev/null @@ -1,2 +0,0 @@ -486301f318c84045827013a3c3246b8c6a319eb8 branch 'master' of ../origin -c84375dda9d81c1f2103defe4384e31f859dac86 not-for-merge branch 'other_branch' of ../origin diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/HEAD b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/ORIG_HEAD b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index 7c9ad8321..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -c84375dda9d81c1f2103defe4384e31f859dac86 diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/config b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/config deleted file mode 100644 index 3d6ea6c8d..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/config +++ /dev/null @@ -1,21 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true -[user] - email = CI@example.com - name = CI -[push] - default = upstream -[remote "origin"] - url = ../origin - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "master"] - remote = origin - merge = refs/heads/master -[branch "other_branch"] - remote = origin - merge = refs/heads/other_branch diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/description b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/index b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/index deleted file mode 100644 index 9ec36686f295f0bfd322aeb21c9020e317ac7760..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmZ?q402{*U|<5_B>Ri0)}9<+VKgHH11r-!kE;v}jY}997{3D5hyXF$(mjv=s;1uf z5)m53lkapPz^kSEDg%3NWm;xVsv%GTP=6Z3rW3DWG}N3o=;lc9{4i=z+IQ~dszu>d z{VlJw=Ub@5%rOF*6B6X=3Zx_%j1&yGmYYaLez^PYXXdl{+svBME@|_ti23|f@Y)=| Tj#2f{$=R2=OMZz7I6MRZ3PVRz diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/info/exclude b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,7 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ -.DS_Store diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/HEAD b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index e6ba4297a..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,10 +0,0 @@ -0000000000000000000000000000000000000000 81bdc116083cd4b4655333f4eb94dc0320197082 CI 1648349542 +1100 commit (initial): myfile1 -81bdc116083cd4b4655333f4eb94dc0320197082 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 commit: myfile2 -49ea44f3ec1792142714930c8e4c3073f137936c 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 checkout: moving from master to other_branch -49ea44f3ec1792142714930c8e4c3073f137936c 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 checkout: moving from other_branch to master -49ea44f3ec1792142714930c8e4c3073f137936c 486301f318c84045827013a3c3246b8c6a319eb8 CI 1648349542 +1100 commit: myfile3 -486301f318c84045827013a3c3246b8c6a319eb8 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 reset: moving to HEAD^ -49ea44f3ec1792142714930c8e4c3073f137936c 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 checkout: moving from master to other_branch -49ea44f3ec1792142714930c8e4c3073f137936c c84375dda9d81c1f2103defe4384e31f859dac86 CI 1648349542 +1100 commit: myfile4 -c84375dda9d81c1f2103defe4384e31f859dac86 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 reset: moving to HEAD^ -49ea44f3ec1792142714930c8e4c3073f137936c 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 checkout: moving from other_branch to master diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 4e2739b8e..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,4 +0,0 @@ -0000000000000000000000000000000000000000 81bdc116083cd4b4655333f4eb94dc0320197082 CI 1648349542 +1100 commit (initial): myfile1 -81bdc116083cd4b4655333f4eb94dc0320197082 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 commit: myfile2 -49ea44f3ec1792142714930c8e4c3073f137936c 486301f318c84045827013a3c3246b8c6a319eb8 CI 1648349542 +1100 commit: myfile3 -486301f318c84045827013a3c3246b8c6a319eb8 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 reset: moving to HEAD^ diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/other_branch b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/other_branch deleted file mode 100644 index efd57e6fd..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/heads/other_branch +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 branch: Created from HEAD -49ea44f3ec1792142714930c8e4c3073f137936c c84375dda9d81c1f2103defe4384e31f859dac86 CI 1648349542 +1100 commit: myfile4 -c84375dda9d81c1f2103defe4384e31f859dac86 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 reset: moving to HEAD^ diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/master b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/master deleted file mode 100644 index c08c7c66b..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/master +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 fetch origin: storing head -49ea44f3ec1792142714930c8e4c3073f137936c 486301f318c84045827013a3c3246b8c6a319eb8 CI 1648349542 +1100 update by push -486301f318c84045827013a3c3246b8c6a319eb8 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349543 +1100 update by push diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch deleted file mode 100644 index fd6564f9b..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/logs/refs/remotes/origin/other_branch +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 49ea44f3ec1792142714930c8e4c3073f137936c CI 1648349542 +1100 fetch origin: storing head -49ea44f3ec1792142714930c8e4c3073f137936c c84375dda9d81c1f2103defe4384e31f859dac86 CI 1648349542 +1100 update by push diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/48/6301f318c84045827013a3c3246b8c6a319eb8 deleted file mode 100644 index c1564b80fe29af50d9b0c2337fd1383aee76549d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gaA93c@fD06pgwxeJobZkq&(2tD-~>2?X z7!vku^1D9w(~grJ#_1uST#ij{yqCL$o+47}$lEJ`bEergRprmzl&`Lvp!os3pgHL6 Cnn^7H diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/49/ea44f3ec1792142714930c8e4c3073f137936c b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/49/ea44f3ec1792142714930c8e4c3073f137936c deleted file mode 100644 index 52bacd10573bc907dbf03369ffb3d858a9a362cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcX03c@fDKw;N8MfQTsB-3dIM1-z-jQmWnU~DN7^!D}$ZXe&`<+Zh? zTNFC=UDd|X6UIR*l%iUNMOkWM&%rSl=Mq#$$YzVXzPb&VN=9S|J{L;F!{EKIq)Dh` z@D5N$2+qWJf2_NmW_z9HyMAKZo_fh^yIEuko@5|r&xio#sK->-Ke=h&x;)jHA91KT EV2qwhr2qf` diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 deleted file mode 100644 index b9233622d..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/81/bdc116083cd4b4655333f4eb94dc0320197082 +++ /dev/null @@ -1,3 +0,0 @@ -xA -0@ѮsJ&cR -<ƘL#tyS5[ S0jDs XZLER۫0p~Mo)v4;9i'w-~3, \ No newline at end of file diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 deleted file mode 100644 index 3054cb14b..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/c8/4375dda9d81c1f2103defe4384e31f859dac86 +++ /dev/null @@ -1,5 +0,0 @@ -xM -0@s %R -<8N`H -}|'[KU+ 9v>r2u\80eC2;j2QAIRt `=7B; -99On, 9 \ No newline at end of file diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 deleted file mode 100644 index 5e9361d3548aa14bca5d35e0871b31e326387c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQr#ZlF88r;s1<|mAy)TaoXZbQtYkQ JApo0YFGO2mGTHzD diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/master b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index f29b96944..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -49ea44f3ec1792142714930c8e4c3073f137936c diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/other_branch b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/other_branch deleted file mode 100644 index f29b96944..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/heads/other_branch +++ /dev/null @@ -1 +0,0 @@ -49ea44f3ec1792142714930c8e4c3073f137936c diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/master b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/master deleted file mode 100644 index f29b96944..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/master +++ /dev/null @@ -1 +0,0 @@ -49ea44f3ec1792142714930c8e4c3073f137936c diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/other_branch b/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/other_branch deleted file mode 100644 index 7c9ad8321..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/.git_keep/refs/remotes/origin/other_branch +++ /dev/null @@ -1 +0,0 @@ -c84375dda9d81c1f2103defe4384e31f859dac86 diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/myfile1 b/test/integration/forcePushMultipleUpstream/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/forcePushMultipleUpstream/expected/repo/myfile2 b/test/integration/forcePushMultipleUpstream/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/forcePushMultipleUpstream/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/forcePushMultipleUpstream/recording.json b/test/integration/forcePushMultipleUpstream/recording.json deleted file mode 100644 index ae367f16d..000000000 --- a/test/integration/forcePushMultipleUpstream/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":892,"Mod":0,"Key":256,"Ch":80},{"Timestamp":1379,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2132,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":135,"Height":36}]} \ No newline at end of file diff --git a/test/integration/forcePushMultipleUpstream/setup.sh b/test/integration/forcePushMultipleUpstream/setup.sh deleted file mode 100644 index f31f24041..000000000 --- a/test/integration/forcePushMultipleUpstream/setup.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" -git config push.default upstream - -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo test2 > myfile2 -git add . -git commit -am "myfile2" - -git checkout -b other_branch -git checkout master - -cd .. -git clone --bare ./repo origin - -cd repo - -git remote add origin ../origin -git fetch origin -git branch --set-upstream-to=origin/master master -git branch --set-upstream-to=origin/other_branch other_branch - -echo test3 > myfile3 -git add . -git commit -am "myfile3" - -git push origin master -git reset --hard HEAD^ - -git checkout other_branch - -echo test4 > myfile4 -git add . -git commit -am "myfile4" - -git push origin other_branch -git reset --hard HEAD^ - -git checkout master - -# at this point, both branches have diverged from their remote counterparts, meaning if you -# attempt to push either, it'll ask if you want to force push. diff --git a/test/integration/forcePushMultipleUpstream/test.json b/test/integration/forcePushMultipleUpstream/test.json deleted file mode 100644 index 4569d3cc9..000000000 --- a/test/integration/forcePushMultipleUpstream/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Force push to only one branch because the user has push.default upstream", - "speed": 10 -}