From 6f709456fed527d0633aba72be44363581e19a48 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 28 Dec 2022 17:52:04 +1100 Subject: [PATCH] migrate test for rename branch and pull --- pkg/integration/components/shell.go | 6 ++ .../tests/sync/rename_branch_and_pull.go | 57 ++++++++++++++++++ pkg/integration/tests/tests.go | 1 + .../expected/origin/HEAD | 1 - .../expected/origin/config | 6 -- .../expected/origin/description | 1 - .../expected/origin/info/exclude | 6 -- .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../12/d38e54cd419303587ba4613fb1194ec5c9d04f | Bin 149 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 128 -> 0 bytes .../3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 | 3 - .../72/ee6cc86de71389b9c70e24c7d8c8837e7d3566 | 2 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../b0/90d7f0029e74de260f7458721b8edd1e618edc | Bin 149 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/origin/packed-refs | 2 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 1 - .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/ORIG_HEAD | 1 - .../expected/repo/.git_keep/config | 14 ----- .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 353 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 6 -- .../expected/repo/.git_keep/logs/HEAD | 8 --- .../.git_keep/logs/refs/heads/master-local | 7 --- .../.git_keep/logs/refs/remotes/origin/master | 1 - .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../12/d38e54cd419303587ba4613fb1194ec5c9d04f | Bin 149 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 128 -> 0 bytes .../3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 | 3 - .../72/ee6cc86de71389b9c70e24c7d8c8837e7d3566 | 2 - .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../b0/90d7f0029e74de260f7458721b8edd1e618edc | Bin 149 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../repo/.git_keep/refs/heads/master-local | 1 - .../repo/.git_keep/refs/remotes/origin/master | 1 - .../expected/repo/myfile1 | 1 - .../expected/repo/myfile2 | 1 - .../expected/repo/myfile3 | 1 - .../expected/repo/myfile4 | 1 - .../recording.json | 1 - .../setup.sh | 36 ----------- .../test.json | 1 - 52 files changed, 64 insertions(+), 111 deletions(-) create mode 100644 pkg/integration/tests/sync/rename_branch_and_pull.go delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/HEAD delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/config delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/description delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/info/exclude delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/12/d38e54cd419303587ba4613fb1194ec5c9d04f delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/2f/6174050380438f14b16658a356e762435ca591 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/72/ee6cc86de71389b9c70e24c7d8c8837e7d3566 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/packed-refs delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/ORIG_HEAD delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/config delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/description delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/index delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/heads/master-local delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/remotes/origin/master delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/12/d38e54cd419303587ba4613fb1194ec5c9d04f delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/72/ee6cc86de71389b9c70e24c7d8c8837e7d3566 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/heads/master-local delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/remotes/origin/master delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile1 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile2 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile3 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile4 delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/recording.json delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/setup.sh delete mode 100644 test/integration/fetchRemoteBranchWithNonmatchingName/test.json diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index bfd1c5f86..9b7beca7c 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -193,3 +193,9 @@ func (self *Shell) RemoveRemoteBranch(remoteName string, branch string) *Shell { return self } + +func (self *Shell) HardReset(ref string) *Shell { + self.RunCommand(fmt.Sprintf("git reset --hard %s", ref)) + + return self +} diff --git a/pkg/integration/tests/sync/rename_branch_and_pull.go b/pkg/integration/tests/sync/rename_branch_and_pull.go new file mode 100644 index 000000000..93e28dfc3 --- /dev/null +++ b/pkg/integration/tests/sync/rename_branch_and_pull.go @@ -0,0 +1,57 @@ +package sync + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var RenameBranchAndPull = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Rename a branch to no longer match its upstream, then pull from the upstream", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) { + config.UserConfig.Git.AutoFetch = false + }, + SetupRepo: func(shell *Shell) { + shell.EmptyCommit("one") + shell.EmptyCommit("two") + + shell.CloneIntoRemote("origin") + shell.SetBranchUpstream("master", "origin/master") + + // remove the 'two' commit so that we have something to pull from the remote + shell.HardReset("HEAD^") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Commits(). + Lines( + Contains("one"), + ) + + t.Views().Branches(). + Focus(). + Lines( + Contains("master"), + ). + Press(keys.Branches.RenameBranch). + Tap(func() { + t.ExpectPopup().Confirmation(). + Title(Equals("rename branch")). + Content(Equals("This branch is tracking a remote. This action will only rename the local branch name, not the name of the remote branch. Continue?")). + Confirm() + + t.ExpectPopup().Prompt(). + Title(Contains("Enter new branch name")). + InitialText(Equals("master")). + Type("-local"). + Confirm() + }). + Press(keys.Universal.PullFiles) + + t.Views().Commits(). + Lines( + Contains("two"), + Contains("one"), + ) + }, +}) diff --git a/pkg/integration/tests/tests.go b/pkg/integration/tests/tests.go index 8a6c52565..bba5f38e3 100644 --- a/pkg/integration/tests/tests.go +++ b/pkg/integration/tests/tests.go @@ -66,6 +66,7 @@ var tests = []*components.IntegrationTest{ diff.DiffAndApplyPatch, diff.DiffCommits, sync.FetchPrune, + sync.RenameBranchAndPull, } func GetTests() []*components.IntegrationTest { diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/HEAD b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/config b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/config deleted file mode 100644 index ccf112f58..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/config +++ /dev/null @@ -1,6 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true -[remote "origin"] - url = /home/mark/Downloads/gits/lazygit/test/integration/fetchRemoteBranchWithNonmatchingName/actual/./repo diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/description b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/info/exclude b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmbAt4cxg9aiNnE>sQ zYCn^*k#~EnyB$V*9mYF8Qnx2A(^_xVaf*)m*kyYrPh<{yOf~$OoBA!w6W;s)E5bVh DYmG%8 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 deleted file mode 100644 index f74bf2335bbc5999ad0faff94fb04165d8ab5c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb~ZE#08nZNMgRZ+ diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/2f/6174050380438f14b16658a356e762435ca591 deleted file mode 100644 index 31ae3f5ba89b96ad2e268134913bd913a0bc46d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 deleted file mode 100644 index 0b97b6ff4..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 +++ /dev/null @@ -1,3 +0,0 @@ -xA -0@Q9I -"BW=FL!R"~r*Jd ¬DjE`~^A08nuUMF0Q* diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc deleted file mode 100644 index 1862ebd3c3feafed14da69f01a205eedeea79ac1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaA93c@fD06pgwxeKzJY<4#wBJ|W}#B_^-v86=N-`gj69cEza(%PeY z%yj6RnGZ9g5G05S6m>?rA#>6a6Ps|Lm}*HG-C8z#buYn;YgL|1FlxT#Dqw-COj=c= zm`r=huDttw+59m2^DtiRQ`-8pQ(fA{BPT*olI)KV0NhUZscwJju6^gn)5!e**OWNK DU$IK2 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/origin/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/origin/packed-refs b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/packed-refs deleted file mode 100644 index 19e0f32e9..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/origin/packed-refs +++ /dev/null @@ -1,2 +0,0 @@ -# pack-refs with: peeled fully-peeled sorted -b090d7f0029e74de260f7458721b8edd1e618edc refs/heads/master diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 51be8ec3d..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -myfile4 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/FETCH_HEAD b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index 09935c2a5..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/FETCH_HEAD +++ /dev/null @@ -1 +0,0 @@ -b090d7f0029e74de260f7458721b8edd1e618edc branch 'master' of ../origin diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/HEAD b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/HEAD deleted file mode 100644 index 416a3a6d6..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master-local diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/ORIG_HEAD b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/ORIG_HEAD deleted file mode 100644 index 2aae46d33..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/ORIG_HEAD +++ /dev/null @@ -1 +0,0 @@ -12d38e54cd419303587ba4613fb1194ec5c9d04f diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/config b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/config deleted file mode 100644 index 4e08dfbfc..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/config +++ /dev/null @@ -1,14 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[user] - email = CI@example.com - name = CI -[remote "origin"] - url = ../origin - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "master-local"] - remote = origin - merge = refs/heads/master diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/description b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/index b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/index deleted file mode 100644 index 3dd3930219a8ba5d7e12b178a303ad098141b955..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmZ?q402{*U|<4bmZa$$?HOyge}K_IF)2ppat;QD#w834%r79AfoNzBgzMnlb!LN`Z(=Z8^)(!O&qS1k&!>Th|a zJ>NndW{wfW94D(6YnK4c0n<=(`q9m~pUta%rtH}p{!?G7=Nxy7gBXcs0qGizdaCII0-cB=pY diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/info/exclude b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/HEAD b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 3972ae2a1..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,8 +0,0 @@ -0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI 1654108479 +0200 commit (initial): myfile1 -3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108479 +0200 commit: myfile2 -12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI 1654108479 +0200 commit: myfile3 -72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI 1654108479 +0200 commit: myfile4 -b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108479 +0200 reset: moving to HEAD~2 -12d38e54cd419303587ba4613fb1194ec5c9d04f 0000000000000000000000000000000000000000 CI 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local -0000000000000000000000000000000000000000 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local -12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/heads/master-local b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/heads/master-local deleted file mode 100644 index b930bd5b6..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/heads/master-local +++ /dev/null @@ -1,7 +0,0 @@ -0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI 1654108479 +0200 commit (initial): myfile1 -3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108479 +0200 commit: myfile2 -12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI 1654108479 +0200 commit: myfile3 -72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI 1654108479 +0200 commit: myfile4 -b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108479 +0200 reset: moving to HEAD~2 -12d38e54cd419303587ba4613fb1194ec5c9d04f 12d38e54cd419303587ba4613fb1194ec5c9d04f CI 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local -12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/remotes/origin/master b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/remotes/origin/master deleted file mode 100644 index 3cb40d7d3..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/logs/refs/remotes/origin/master +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 b090d7f0029e74de260f7458721b8edd1e618edc CI 1654108479 +0200 fetch origin: storing head diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmbAt4cxg9aiNnE>sQ zYCn^*k#~EnyB$V*9mYF8Qnx2A(^_xVaf*)m*kyYrPh<{yOf~$OoBA!w6W;s)E5bVh DYmG%8 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 deleted file mode 100644 index f74bf2335bbc5999ad0faff94fb04165d8ab5c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb~ZE#08nZNMgRZ+ diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 deleted file mode 100644 index 31ae3f5ba89b96ad2e268134913bd913a0bc46d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 deleted file mode 100644 index 0b97b6ff4..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/3e/5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 +++ /dev/null @@ -1,3 +0,0 @@ -xA -0@Q9I -"BW=FL!R"~r*Jd ¬DjE`~^A08nuUMF0Q* diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/b0/90d7f0029e74de260f7458721b8edd1e618edc deleted file mode 100644 index 1862ebd3c3feafed14da69f01a205eedeea79ac1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaA93c@fD06pgwxeKzJY<4#wBJ|W}#B_^-v86=N-`gj69cEza(%PeY z%yj6RnGZ9g5G05S6m>?rA#>6a6Ps|Lm}*HG-C8z#buYn;YgL|1FlxT#Dqw-COj=c= zm`r=huDttw+59m2^DtiRQ`-8pQ(fA{BPT*olI)KV0NhUZscwJju6^gn)5!e**OWNK DU$IK2 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/fetchRemoteBranchWithNonmatchingName/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/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/heads/master-local b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/heads/master-local deleted file mode 100644 index 22e32850e..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/heads/master-local +++ /dev/null @@ -1 +0,0 @@ -b090d7f0029e74de260f7458721b8edd1e618edc diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/remotes/origin/master b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/remotes/origin/master deleted file mode 100644 index 22e32850e..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/.git_keep/refs/remotes/origin/master +++ /dev/null @@ -1 +0,0 @@ -b090d7f0029e74de260f7458721b8edd1e618edc diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile1 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile2 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile3 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile4 b/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile4 deleted file mode 100644 index d234c5e05..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/expected/repo/myfile4 +++ /dev/null @@ -1 +0,0 @@ -test4 diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/recording.json b/test/integration/fetchRemoteBranchWithNonmatchingName/recording.json deleted file mode 100644 index eea17dc8d..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":703,"Mod":0,"Key":256,"Ch":108},{"Timestamp":1151,"Mod":0,"Key":256,"Ch":82},{"Timestamp":1692,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2183,"Mod":0,"Key":256,"Ch":45},{"Timestamp":2372,"Mod":0,"Key":256,"Ch":108},{"Timestamp":2498,"Mod":0,"Key":256,"Ch":111},{"Timestamp":2617,"Mod":0,"Key":256,"Ch":99},{"Timestamp":2663,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2724,"Mod":0,"Key":256,"Ch":108},{"Timestamp":3196,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3837,"Mod":0,"Key":256,"Ch":102},{"Timestamp":4854,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":213,"Height":56}]} \ No newline at end of file diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/setup.sh b/test/integration/fetchRemoteBranchWithNonmatchingName/setup.sh deleted file mode 100644 index bd33f9f6d..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/setup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -set -e - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo test2 > myfile2 -git add . -git commit -am "myfile2" -echo test3 > myfile3 -git add . -git commit -am "myfile3" -echo test4 > myfile4 -git add . -git commit -am "myfile4" - -cd .. -git clone --bare ./repo origin - -cd repo - -git reset --hard HEAD~2 -git remote add origin ../origin -git fetch origin -git branch --set-upstream-to=origin/master - diff --git a/test/integration/fetchRemoteBranchWithNonmatchingName/test.json b/test/integration/fetchRemoteBranchWithNonmatchingName/test.json deleted file mode 100644 index dffe129cd..000000000 --- a/test/integration/fetchRemoteBranchWithNonmatchingName/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "allow unsetting the upstream of the current branch", "speed": 10 }