diff --git a/.gitignore b/.gitignore index 481e36162..0e905b107 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,10 @@ lazygit test/git_server/data test/integration/*/actual/ +test/integration/*/actual_remote/ test/integration/*/used_config/ -# these sample hooks waste too space space +# these sample hooks waste too much space test/integration/*/expected/.git_keep/hooks/ +test/integration/*/expected_remote/hooks/ !.git_keep/ lazygit.exe diff --git a/pkg/gui/custom_commands_test.go b/pkg/gui/custom_commands_test.go new file mode 100644 index 000000000..d51617c09 --- /dev/null +++ b/pkg/gui/custom_commands_test.go @@ -0,0 +1,63 @@ +package gui + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGuiGenerateMenuCandidates(t *testing.T) { + type scenario struct { + testName string + cmdOut string + filter string + valueFormat string + labelFormat string + test func([]commandMenuEntry, error) + } + + scenarios := []scenario{ + { + "Extract remote branch name", + "upstream/pr-1", + "(?P<remote>[a-z_]+)/(?P<branch>.*)", + "{{ .branch }}", + "Remote: {{ .remote }}", + func(actualEntry []commandMenuEntry, err error) { + assert.NoError(t, err) + assert.EqualValues(t, "pr-1", actualEntry[0].value) + assert.EqualValues(t, "Remote: upstream", actualEntry[0].label) + }, + }, + { + "Multiple named groups with empty labelFormat", + "upstream/pr-1", + "(?P<remote>[a-z]*)/(?P<branch>.*)", + "{{ .branch }}|{{ .remote }}", + "", + func(actualEntry []commandMenuEntry, err error) { + assert.NoError(t, err) + assert.EqualValues(t, "pr-1|upstream", actualEntry[0].value) + assert.EqualValues(t, "pr-1|upstream", actualEntry[0].label) + }, + }, + { + "Multiple named groups with group ids", + "upstream/pr-1", + "(?P<remote>[a-z]*)/(?P<branch>.*)", + "{{ .group_2 }}|{{ .group_1 }}", + "Remote: {{ .group_1 }}", + func(actualEntry []commandMenuEntry, err error) { + assert.NoError(t, err) + assert.EqualValues(t, "pr-1|upstream", actualEntry[0].value) + assert.EqualValues(t, "Remote: upstream", actualEntry[0].label) + }, + }, + } + + for _, s := range scenarios { + t.Run(s.testName, func(t *testing.T) { + s.test(NewDummyGui().GenerateMenuCandidates(s.cmdOut, s.filter, s.valueFormat, s.labelFormat)) + }) + } +} diff --git a/pkg/gui/gui_test.go b/pkg/gui/gui_test.go index 20fec1b37..6e7a26b79 100644 --- a/pkg/gui/gui_test.go +++ b/pkg/gui/gui_test.go @@ -56,8 +56,8 @@ func Test(t *testing.T) { updateSnapshots, record, speedEnv, - func(t *testing.T, expected string, actual string) { - assert.Equal(t, expected, actual, fmt.Sprintf("expected:\n%s\nactual:\n%s\n", expected, actual)) + func(t *testing.T, expected string, actual string, prefix string) { + assert.Equal(t, expected, actual, fmt.Sprintf("Unexpected %s. Expected:\n%s\nActual:\n%s\n", prefix, expected, actual)) }, includeSkipped, ) @@ -81,59 +81,3 @@ func runCmdHeadless(cmd *exec.Cmd) error { return f.Close() } - -func TestGuiGenerateMenuCandidates(t *testing.T) { - type scenario struct { - testName string - cmdOut string - filter string - valueFormat string - labelFormat string - test func([]commandMenuEntry, error) - } - - scenarios := []scenario{ - { - "Extract remote branch name", - "upstream/pr-1", - "(?P<remote>[a-z_]+)/(?P<branch>.*)", - "{{ .branch }}", - "Remote: {{ .remote }}", - func(actualEntry []commandMenuEntry, err error) { - assert.NoError(t, err) - assert.EqualValues(t, "pr-1", actualEntry[0].value) - assert.EqualValues(t, "Remote: upstream", actualEntry[0].label) - }, - }, - { - "Multiple named groups with empty labelFormat", - "upstream/pr-1", - "(?P<remote>[a-z]*)/(?P<branch>.*)", - "{{ .branch }}|{{ .remote }}", - "", - func(actualEntry []commandMenuEntry, err error) { - assert.NoError(t, err) - assert.EqualValues(t, "pr-1|upstream", actualEntry[0].value) - assert.EqualValues(t, "pr-1|upstream", actualEntry[0].label) - }, - }, - { - "Multiple named groups with group ids", - "upstream/pr-1", - "(?P<remote>[a-z]*)/(?P<branch>.*)", - "{{ .group_2 }}|{{ .group_1 }}", - "Remote: {{ .group_1 }}", - func(actualEntry []commandMenuEntry, err error) { - assert.NoError(t, err) - assert.EqualValues(t, "pr-1|upstream", actualEntry[0].value) - assert.EqualValues(t, "Remote: upstream", actualEntry[0].label) - }, - }, - } - - for _, s := range scenarios { - t.Run(s.testName, func(t *testing.T) { - s.test(NewDummyGui().GenerateMenuCandidates(s.cmdOut, s.filter, s.valueFormat, s.labelFormat)) - }) - } -} diff --git a/pkg/integration/integration.go b/pkg/integration/integration.go index 577aaa3b8..4b1842d44 100644 --- a/pkg/integration/integration.go +++ b/pkg/integration/integration.go @@ -33,7 +33,7 @@ func RunTests( updateSnapshots bool, record bool, speedEnv string, - onFail func(t *testing.T, expected string, actual string), + onFail func(t *testing.T, expected string, actual string, prefix string), includeSkipped bool, ) error { rootDir := GetRootDirectory() @@ -66,8 +66,10 @@ func RunTests( fnWrapper(test, func(t *testing.T) error { speeds := getTestSpeeds(test.Speed, updateSnapshots, speedEnv) testPath := filepath.Join(testDir, test.Name) - actualDir := filepath.Join(testPath, "actual") - expectedDir := filepath.Join(testPath, "expected") + actualRepoDir := filepath.Join(testPath, "actual") + expectedRepoDir := filepath.Join(testPath, "expected") + actualRemoteDir := filepath.Join(testPath, "actual_remote") + expectedRemoteDir := filepath.Join(testPath, "expected_remote") logf("path: %s", testPath) // three retries at normal speed for the sake of flakey tests @@ -76,8 +78,9 @@ func RunTests( logf("%s: attempting test at speed %f\n", test.Name, speed) findOrCreateDir(testPath) - prepareIntegrationTestDir(actualDir) - err := createFixture(testPath, actualDir) + prepareIntegrationTestDir(actualRepoDir) + removeRemoteDir(actualRemoteDir) + err := createFixture(testPath, actualRepoDir) if err != nil { return err } @@ -95,25 +98,46 @@ func RunTests( } if updateSnapshots { - err = oscommands.CopyDir(actualDir, expectedDir) + err = oscommands.CopyDir(actualRepoDir, expectedRepoDir) if err != nil { return err } err = os.Rename( - filepath.Join(expectedDir, ".git"), - filepath.Join(expectedDir, ".git_keep"), + filepath.Join(expectedRepoDir, ".git"), + filepath.Join(expectedRepoDir, ".git_keep"), ) if err != nil { return err } + + // see if we have a remote dir and if so, copy it over. Otherwise, delete the expected dir because we have no remote folder. + if folderExists(actualRemoteDir) { + err = oscommands.CopyDir(actualRemoteDir, expectedRemoteDir) + if err != nil { + return err + } + } else { + removeRemoteDir(expectedRemoteDir) + } } - actual, expected, err := generateSnapshots(actualDir, expectedDir) + actualRepo, expectedRepo, err := generateSnapshots(actualRepoDir, expectedRepoDir) if err != nil { return err } - if expected == actual { + actualRemote := "remote folder does not exist" + expectedRemote := "remote folder does not exist" + if folderExists(expectedRemoteDir) { + actualRemote, expectedRemote, err = generateSnapshotsForRemote(actualRemoteDir, expectedRemoteDir) + if err != nil { + return err + } + } else if folderExists(actualRemoteDir) { + actualRemote = "remote folder exists" + } + + if expectedRepo == actualRepo && expectedRemote == actualRemote { logf("%s: success at speed %f\n", test.Name, speed) break } @@ -126,7 +150,11 @@ func RunTests( return err } logf("%s", string(bytes)) - onFail(t, expected, actual) + if expectedRepo != actualRepo { + onFail(t, expectedRepo, actualRepo, "repo") + } else { + onFail(t, expectedRemote, actualRemote, "remote") + } } } @@ -137,6 +165,13 @@ func RunTests( return nil } +func removeRemoteDir(dir string) { + err := os.RemoveAll(dir) + if err != nil { + panic(err) + } +} + func prepareIntegrationTestDir(actualDir string) { // remove contents of integration test directory dir, err := ioutil.ReadDir(actualDir) @@ -351,6 +386,20 @@ func generateSnapshots(actualDir string, expectedDir string) (string, string, er return actual, expected, nil } +func generateSnapshotsForRemote(actualDir string, expectedDir string) (string, string, error) { + actual, err := generateSnapshot(actualDir) + if err != nil { + return "", "", err + } + + expected, err := generateSnapshot(expectedDir) + if err != nil { + return "", "", err + } + + return actual, expected, nil +} + func getLazygitCommand(testPath string, rootDir string, record bool, speed float64, extraCmdArgs string) (*exec.Cmd, error) { osCommand := oscommands.NewDummyOSCommand() @@ -397,3 +446,8 @@ func getLazygitCommand(testPath string, rootDir string, record bool, speed float return cmd, nil } + +func folderExists(path string) bool { + _, err := os.Stat(path) + return err == nil +} diff --git a/test/integration/forcePush/expected/.git_keep/COMMIT_EDITMSG b/test/integration/forcePush/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/forcePush/expected/.git_keep/FETCH_HEAD b/test/integration/forcePush/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..8997b0d11 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +a9848fd98935937cd7d3909023ed1b588ccd4bfb branch 'master' of ../actual_remote diff --git a/test/integration/forcePush/expected/.git_keep/HEAD b/test/integration/forcePush/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/forcePush/expected/.git_keep/ORIG_HEAD b/test/integration/forcePush/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..c081af82f --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +a9848fd98935937cd7d3909023ed1b588ccd4bfb diff --git a/test/integration/forcePush/expected/.git_keep/config b/test/integration/forcePush/expected/.git_keep/config new file mode 100644 index 000000000..821803a3e --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/config @@ -0,0 +1,16 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/forcePush/expected/.git_keep/description b/test/integration/forcePush/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePush/expected/.git_keep/index b/test/integration/forcePush/expected/.git_keep/index new file mode 100644 index 000000000..84d23c3f4 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/index differ diff --git a/test/integration/forcePush/expected/.git_keep/info/exclude b/test/integration/forcePush/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/forcePush/expected/.git_keep/logs/HEAD b/test/integration/forcePush/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..9cef8b360 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 1fe60e6b7023a1b9751850f83ac5bda49ddd9278 CI <CI@example.com> 1634897551 +1100 commit (initial): myfile1 +1fe60e6b7023a1b9751850f83ac5bda49ddd9278 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 commit: myfile2 +66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 commit: myfile3 +a9848fd98935937cd7d3909023ed1b588ccd4bfb 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 reset: moving to HEAD^ +66bd8d357f6226ec264478db3606bc1c4be87e63 aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897551 +1100 commit: myfile4 diff --git a/test/integration/forcePush/expected/.git_keep/logs/refs/heads/master b/test/integration/forcePush/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..9cef8b360 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 1fe60e6b7023a1b9751850f83ac5bda49ddd9278 CI <CI@example.com> 1634897551 +1100 commit (initial): myfile1 +1fe60e6b7023a1b9751850f83ac5bda49ddd9278 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 commit: myfile2 +66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 commit: myfile3 +a9848fd98935937cd7d3909023ed1b588ccd4bfb 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 reset: moving to HEAD^ +66bd8d357f6226ec264478db3606bc1c4be87e63 aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897551 +1100 commit: myfile4 diff --git a/test/integration/forcePush/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/forcePush/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..9ba3d77f4 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 fetch origin: storing head +66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 update by push +a9848fd98935937cd7d3909023ed1b588ccd4bfb aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897553 +1100 update by push diff --git a/test/integration/forcePush/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePush/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/forcePush/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 b/test/integration/forcePush/expected/.git_keep/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 new file mode 100644 index 000000000..3c2c7f4e4 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 @@ -0,0 +1,5 @@ +x��A +�0@Ѯs��JF'�E +�<FL&Tp�H +����~�TU�H|k�X�Tl��2�`���X<-�g���L��w=`��9�/9��<R��{ +�w�h���5i�'7�-�&h~4�,� \ No newline at end of file diff --git a/test/integration/forcePush/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePush/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 b/test/integration/forcePush/expected/.git_keep/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 new file mode 100644 index 000000000..6ee9e62f1 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePush/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePush/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb b/test/integration/forcePush/expected/.git_keep/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb new file mode 100644 index 000000000..9dfd3c702 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd b/test/integration/forcePush/expected/.git_keep/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd new file mode 100644 index 000000000..3cd0bc9f7 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd @@ -0,0 +1,3 @@ +x��A +�0@Q�9���$�I +"BW=F2�b��R"����>������:�]Dm��z�9�^stRB�sf�2����ly�W�Cj�>ę�c�D1���r*���7�����q��'���Y� �=�!��pF��zLu�37�;/O%��):e \ No newline at end of file diff --git a/test/integration/forcePush/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePush/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 new file mode 100644 index 000000000..5e9361d35 Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePush/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/forcePush/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePush/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/forcePush/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/forcePush/expected/.git_keep/refs/heads/master b/test/integration/forcePush/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..eaa7bcba3 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +aed1af42535c9c6a27b9f660119452328fddd7cd diff --git a/test/integration/forcePush/expected/.git_keep/refs/remotes/origin/master b/test/integration/forcePush/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..eaa7bcba3 --- /dev/null +++ b/test/integration/forcePush/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +aed1af42535c9c6a27b9f660119452328fddd7cd diff --git a/test/integration/forcePush/expected/myfile1 b/test/integration/forcePush/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/forcePush/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/forcePush/expected/myfile2 b/test/integration/forcePush/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/forcePush/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/forcePush/expected/myfile4 b/test/integration/forcePush/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/forcePush/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/forcePush/expected_remote/HEAD b/test/integration/forcePush/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/forcePush/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/forcePush/expected_remote/config b/test/integration/forcePush/expected_remote/config new file mode 100644 index 000000000..ea4d9033b --- /dev/null +++ b/test/integration/forcePush/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/forcePush/./actual diff --git a/test/integration/forcePush/expected_remote/description b/test/integration/forcePush/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/forcePush/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/forcePush/expected_remote/info/exclude b/test/integration/forcePush/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/forcePush/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/forcePush/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/forcePush/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/forcePush/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/forcePush/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/forcePush/expected_remote/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 b/test/integration/forcePush/expected_remote/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 new file mode 100644 index 000000000..3c2c7f4e4 --- /dev/null +++ b/test/integration/forcePush/expected_remote/objects/1f/e60e6b7023a1b9751850f83ac5bda49ddd9278 @@ -0,0 +1,5 @@ +x��A +�0@Ѯs��JF'�E +�<FL&Tp�H +����~�TU�H|k�X�Tl��2�`���X<-�g���L��w=`��9�/9��<R��{ +�w�h���5i�'7�-�&h~4�,� \ No newline at end of file diff --git a/test/integration/forcePush/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/forcePush/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/forcePush/expected_remote/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 b/test/integration/forcePush/expected_remote/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 new file mode 100644 index 000000000..6ee9e62f1 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/66/bd8d357f6226ec264478db3606bc1c4be87e63 differ diff --git a/test/integration/forcePush/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/forcePush/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/forcePush/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/forcePush/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/forcePush/expected_remote/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb b/test/integration/forcePush/expected_remote/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb new file mode 100644 index 000000000..9dfd3c702 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/a9/848fd98935937cd7d3909023ed1b588ccd4bfb differ diff --git a/test/integration/forcePush/expected_remote/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd b/test/integration/forcePush/expected_remote/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd new file mode 100644 index 000000000..3cd0bc9f7 --- /dev/null +++ b/test/integration/forcePush/expected_remote/objects/ae/d1af42535c9c6a27b9f660119452328fddd7cd @@ -0,0 +1,3 @@ +x��A +�0@Q�9���$�I +"BW=F2�b��R"����>������:�]Dm��z�9�^stRB�sf�2����ly�W�Cj�>ę�c�D1���r*���7�����q��'���Y� �=�!��pF��zLu�37�;/O%��):e \ No newline at end of file diff --git a/test/integration/forcePush/expected_remote/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/forcePush/expected_remote/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 new file mode 100644 index 000000000..5e9361d35 Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 differ diff --git a/test/integration/forcePush/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/forcePush/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/forcePush/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/forcePush/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/forcePush/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/forcePush/expected_remote/packed-refs b/test/integration/forcePush/expected_remote/packed-refs new file mode 100644 index 000000000..7a7114a0a --- /dev/null +++ b/test/integration/forcePush/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +66bd8d357f6226ec264478db3606bc1c4be87e63 refs/heads/master diff --git a/test/integration/forcePush/expected_remote/refs/heads/master b/test/integration/forcePush/expected_remote/refs/heads/master new file mode 100644 index 000000000..eaa7bcba3 --- /dev/null +++ b/test/integration/forcePush/expected_remote/refs/heads/master @@ -0,0 +1 @@ +aed1af42535c9c6a27b9f660119452328fddd7cd diff --git a/test/integration/forcePush/recording.json b/test/integration/forcePush/recording.json new file mode 100644 index 000000000..1fd122aab --- /dev/null +++ b/test/integration/forcePush/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1054,"Mod":0,"Key":256,"Ch":80},{"Timestamp":1736,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2486,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/forcePush/setup.sh b/test/integration/forcePush/setup.sh new file mode 100644 index 000000000..79a9499d0 --- /dev/null +++ b/test/integration/forcePush/setup.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +echo test3 > myfile3 +git add . +git commit -am "myfile3" + +git push origin master + +git reset --hard HEAD^ + +echo test4 > myfile4 +git add . +git commit -am "myfile4" + diff --git a/test/integration/forcePush/test.json b/test/integration/forcePush/test.json new file mode 100644 index 000000000..42519ead4 --- /dev/null +++ b/test/integration/forcePush/test.json @@ -0,0 +1 @@ +{ "description": "force push with lease if required", "speed": 10 } diff --git a/test/integration/pull/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pull/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/pull/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/pull/expected/.git_keep/FETCH_HEAD b/test/integration/pull/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..d13b7c7d7 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +6ad6c42187d356f4eab4f004cca17863746adec1 branch 'master' of ../actual_remote diff --git a/test/integration/pull/expected/.git_keep/HEAD b/test/integration/pull/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pull/expected/.git_keep/ORIG_HEAD b/test/integration/pull/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..22c16cf39 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +0c0f210a4e5ff3b58e4190501c2b755695f439fa diff --git a/test/integration/pull/expected/.git_keep/config b/test/integration/pull/expected/.git_keep/config new file mode 100644 index 000000000..821803a3e --- /dev/null +++ b/test/integration/pull/expected/.git_keep/config @@ -0,0 +1,16 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/pull/expected/.git_keep/description b/test/integration/pull/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pull/expected/.git_keep/index b/test/integration/pull/expected/.git_keep/index new file mode 100644 index 000000000..85847f137 Binary files /dev/null and b/test/integration/pull/expected/.git_keep/index differ diff --git a/test/integration/pull/expected/.git_keep/info/exclude b/test/integration/pull/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pull/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pull/expected/.git_keep/logs/HEAD b/test/integration/pull/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..f15401d8d --- /dev/null +++ b/test/integration/pull/expected/.git_keep/logs/HEAD @@ -0,0 +1,6 @@ +0000000000000000000000000000000000000000 003527daa0801470151d8f93140a02fc306fea00 CI <CI@example.com> 1634896904 +1100 commit (initial): myfile1 +003527daa0801470151d8f93140a02fc306fea00 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 commit: myfile2 +0c0f210a4e5ff3b58e4190501c2b755695f439fa 336826e035e431ac94eca7f3cb6dd3fb072f7a5a CI <CI@example.com> 1634896904 +1100 commit: myfile3 +336826e035e431ac94eca7f3cb6dd3fb072f7a5a 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 commit: myfile4 +6ad6c42187d356f4eab4f004cca17863746adec1 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 reset: moving to head^^ +0c0f210a4e5ff3b58e4190501c2b755695f439fa 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896905 +1100 pull --no-edit: Fast-forward diff --git a/test/integration/pull/expected/.git_keep/logs/refs/heads/master b/test/integration/pull/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..f15401d8d --- /dev/null +++ b/test/integration/pull/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,6 @@ +0000000000000000000000000000000000000000 003527daa0801470151d8f93140a02fc306fea00 CI <CI@example.com> 1634896904 +1100 commit (initial): myfile1 +003527daa0801470151d8f93140a02fc306fea00 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 commit: myfile2 +0c0f210a4e5ff3b58e4190501c2b755695f439fa 336826e035e431ac94eca7f3cb6dd3fb072f7a5a CI <CI@example.com> 1634896904 +1100 commit: myfile3 +336826e035e431ac94eca7f3cb6dd3fb072f7a5a 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 commit: myfile4 +6ad6c42187d356f4eab4f004cca17863746adec1 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 reset: moving to head^^ +0c0f210a4e5ff3b58e4190501c2b755695f439fa 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896905 +1100 pull --no-edit: Fast-forward diff --git a/test/integration/pull/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pull/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..b254fcd0d --- /dev/null +++ b/test/integration/pull/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 fetch origin: storing head diff --git a/test/integration/pull/expected/.git_keep/objects/00/3527daa0801470151d8f93140a02fc306fea00 b/test/integration/pull/expected/.git_keep/objects/00/3527daa0801470151d8f93140a02fc306fea00 new file mode 100644 index 000000000..0ed3c76d8 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/objects/00/3527daa0801470151d8f93140a02fc306fea00 @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��ʌN�J\y��L���")���#t�y�S5[˥���*�`�e�3���쩋T^���%�{�⧽���i����-U{I�>H@�+�;�9i�'w�+��4�,� \ No newline at end of file diff --git a/test/integration/pull/expected/.git_keep/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa b/test/integration/pull/expected/.git_keep/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa new file mode 100644 index 000000000..a89fa981c Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa differ diff --git a/test/integration/pull/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pull/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pull/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pull/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pull/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pull/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pull/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pull/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pull/expected/.git_keep/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a b/test/integration/pull/expected/.git_keep/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a new file mode 100644 index 000000000..2b7ab37ad Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a differ diff --git a/test/integration/pull/expected/.git_keep/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 b/test/integration/pull/expected/.git_keep/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 new file mode 100644 index 000000000..335077711 --- /dev/null +++ b/test/integration/pull/expected/.git_keep/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��d2�I"BW=�4�`��R"����~�◵��[�t껪��!��#Lh�kdO��f�]_�"r����LZ$V,�3��E_�1��u��h��x�������FJ��#{p�����'7�[������90 \ No newline at end of file diff --git a/test/integration/pull/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pull/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pull/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pull/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pull/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pull/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pull/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pull/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pull/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pull/expected/.git_keep/refs/heads/master b/test/integration/pull/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..120f0043b --- /dev/null +++ b/test/integration/pull/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +6ad6c42187d356f4eab4f004cca17863746adec1 diff --git a/test/integration/pull/expected/.git_keep/refs/remotes/origin/master b/test/integration/pull/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..120f0043b --- /dev/null +++ b/test/integration/pull/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +6ad6c42187d356f4eab4f004cca17863746adec1 diff --git a/test/integration/pull/expected/myfile1 b/test/integration/pull/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pull/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pull/expected/myfile2 b/test/integration/pull/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pull/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pull/expected/myfile3 b/test/integration/pull/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pull/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pull/expected/myfile4 b/test/integration/pull/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pull/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pull/expected_remote/HEAD b/test/integration/pull/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pull/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pull/expected_remote/config b/test/integration/pull/expected_remote/config new file mode 100644 index 000000000..94ceda391 --- /dev/null +++ b/test/integration/pull/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pull/./actual diff --git a/test/integration/pull/expected_remote/description b/test/integration/pull/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pull/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pull/expected_remote/info/exclude b/test/integration/pull/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pull/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pull/expected_remote/objects/00/3527daa0801470151d8f93140a02fc306fea00 b/test/integration/pull/expected_remote/objects/00/3527daa0801470151d8f93140a02fc306fea00 new file mode 100644 index 000000000..0ed3c76d8 --- /dev/null +++ b/test/integration/pull/expected_remote/objects/00/3527daa0801470151d8f93140a02fc306fea00 @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��ʌN�J\y��L���")���#t�y�S5[˥���*�`�e�3���쩋T^���%�{�⧽���i����-U{I�>H@�+�;�9i�'w�+��4�,� \ No newline at end of file diff --git a/test/integration/pull/expected_remote/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa b/test/integration/pull/expected_remote/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa new file mode 100644 index 000000000..a89fa981c Binary files /dev/null and b/test/integration/pull/expected_remote/objects/0c/0f210a4e5ff3b58e4190501c2b755695f439fa differ diff --git a/test/integration/pull/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pull/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pull/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pull/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pull/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pull/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pull/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pull/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pull/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pull/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pull/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pull/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pull/expected_remote/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a b/test/integration/pull/expected_remote/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a new file mode 100644 index 000000000..2b7ab37ad Binary files /dev/null and b/test/integration/pull/expected_remote/objects/33/6826e035e431ac94eca7f3cb6dd3fb072f7a5a differ diff --git a/test/integration/pull/expected_remote/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 b/test/integration/pull/expected_remote/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 new file mode 100644 index 000000000..335077711 --- /dev/null +++ b/test/integration/pull/expected_remote/objects/6a/d6c42187d356f4eab4f004cca17863746adec1 @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��d2�I"BW=�4�`��R"����~�◵��[�t껪��!��#Lh�kdO��f�]_�"r����LZ$V,�3��E_�1��u��h��x�������FJ��#{p�����'7�[������90 \ No newline at end of file diff --git a/test/integration/pull/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pull/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pull/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pull/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pull/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pull/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pull/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pull/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pull/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pull/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pull/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pull/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pull/expected_remote/packed-refs b/test/integration/pull/expected_remote/packed-refs new file mode 100644 index 000000000..2683a6cf6 --- /dev/null +++ b/test/integration/pull/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +6ad6c42187d356f4eab4f004cca17863746adec1 refs/heads/master diff --git a/test/integration/pull/recording.json b/test/integration/pull/recording.json new file mode 100644 index 000000000..9aa74c150 --- /dev/null +++ b/test/integration/pull/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":618,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1225,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pull/setup.sh b/test/integration/pull/setup.sh new file mode 100644 index 000000000..2634d0278 --- /dev/null +++ b/test/integration/pull/setup.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +# the test is to ensure that we actually can pull these two commits back from the origin +git reset --hard HEAD~2 +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master diff --git a/test/integration/pull/test.json b/test/integration/pull/test.json new file mode 100644 index 000000000..93a03aaea --- /dev/null +++ b/test/integration/pull/test.json @@ -0,0 +1 @@ +{ "description": "pull changes from the remote", "speed": 10 } diff --git a/test/integration/pullMerge/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullMerge/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/pullMerge/expected/.git_keep/FETCH_HEAD b/test/integration/pullMerge/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e2a5e2793 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +7f157a65ec0c8d6cffce08d6768e6733939e75a1 branch 'master' of ../actual_remote diff --git a/test/integration/pullMerge/expected/.git_keep/HEAD b/test/integration/pullMerge/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullMerge/expected/.git_keep/ORIG_HEAD b/test/integration/pullMerge/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..d3db7a1d9 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +2a0805355a8040f9eebfa2dbf70b8bc313d6f456 diff --git a/test/integration/pullMerge/expected/.git_keep/config b/test/integration/pullMerge/expected/.git_keep/config new file mode 100644 index 000000000..110d1b43e --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = false diff --git a/test/integration/pullMerge/expected/.git_keep/description b/test/integration/pullMerge/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullMerge/expected/.git_keep/index b/test/integration/pullMerge/expected/.git_keep/index new file mode 100644 index 000000000..d8f385b74 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/index differ diff --git a/test/integration/pullMerge/expected/.git_keep/info/exclude b/test/integration/pullMerge/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullMerge/expected/.git_keep/logs/HEAD b/test/integration/pullMerge/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..bd085fb7f --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/logs/HEAD @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 7c0bda1656e7695870ed15839643564b0a9283a8 CI <CI@example.com> 1634896907 +1100 commit (initial): myfile1 +7c0bda1656e7695870ed15839643564b0a9283a8 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 commit: myfile2 +5529eadf398ce89032744d5f4151000f07d70124 703e85166069a42b4254af06b68dffc159ea3f24 CI <CI@example.com> 1634896907 +1100 commit: myfile3 +703e85166069a42b4254af06b68dffc159ea3f24 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 commit: myfile4 +7f157a65ec0c8d6cffce08d6768e6733939e75a1 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 reset: moving to head^^ +5529eadf398ce89032744d5f4151000f07d70124 2a0805355a8040f9eebfa2dbf70b8bc313d6f456 CI <CI@example.com> 1634896907 +1100 commit: myfile4 +2a0805355a8040f9eebfa2dbf70b8bc313d6f456 b10baba2f9d877322f94f8770e2e0c8ab1db6bcc CI <CI@example.com> 1634896908 +1100 pull --no-edit: Merge made by the 'recursive' strategy. diff --git a/test/integration/pullMerge/expected/.git_keep/logs/refs/heads/master b/test/integration/pullMerge/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..bd085fb7f --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 7c0bda1656e7695870ed15839643564b0a9283a8 CI <CI@example.com> 1634896907 +1100 commit (initial): myfile1 +7c0bda1656e7695870ed15839643564b0a9283a8 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 commit: myfile2 +5529eadf398ce89032744d5f4151000f07d70124 703e85166069a42b4254af06b68dffc159ea3f24 CI <CI@example.com> 1634896907 +1100 commit: myfile3 +703e85166069a42b4254af06b68dffc159ea3f24 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 commit: myfile4 +7f157a65ec0c8d6cffce08d6768e6733939e75a1 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 reset: moving to head^^ +5529eadf398ce89032744d5f4151000f07d70124 2a0805355a8040f9eebfa2dbf70b8bc313d6f456 CI <CI@example.com> 1634896907 +1100 commit: myfile4 +2a0805355a8040f9eebfa2dbf70b8bc313d6f456 b10baba2f9d877322f94f8770e2e0c8ab1db6bcc CI <CI@example.com> 1634896908 +1100 pull --no-edit: Merge made by the 'recursive' strategy. diff --git a/test/integration/pullMerge/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullMerge/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..cd4098ff1 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 fetch origin: storing head diff --git a/test/integration/pullMerge/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullMerge/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullMerge/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/2a/0805355a8040f9eebfa2dbf70b8bc313d6f456 b/test/integration/pullMerge/expected/.git_keep/objects/2a/0805355a8040f9eebfa2dbf70b8bc313d6f456 new file mode 100644 index 000000000..8988a8d06 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/2a/0805355a8040f9eebfa2dbf70b8bc313d6f456 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullMerge/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullMerge/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/55/29eadf398ce89032744d5f4151000f07d70124 b/test/integration/pullMerge/expected/.git_keep/objects/55/29eadf398ce89032744d5f4151000f07d70124 new file mode 100644 index 000000000..c0dd8a01d --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/objects/55/29eadf398ce89032744d5f4151000f07d70124 @@ -0,0 +1,2 @@ +x��K +�0@]��2��$"BW=ƴ�`��R"����>�7��-�"�S�U�$P"W(E�2�<eGT�����d6���m�a*�Iq� �`̞)�Haa��d#��Xw;��:�w�H۞z��v�H>�ɞ�A����}��Tg~j|9] \ No newline at end of file diff --git a/test/integration/pullMerge/expected/.git_keep/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 b/test/integration/pullMerge/expected/.git_keep/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 new file mode 100644 index 000000000..48dfdc50c Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 b/test/integration/pullMerge/expected/.git_keep/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 new file mode 100644 index 000000000..b08614b98 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 @@ -0,0 +1,3 @@ +x��A +�0@Q�9���i�I"BW=F�L��!R"����~�����r�*�J��d�QCaV +R ����"\S�.����0�p��~��6��fw 9D���L��zL��ɝ}�)�5�,� \ No newline at end of file diff --git a/test/integration/pullMerge/expected/.git_keep/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 b/test/integration/pullMerge/expected/.git_keep/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 new file mode 100644 index 000000000..1af721127 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullMerge/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullMerge/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/b1/0baba2f9d877322f94f8770e2e0c8ab1db6bcc b/test/integration/pullMerge/expected/.git_keep/objects/b1/0baba2f9d877322f94f8770e2e0c8ab1db6bcc new file mode 100644 index 000000000..d3842cf9b Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/b1/0baba2f9d877322f94f8770e2e0c8ab1db6bcc differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 b/test/integration/pullMerge/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 new file mode 100644 index 000000000..5e9361d35 Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/ce/0848710343a75263ea72cb5bdfa666b9ecda68 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullMerge/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullMerge/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullMerge/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullMerge/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullMerge/expected/.git_keep/refs/heads/master b/test/integration/pullMerge/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..547542fbd --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +b10baba2f9d877322f94f8770e2e0c8ab1db6bcc diff --git a/test/integration/pullMerge/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullMerge/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..0b78ce1e0 --- /dev/null +++ b/test/integration/pullMerge/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +7f157a65ec0c8d6cffce08d6768e6733939e75a1 diff --git a/test/integration/pullMerge/expected/myfile1 b/test/integration/pullMerge/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullMerge/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullMerge/expected/myfile2 b/test/integration/pullMerge/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullMerge/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullMerge/expected/myfile3 b/test/integration/pullMerge/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullMerge/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullMerge/expected/myfile4 b/test/integration/pullMerge/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pullMerge/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pullMerge/expected_remote/HEAD b/test/integration/pullMerge/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullMerge/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullMerge/expected_remote/config b/test/integration/pullMerge/expected_remote/config new file mode 100644 index 000000000..5a46fafb8 --- /dev/null +++ b/test/integration/pullMerge/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullMerge/./actual diff --git a/test/integration/pullMerge/expected_remote/description b/test/integration/pullMerge/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullMerge/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullMerge/expected_remote/info/exclude b/test/integration/pullMerge/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullMerge/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullMerge/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullMerge/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullMerge/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullMerge/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullMerge/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullMerge/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullMerge/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullMerge/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullMerge/expected_remote/objects/55/29eadf398ce89032744d5f4151000f07d70124 b/test/integration/pullMerge/expected_remote/objects/55/29eadf398ce89032744d5f4151000f07d70124 new file mode 100644 index 000000000..c0dd8a01d --- /dev/null +++ b/test/integration/pullMerge/expected_remote/objects/55/29eadf398ce89032744d5f4151000f07d70124 @@ -0,0 +1,2 @@ +x��K +�0@]��2��$"BW=ƴ�`��R"����>�7��-�"�S�U�$P"W(E�2�<eGT�����d6���m�a*�Iq� �`̞)�Haa��d#��Xw;��:�w�H۞z��v�H>�ɞ�A����}��Tg~j|9] \ No newline at end of file diff --git a/test/integration/pullMerge/expected_remote/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 b/test/integration/pullMerge/expected_remote/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 new file mode 100644 index 000000000..48dfdc50c Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/70/3e85166069a42b4254af06b68dffc159ea3f24 differ diff --git a/test/integration/pullMerge/expected_remote/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 b/test/integration/pullMerge/expected_remote/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 new file mode 100644 index 000000000..b08614b98 --- /dev/null +++ b/test/integration/pullMerge/expected_remote/objects/7c/0bda1656e7695870ed15839643564b0a9283a8 @@ -0,0 +1,3 @@ +x��A +�0@Q�9���i�I"BW=F�L��!R"����~�����r�*�J��d�QCaV +R ����"\S�.����0�p��~��6��fw 9D���L��zL��ɝ}�)�5�,� \ No newline at end of file diff --git a/test/integration/pullMerge/expected_remote/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 b/test/integration/pullMerge/expected_remote/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 new file mode 100644 index 000000000..1af721127 Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/7f/157a65ec0c8d6cffce08d6768e6733939e75a1 differ diff --git a/test/integration/pullMerge/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullMerge/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullMerge/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullMerge/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullMerge/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullMerge/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullMerge/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullMerge/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullMerge/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullMerge/expected_remote/packed-refs b/test/integration/pullMerge/expected_remote/packed-refs new file mode 100644 index 000000000..0ec136723 --- /dev/null +++ b/test/integration/pullMerge/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +7f157a65ec0c8d6cffce08d6768e6733939e75a1 refs/heads/master diff --git a/test/integration/pullMerge/recording.json b/test/integration/pullMerge/recording.json new file mode 100644 index 000000000..9b948e3eb --- /dev/null +++ b/test/integration/pullMerge/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":537,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1401,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullMerge/setup.sh b/test/integration/pullMerge/setup.sh new file mode 100644 index 000000000..b9d9a933a --- /dev/null +++ b/test/integration/pullMerge/setup.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase false diff --git a/test/integration/pullMerge/test.json b/test/integration/pullMerge/test.json new file mode 100644 index 000000000..8ce8c71bb --- /dev/null +++ b/test/integration/pullMerge/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with merge, ensure a merge commit is created upon pull", "speed": 10 } diff --git a/test/integration/pullMergeConflict/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullMergeConflict/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..ce92bd599 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1,25 @@ +Merge branch 'master' of ../actual_remote + +# Conflicts: +# myfile4 +# +# It looks like you may be committing a merge. +# If this is not correct, please remove the file +# /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullMergeConflict/actual/.git/MERGE_HEAD +# and try again. + + +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# On branch master +# Your branch and 'origin/master' have diverged, +# and have 1 and 2 different commits each, respectively. +# (use "git pull" to merge the remote branch into yours) +# +# All conflicts fixed but you are still merging. +# +# Changes to be committed: +# new file: myfile3 +# modified: myfile4 +# diff --git a/test/integration/pullMergeConflict/expected/.git_keep/FETCH_HEAD b/test/integration/pullMergeConflict/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..bd1ba7678 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +38699899bb94dfae74e3e55cf5bd6d92e6f3292a branch 'master' of ../actual_remote diff --git a/test/integration/pullMergeConflict/expected/.git_keep/HEAD b/test/integration/pullMergeConflict/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullMergeConflict/expected/.git_keep/ORIG_HEAD b/test/integration/pullMergeConflict/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..703055cf2 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +7dba68a0030313e27b8dd5da2076952629485f2d diff --git a/test/integration/pullMergeConflict/expected/.git_keep/config b/test/integration/pullMergeConflict/expected/.git_keep/config new file mode 100644 index 000000000..110d1b43e --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = false diff --git a/test/integration/pullMergeConflict/expected/.git_keep/description b/test/integration/pullMergeConflict/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullMergeConflict/expected/.git_keep/index b/test/integration/pullMergeConflict/expected/.git_keep/index new file mode 100644 index 000000000..d9ffd9453 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/index differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/info/exclude b/test/integration/pullMergeConflict/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullMergeConflict/expected/.git_keep/logs/HEAD b/test/integration/pullMergeConflict/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..566b28a05 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/logs/HEAD @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 f0e8e7922de77a5ab20b924640c8b8435bae0b0b CI <CI@example.com> 1634896911 +1100 commit (initial): myfile1 +f0e8e7922de77a5ab20b924640c8b8435bae0b0b ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 commit: myfile2 +ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 CI <CI@example.com> 1634896911 +1100 commit: myfile3 +80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 commit: myfile4 +38699899bb94dfae74e3e55cf5bd6d92e6f3292a ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 reset: moving to head^^ +ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 7dba68a0030313e27b8dd5da2076952629485f2d CI <CI@example.com> 1634896911 +1100 commit: myfile4 conflict +7dba68a0030313e27b8dd5da2076952629485f2d 720c7e2dd34822d33cb24a0a3f0f4bdabf433500 CI <CI@example.com> 1634896916 +1100 commit (merge): Merge branch 'master' of ../actual_remote diff --git a/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/heads/master b/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..566b28a05 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 f0e8e7922de77a5ab20b924640c8b8435bae0b0b CI <CI@example.com> 1634896911 +1100 commit (initial): myfile1 +f0e8e7922de77a5ab20b924640c8b8435bae0b0b ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 commit: myfile2 +ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 CI <CI@example.com> 1634896911 +1100 commit: myfile3 +80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 commit: myfile4 +38699899bb94dfae74e3e55cf5bd6d92e6f3292a ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 reset: moving to head^^ +ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 7dba68a0030313e27b8dd5da2076952629485f2d CI <CI@example.com> 1634896911 +1100 commit: myfile4 conflict +7dba68a0030313e27b8dd5da2076952629485f2d 720c7e2dd34822d33cb24a0a3f0f4bdabf433500 CI <CI@example.com> 1634896916 +1100 commit (merge): Merge branch 'master' of ../actual_remote diff --git a/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..4473fe625 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 fetch origin: storing head diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullMergeConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullMergeConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/1f/e5d8152187295b171f171c0d55d809500ae80f b/test/integration/pullMergeConflict/expected/.git_keep/objects/1f/e5d8152187295b171f171c0d55d809500ae80f new file mode 100644 index 000000000..5fcd3c3ea Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/1f/e5d8152187295b171f171c0d55d809500ae80f differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullMergeConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullMergeConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a b/test/integration/pullMergeConflict/expected/.git_keep/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a new file mode 100644 index 000000000..c7b25d78c --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a @@ -0,0 +1,3 @@ +x��A +�0@Q�9E���4�i"BW=F:�����D���#���ŗ�֥y�tj��'�PH�4!sL%D֞; +QJ�趲����2O��5�p�AB6�m�(ٕw{��Fƻ~Jݞz���<r��9#�3"�;�1��O��ז���259� \ No newline at end of file diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/72/0c7e2dd34822d33cb24a0a3f0f4bdabf433500 b/test/integration/pullMergeConflict/expected/.git_keep/objects/72/0c7e2dd34822d33cb24a0a3f0f4bdabf433500 new file mode 100644 index 000000000..a7ca5da80 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/72/0c7e2dd34822d33cb24a0a3f0f4bdabf433500 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/7d/ba68a0030313e27b8dd5da2076952629485f2d b/test/integration/pullMergeConflict/expected/.git_keep/objects/7d/ba68a0030313e27b8dd5da2076952629485f2d new file mode 100644 index 000000000..bbb1cce71 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/7d/ba68a0030313e27b8dd5da2076952629485f2d differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 b/test/integration/pullMergeConflict/expected/.git_keep/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 new file mode 100644 index 000000000..c589d7b21 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae b/test/integration/pullMergeConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae new file mode 100644 index 000000000..13e3f581a Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullMergeConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullMergeConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 b/test/integration/pullMergeConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 new file mode 100644 index 000000000..5a90eb5f9 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullMergeConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa b/test/integration/pullMergeConflict/expected/.git_keep/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa new file mode 100644 index 000000000..805becbe2 Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullMergeConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullMergeConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullMergeConflict/expected/.git_keep/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b b/test/integration/pullMergeConflict/expected/.git_keep/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b new file mode 100644 index 000000000..16a061777 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ �����S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D��pE�ޝ��4��;��uSt4M,� \ No newline at end of file diff --git a/test/integration/pullMergeConflict/expected/.git_keep/refs/heads/master b/test/integration/pullMergeConflict/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..1276860f9 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +720c7e2dd34822d33cb24a0a3f0f4bdabf433500 diff --git a/test/integration/pullMergeConflict/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullMergeConflict/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..859a8b890 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +38699899bb94dfae74e3e55cf5bd6d92e6f3292a diff --git a/test/integration/pullMergeConflict/expected/myfile1 b/test/integration/pullMergeConflict/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullMergeConflict/expected/myfile2 b/test/integration/pullMergeConflict/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullMergeConflict/expected/myfile3 b/test/integration/pullMergeConflict/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullMergeConflict/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullMergeConflict/expected/myfile4 b/test/integration/pullMergeConflict/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pullMergeConflict/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pullMergeConflict/expected_remote/HEAD b/test/integration/pullMergeConflict/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullMergeConflict/expected_remote/config b/test/integration/pullMergeConflict/expected_remote/config new file mode 100644 index 000000000..082441c96 --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullMergeConflict/./actual diff --git a/test/integration/pullMergeConflict/expected_remote/description b/test/integration/pullMergeConflict/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullMergeConflict/expected_remote/info/exclude b/test/integration/pullMergeConflict/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullMergeConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullMergeConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullMergeConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullMergeConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullMergeConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a b/test/integration/pullMergeConflict/expected_remote/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a new file mode 100644 index 000000000..c7b25d78c --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/objects/38/699899bb94dfae74e3e55cf5bd6d92e6f3292a @@ -0,0 +1,3 @@ +x��A +�0@Q�9E���4�i"BW=F:�����D���#���ŗ�֥y�tj��'�PH�4!sL%D֞; +QJ�趲����2O��5�p�AB6�m�(ٕw{��Fƻ~Jݞz���<r��9#�3"�;�1��O��ז���259� \ No newline at end of file diff --git a/test/integration/pullMergeConflict/expected_remote/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 b/test/integration/pullMergeConflict/expected_remote/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 new file mode 100644 index 000000000..c589d7b21 Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/80/f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullMergeConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullMergeConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullMergeConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa b/test/integration/pullMergeConflict/expected_remote/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa new file mode 100644 index 000000000..805becbe2 Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/dd/f4b7fe8f45d07a181c2b57cc3434c982d3f4aa differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullMergeConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullMergeConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullMergeConflict/expected_remote/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b b/test/integration/pullMergeConflict/expected_remote/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b new file mode 100644 index 000000000..16a061777 --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/objects/f0/e8e7922de77a5ab20b924640c8b8435bae0b0b @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ �����S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D��pE�ޝ��4��;��uSt4M,� \ No newline at end of file diff --git a/test/integration/pullMergeConflict/expected_remote/packed-refs b/test/integration/pullMergeConflict/expected_remote/packed-refs new file mode 100644 index 000000000..c67ebc4ab --- /dev/null +++ b/test/integration/pullMergeConflict/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +38699899bb94dfae74e3e55cf5bd6d92e6f3292a refs/heads/master diff --git a/test/integration/pullMergeConflict/recording.json b/test/integration/pullMergeConflict/recording.json new file mode 100644 index 000000000..9631a1943 --- /dev/null +++ b/test/integration/pullMergeConflict/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1428,"Mod":0,"Key":256,"Ch":112},{"Timestamp":2571,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3459,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3852,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4419,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5267,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6266,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullMergeConflict/setup.sh b/test/integration/pullMergeConflict/setup.sh new file mode 100644 index 000000000..a19999045 --- /dev/null +++ b/test/integration/pullMergeConflict/setup.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo conflict > myfile4 +git add . +git commit -am "myfile4 conflict" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase false diff --git a/test/integration/pullMergeConflict/test.json b/test/integration/pullMergeConflict/test.json new file mode 100644 index 000000000..c1d7a3480 --- /dev/null +++ b/test/integration/pullMergeConflict/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with merge, ensure we handle conflicts", "speed": 5 } diff --git a/test/integration/pullRebase/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullRebase/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..ecdf2bdc8 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile5 diff --git a/test/integration/pullRebase/expected/.git_keep/FETCH_HEAD b/test/integration/pullRebase/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..a05fa9894 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +d0e04b2bced3bc76f0abf50698a7ab774cd54568 branch 'master' of ../actual_remote diff --git a/test/integration/pullRebase/expected/.git_keep/HEAD b/test/integration/pullRebase/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebase/expected/.git_keep/ORIG_HEAD b/test/integration/pullRebase/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..66241013d --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +7b21277988b03a5fd9e933126e8d1f31d2498d08 diff --git a/test/integration/pullRebase/expected/.git_keep/config b/test/integration/pullRebase/expected/.git_keep/config new file mode 100644 index 000000000..1a54274ac --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = true diff --git a/test/integration/pullRebase/expected/.git_keep/description b/test/integration/pullRebase/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebase/expected/.git_keep/index b/test/integration/pullRebase/expected/.git_keep/index new file mode 100644 index 000000000..3e4466b50 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/index differ diff --git a/test/integration/pullRebase/expected/.git_keep/info/exclude b/test/integration/pullRebase/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebase/expected/.git_keep/logs/HEAD b/test/integration/pullRebase/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..f5bdda011 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/logs/HEAD @@ -0,0 +1,9 @@ +0000000000000000000000000000000000000000 c0ae07711df69fb0a21efaca9d63da42a67eaedf CI <CI@example.com> 1634896919 +1100 commit (initial): myfile1 +c0ae07711df69fb0a21efaca9d63da42a67eaedf 0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 CI <CI@example.com> 1634896919 +1100 commit: myfile2 +0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 fe1d53ca86366f64f689586cb0fe243fed1d1482 CI <CI@example.com> 1634896919 +1100 commit: myfile3 +fe1d53ca86366f64f689586cb0fe243fed1d1482 d0e04b2bced3bc76f0abf50698a7ab774cd54568 CI <CI@example.com> 1634896919 +1100 commit: myfile4 +d0e04b2bced3bc76f0abf50698a7ab774cd54568 0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 CI <CI@example.com> 1634896919 +1100 reset: moving to head^^ +0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 7b21277988b03a5fd9e933126e8d1f31d2498d08 CI <CI@example.com> 1634896919 +1100 commit: myfile5 +7b21277988b03a5fd9e933126e8d1f31d2498d08 d0e04b2bced3bc76f0abf50698a7ab774cd54568 CI <CI@example.com> 1634896920 +1100 pull --no-edit: checkout d0e04b2bced3bc76f0abf50698a7ab774cd54568 +d0e04b2bced3bc76f0abf50698a7ab774cd54568 74755f34462bd712c676b84247831233da97a272 CI <CI@example.com> 1634896920 +1100 pull --no-edit: myfile5 +74755f34462bd712c676b84247831233da97a272 74755f34462bd712c676b84247831233da97a272 CI <CI@example.com> 1634896920 +1100 rebase finished: returning to refs/heads/master diff --git a/test/integration/pullRebase/expected/.git_keep/logs/refs/heads/master b/test/integration/pullRebase/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..564aa150d --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 c0ae07711df69fb0a21efaca9d63da42a67eaedf CI <CI@example.com> 1634896919 +1100 commit (initial): myfile1 +c0ae07711df69fb0a21efaca9d63da42a67eaedf 0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 CI <CI@example.com> 1634896919 +1100 commit: myfile2 +0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 fe1d53ca86366f64f689586cb0fe243fed1d1482 CI <CI@example.com> 1634896919 +1100 commit: myfile3 +fe1d53ca86366f64f689586cb0fe243fed1d1482 d0e04b2bced3bc76f0abf50698a7ab774cd54568 CI <CI@example.com> 1634896919 +1100 commit: myfile4 +d0e04b2bced3bc76f0abf50698a7ab774cd54568 0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 CI <CI@example.com> 1634896919 +1100 reset: moving to head^^ +0bbb382cb5729bfd2e6fd3e1d60237e03cb375a4 7b21277988b03a5fd9e933126e8d1f31d2498d08 CI <CI@example.com> 1634896919 +1100 commit: myfile5 +7b21277988b03a5fd9e933126e8d1f31d2498d08 74755f34462bd712c676b84247831233da97a272 CI <CI@example.com> 1634896920 +1100 rebase finished: returning to refs/heads/master diff --git a/test/integration/pullRebase/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullRebase/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..f04c3d5eb --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 d0e04b2bced3bc76f0abf50698a7ab774cd54568 CI <CI@example.com> 1634896919 +1100 fetch origin: storing head diff --git a/test/integration/pullRebase/expected/.git_keep/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 b/test/integration/pullRebase/expected/.git_keep/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 new file mode 100644 index 000000000..53166135d Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebase/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebase/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebase/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebase/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/74/755f34462bd712c676b84247831233da97a272 b/test/integration/pullRebase/expected/.git_keep/objects/74/755f34462bd712c676b84247831233da97a272 new file mode 100644 index 000000000..6cf095267 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/74/755f34462bd712c676b84247831233da97a272 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/7b/21277988b03a5fd9e933126e8d1f31d2498d08 b/test/integration/pullRebase/expected/.git_keep/objects/7b/21277988b03a5fd9e933126e8d1f31d2498d08 new file mode 100644 index 000000000..7557f1bec --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/objects/7b/21277988b03a5fd9e933126e8d1f31d2498d08 @@ -0,0 +1,2 @@ +x��K +�0@]��2�ɧ�"BW=F&�`���D���#�}</o�-]c��~��h�)E8�Tm!���@�E���C^]3�`2�`"�b��B�Ń� @�)�dUz��v�i��4?�ھ�-o��ѓ�����:�9��O]�o]Vq�B:� \ No newline at end of file diff --git a/test/integration/pullRebase/expected/.git_keep/objects/92/c2dd111eeb7daf4a0e30faff73b9441103805d b/test/integration/pullRebase/expected/.git_keep/objects/92/c2dd111eeb7daf4a0e30faff73b9441103805d new file mode 100644 index 000000000..7820c1e95 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/92/c2dd111eeb7daf4a0e30faff73b9441103805d differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/98/fea3de076a474cabfac7130669625879051d43 b/test/integration/pullRebase/expected/.git_keep/objects/98/fea3de076a474cabfac7130669625879051d43 new file mode 100644 index 000000000..6b5097ac8 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/98/fea3de076a474cabfac7130669625879051d43 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebase/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebase/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf b/test/integration/pullRebase/expected/.git_keep/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf new file mode 100644 index 000000000..bf8cba378 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ �����S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D���;�9i�'w�+��6�,� \ No newline at end of file diff --git a/test/integration/pullRebase/expected/.git_keep/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 b/test/integration/pullRebase/expected/.git_keep/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 new file mode 100644 index 000000000..607a6325f --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 @@ -0,0 +1,3 @@ +x��A +�0@Q�9E��d:��D��z�4�����D���#����/k�K���vU�CO!�@(4s�����0��-��j��%#�1K��e +�6�a���w{��Fƻ~rݞz)k�y`$I� �3@��T�?��_[�J��8� \ No newline at end of file diff --git a/test/integration/pullRebase/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebase/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebase/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebase/expected/.git_keep/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 b/test/integration/pullRebase/expected/.git_keep/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 new file mode 100644 index 000000000..d16cbc927 Binary files /dev/null and b/test/integration/pullRebase/expected/.git_keep/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 differ diff --git a/test/integration/pullRebase/expected/.git_keep/refs/heads/master b/test/integration/pullRebase/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..dcff007ea --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +74755f34462bd712c676b84247831233da97a272 diff --git a/test/integration/pullRebase/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullRebase/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..5a2173631 --- /dev/null +++ b/test/integration/pullRebase/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +d0e04b2bced3bc76f0abf50698a7ab774cd54568 diff --git a/test/integration/pullRebase/expected/myfile1 b/test/integration/pullRebase/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullRebase/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullRebase/expected/myfile2 b/test/integration/pullRebase/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullRebase/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullRebase/expected/myfile3 b/test/integration/pullRebase/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullRebase/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullRebase/expected/myfile4 b/test/integration/pullRebase/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pullRebase/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pullRebase/expected/myfile5 b/test/integration/pullRebase/expected/myfile5 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pullRebase/expected/myfile5 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pullRebase/expected_remote/HEAD b/test/integration/pullRebase/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebase/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebase/expected_remote/config b/test/integration/pullRebase/expected_remote/config new file mode 100644 index 000000000..201a8b505 --- /dev/null +++ b/test/integration/pullRebase/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullRebase/./actual diff --git a/test/integration/pullRebase/expected_remote/description b/test/integration/pullRebase/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebase/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebase/expected_remote/info/exclude b/test/integration/pullRebase/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebase/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebase/expected_remote/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 b/test/integration/pullRebase/expected_remote/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 new file mode 100644 index 000000000..53166135d Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/0b/bb382cb5729bfd2e6fd3e1d60237e03cb375a4 differ diff --git a/test/integration/pullRebase/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebase/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebase/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebase/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebase/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebase/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebase/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebase/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebase/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebase/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebase/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebase/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebase/expected_remote/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf b/test/integration/pullRebase/expected_remote/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf new file mode 100644 index 000000000..bf8cba378 --- /dev/null +++ b/test/integration/pullRebase/expected_remote/objects/c0/ae07711df69fb0a21efaca9d63da42a67eaedf @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ �����S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D���;�9i�'w�+��6�,� \ No newline at end of file diff --git a/test/integration/pullRebase/expected_remote/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 b/test/integration/pullRebase/expected_remote/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 new file mode 100644 index 000000000..607a6325f --- /dev/null +++ b/test/integration/pullRebase/expected_remote/objects/d0/e04b2bced3bc76f0abf50698a7ab774cd54568 @@ -0,0 +1,3 @@ +x��A +�0@Q�9E��d:��D��z�4�����D���#����/k�K���vU�CO!�@(4s�����0��-��j��%#�1K��e +�6�a���w{��Fƻ~rݞz)k�y`$I� �3@��T�?��_[�J��8� \ No newline at end of file diff --git a/test/integration/pullRebase/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebase/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebase/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebase/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebase/expected_remote/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 b/test/integration/pullRebase/expected_remote/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 new file mode 100644 index 000000000..d16cbc927 Binary files /dev/null and b/test/integration/pullRebase/expected_remote/objects/fe/1d53ca86366f64f689586cb0fe243fed1d1482 differ diff --git a/test/integration/pullRebase/expected_remote/packed-refs b/test/integration/pullRebase/expected_remote/packed-refs new file mode 100644 index 000000000..88b741528 --- /dev/null +++ b/test/integration/pullRebase/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +d0e04b2bced3bc76f0abf50698a7ab774cd54568 refs/heads/master diff --git a/test/integration/pullRebase/recording.json b/test/integration/pullRebase/recording.json new file mode 100644 index 000000000..b23747e49 --- /dev/null +++ b/test/integration/pullRebase/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":581,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1804,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullRebase/setup.sh b/test/integration/pullRebase/setup.sh new file mode 100644 index 000000000..aef24c8e8 --- /dev/null +++ b/test/integration/pullRebase/setup.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo test4 > myfile5 +git add . +git commit -am "myfile5" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase true diff --git a/test/integration/pullRebase/test.json b/test/integration/pullRebase/test.json new file mode 100644 index 000000000..224a93e54 --- /dev/null +++ b/test/integration/pullRebase/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with rebase, ensure we rebase upon pull", "speed": 10 } diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullRebaseConflict/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..2f4ead100 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 conflict diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/FETCH_HEAD b/test/integration/pullRebaseConflict/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..8f2963fe4 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +103c3eb899d173b83fc1b40261c8880fef359cc3 branch 'master' of ../actual_remote diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/HEAD b/test/integration/pullRebaseConflict/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/ORIG_HEAD b/test/integration/pullRebaseConflict/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..4133994ce --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +116cef0e366265c3d002cdb3dce4e285e32b5d12 diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/config b/test/integration/pullRebaseConflict/expected/.git_keep/config new file mode 100644 index 000000000..1a54274ac --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = true diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/description b/test/integration/pullRebaseConflict/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/index b/test/integration/pullRebaseConflict/expected/.git_keep/index new file mode 100644 index 000000000..286197c14 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/index differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/info/exclude b/test/integration/pullRebaseConflict/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/logs/HEAD b/test/integration/pullRebaseConflict/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..707a3154c --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/logs/HEAD @@ -0,0 +1,9 @@ +0000000000000000000000000000000000000000 34574474ac6f7dd2d3142bc28ee39db88d8a16af CI <CI@example.com> 1634896923 +1100 commit (initial): myfile1 +34574474ac6f7dd2d3142bc28ee39db88d8a16af 3b9389ff50095ad2d66d33bb6d67b5700f0bf6da CI <CI@example.com> 1634896923 +1100 commit: myfile2 +3b9389ff50095ad2d66d33bb6d67b5700f0bf6da aa6ae0785290ee09875f6bd5a5d50c0e7002de13 CI <CI@example.com> 1634896923 +1100 commit: myfile3 +aa6ae0785290ee09875f6bd5a5d50c0e7002de13 103c3eb899d173b83fc1b40261c8880fef359cc3 CI <CI@example.com> 1634896923 +1100 commit: myfile4 +103c3eb899d173b83fc1b40261c8880fef359cc3 3b9389ff50095ad2d66d33bb6d67b5700f0bf6da CI <CI@example.com> 1634896923 +1100 reset: moving to head^^ +3b9389ff50095ad2d66d33bb6d67b5700f0bf6da 116cef0e366265c3d002cdb3dce4e285e32b5d12 CI <CI@example.com> 1634896923 +1100 commit: myfile4 conflict +116cef0e366265c3d002cdb3dce4e285e32b5d12 103c3eb899d173b83fc1b40261c8880fef359cc3 CI <CI@example.com> 1634896924 +1100 pull --no-edit: checkout 103c3eb899d173b83fc1b40261c8880fef359cc3 +103c3eb899d173b83fc1b40261c8880fef359cc3 db7122c7f62714dfa854d8d22b2081d308912af8 CI <CI@example.com> 1634896926 +1100 rebase: myfile4 conflict +db7122c7f62714dfa854d8d22b2081d308912af8 db7122c7f62714dfa854d8d22b2081d308912af8 CI <CI@example.com> 1634896926 +1100 rebase finished: returning to refs/heads/master diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/heads/master b/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..eceafe30b --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 34574474ac6f7dd2d3142bc28ee39db88d8a16af CI <CI@example.com> 1634896923 +1100 commit (initial): myfile1 +34574474ac6f7dd2d3142bc28ee39db88d8a16af 3b9389ff50095ad2d66d33bb6d67b5700f0bf6da CI <CI@example.com> 1634896923 +1100 commit: myfile2 +3b9389ff50095ad2d66d33bb6d67b5700f0bf6da aa6ae0785290ee09875f6bd5a5d50c0e7002de13 CI <CI@example.com> 1634896923 +1100 commit: myfile3 +aa6ae0785290ee09875f6bd5a5d50c0e7002de13 103c3eb899d173b83fc1b40261c8880fef359cc3 CI <CI@example.com> 1634896923 +1100 commit: myfile4 +103c3eb899d173b83fc1b40261c8880fef359cc3 3b9389ff50095ad2d66d33bb6d67b5700f0bf6da CI <CI@example.com> 1634896923 +1100 reset: moving to head^^ +3b9389ff50095ad2d66d33bb6d67b5700f0bf6da 116cef0e366265c3d002cdb3dce4e285e32b5d12 CI <CI@example.com> 1634896923 +1100 commit: myfile4 conflict +116cef0e366265c3d002cdb3dce4e285e32b5d12 db7122c7f62714dfa854d8d22b2081d308912af8 CI <CI@example.com> 1634896926 +1100 rebase finished: returning to refs/heads/master diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..f05f22244 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 103c3eb899d173b83fc1b40261c8880fef359cc3 CI <CI@example.com> 1634896923 +1100 fetch origin: storing head diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 new file mode 100644 index 000000000..54f9946f5 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/11/6cef0e366265c3d002cdb3dce4e285e32b5d12 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/11/6cef0e366265c3d002cdb3dce4e285e32b5d12 new file mode 100644 index 000000000..01f6c3182 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/11/6cef0e366265c3d002cdb3dce4e285e32b5d12 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af b/test/integration/pullRebaseConflict/expected/.git_keep/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af new file mode 100644 index 000000000..229191e1c --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af @@ -0,0 +1,2 @@ +x��A +� @Ѯ=�����D��BV9�ё2X�������<���.���7�¹���%"��%�KX�����ݙ����8�c�^�'��r�M���)D����Zs�s��On���*h~5B,� \ No newline at end of file diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da b/test/integration/pullRebaseConflict/expected/.git_keep/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da new file mode 100644 index 000000000..fd885765d Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 000000000..adf64119a Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae b/test/integration/pullRebaseConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae new file mode 100644 index 000000000..13e3f581a Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 new file mode 100644 index 000000000..94a6241c8 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 new file mode 100644 index 000000000..5a90eb5f9 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 new file mode 100644 index 000000000..ae05cad1e Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/db/7122c7f62714dfa854d8d22b2081d308912af8 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/db/7122c7f62714dfa854d8d22b2081d308912af8 new file mode 100644 index 000000000..e8035ad35 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/db/7122c7f62714dfa854d8d22b2081d308912af8 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/1e2c991de853082420fd27fd983098afd4c0c8 b/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/1e2c991de853082420fd27fd983098afd4c0c8 new file mode 100644 index 000000000..46f078cee Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/1e2c991de853082420fd27fd983098afd4c0c8 differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/9912eb1649ce8dbb33678796cec3e89da3675d b/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/9912eb1649ce8dbb33678796cec3e89da3675d new file mode 100644 index 000000000..9fa52a8fd Binary files /dev/null and b/test/integration/pullRebaseConflict/expected/.git_keep/objects/e6/9912eb1649ce8dbb33678796cec3e89da3675d differ diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/refs/heads/master b/test/integration/pullRebaseConflict/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..ef35219b9 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +db7122c7f62714dfa854d8d22b2081d308912af8 diff --git a/test/integration/pullRebaseConflict/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullRebaseConflict/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..271b00ad9 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +103c3eb899d173b83fc1b40261c8880fef359cc3 diff --git a/test/integration/pullRebaseConflict/expected/myfile1 b/test/integration/pullRebaseConflict/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullRebaseConflict/expected/myfile2 b/test/integration/pullRebaseConflict/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullRebaseConflict/expected/myfile3 b/test/integration/pullRebaseConflict/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullRebaseConflict/expected/myfile4 b/test/integration/pullRebaseConflict/expected/myfile4 new file mode 100644 index 000000000..9b1719f5c --- /dev/null +++ b/test/integration/pullRebaseConflict/expected/myfile4 @@ -0,0 +1 @@ +conflict diff --git a/test/integration/pullRebaseConflict/expected_remote/HEAD b/test/integration/pullRebaseConflict/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseConflict/expected_remote/config b/test/integration/pullRebaseConflict/expected_remote/config new file mode 100644 index 000000000..e2f03fd10 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullRebaseConflict/./actual diff --git a/test/integration/pullRebaseConflict/expected_remote/description b/test/integration/pullRebaseConflict/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseConflict/expected_remote/info/exclude b/test/integration/pullRebaseConflict/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 b/test/integration/pullRebaseConflict/expected_remote/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 new file mode 100644 index 000000000..54f9946f5 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/10/3c3eb899d173b83fc1b40261c8880fef359cc3 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af b/test/integration/pullRebaseConflict/expected_remote/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af new file mode 100644 index 000000000..229191e1c --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/objects/34/574474ac6f7dd2d3142bc28ee39db88d8a16af @@ -0,0 +1,2 @@ +x��A +� @Ѯ=�����D��BV9�ё2X�������<���.���7�¹���%"��%�KX�����ݙ����8�c�^�'��r�M���)D����Zs�s��On���*h~5B,� \ No newline at end of file diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da b/test/integration/pullRebaseConflict/expected_remote/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da new file mode 100644 index 000000000..fd885765d Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/3b/9389ff50095ad2d66d33bb6d67b5700f0bf6da differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 b/test/integration/pullRebaseConflict/expected_remote/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 new file mode 100644 index 000000000..94a6241c8 Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/aa/6ae0785290ee09875f6bd5a5d50c0e7002de13 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseConflict/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseConflict/expected_remote/packed-refs b/test/integration/pullRebaseConflict/expected_remote/packed-refs new file mode 100644 index 000000000..5fc546218 --- /dev/null +++ b/test/integration/pullRebaseConflict/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +103c3eb899d173b83fc1b40261c8880fef359cc3 refs/heads/master diff --git a/test/integration/pullRebaseConflict/recording.json b/test/integration/pullRebaseConflict/recording.json new file mode 100644 index 000000000..46a1e361f --- /dev/null +++ b/test/integration/pullRebaseConflict/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":594,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1378,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1818,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2067,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2306,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2810,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3562,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullRebaseConflict/setup.sh b/test/integration/pullRebaseConflict/setup.sh new file mode 100644 index 000000000..63146bda2 --- /dev/null +++ b/test/integration/pullRebaseConflict/setup.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo conflict > myfile4 +git add . +git commit -am "myfile4 conflict" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase true diff --git a/test/integration/pullRebaseConflict/test.json b/test/integration/pullRebaseConflict/test.json new file mode 100644 index 000000000..39ddf1e3d --- /dev/null +++ b/test/integration/pullRebaseConflict/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with rebase, ensure we handle conflicts", "speed": 10 } diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullRebaseInteractive/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..12f245db0 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1,16 @@ +myfile4 conflict + +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# interactive rebase in progress; onto ea4a99e +# Last command done (1 command done): +# pick efbb36c myfile4 conflict +# Next commands to do (3 remaining commands): +# pick 9147ce4 5 +# pick e2251a5 6 +# You are currently rebasing branch 'master' on 'ea4a99e'. +# +# Changes to be committed: +# modified: myfile4 +# diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/FETCH_HEAD b/test/integration/pullRebaseInteractive/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..5d2dc1af4 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa branch 'master' of ../actual_remote diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/HEAD b/test/integration/pullRebaseInteractive/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/ORIG_HEAD b/test/integration/pullRebaseInteractive/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..a03bb270d --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +efbb36c97316886b089b1b27233cd8bfdc37ed4a diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/config b/test/integration/pullRebaseInteractive/expected/.git_keep/config new file mode 100644 index 000000000..cfff6ba8c --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = interactive diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/description b/test/integration/pullRebaseInteractive/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/index b/test/integration/pullRebaseInteractive/expected/.git_keep/index new file mode 100644 index 000000000..906076536 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/index differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/info/exclude b/test/integration/pullRebaseInteractive/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/logs/HEAD b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..ea2e57777 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/HEAD @@ -0,0 +1,15 @@ +0000000000000000000000000000000000000000 74ca3dec707dde7c92727d9490517e498360fea8 CI <CI@example.com> 1634896929 +1100 commit (initial): myfile1 +74ca3dec707dde7c92727d9490517e498360fea8 ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 commit: myfile2 +ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 3fb33027aedae13ab0796292c821a0258f6c2f7b CI <CI@example.com> 1634896929 +1100 commit: myfile3 +3fb33027aedae13ab0796292c821a0258f6c2f7b ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 commit: myfile4 +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 reset: moving to head^^ +ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 efbb36c97316886b089b1b27233cd8bfdc37ed4a CI <CI@example.com> 1634896929 +1100 commit: myfile4 conflict +efbb36c97316886b089b1b27233cd8bfdc37ed4a 9147ce4817b84339d884cee1683f361fd3aa4696 CI <CI@example.com> 1634896929 +1100 commit: 5 +9147ce4817b84339d884cee1683f361fd3aa4696 e2251a5b6d32bf5fc57f234946e3fabeba3b5cca CI <CI@example.com> 1634896929 +1100 commit: 6 +e2251a5b6d32bf5fc57f234946e3fabeba3b5cca 89ee54b2ed7aff7c3aae24f64be85568f9a9d329 CI <CI@example.com> 1634896929 +1100 commit: 7 +89ee54b2ed7aff7c3aae24f64be85568f9a9d329 ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896931 +1100 rebase -i (start): checkout ea4a99ea801f54f1ec09a88a28c65eb4db5865aa +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa 29daf999882c9e60c6b6a2868913a6cfd856d620 CI <CI@example.com> 1634896933 +1100 rebase -i (continue): myfile4 conflict +29daf999882c9e60c6b6a2868913a6cfd856d620 5c32741b468f0ab8ddd243e9871dcc8dec5c35f9 CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 5 +5c32741b468f0ab8ddd243e9871dcc8dec5c35f9 423f7757eb2eea3de217b54447a94820af933d3a CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 6 +423f7757eb2eea3de217b54447a94820af933d3a bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 7 +bf4fb489636d4bde42e478b04cbdcc079dcd0183 bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (finish): returning to refs/heads/master diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/heads/master b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..6ebd29d80 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,10 @@ +0000000000000000000000000000000000000000 74ca3dec707dde7c92727d9490517e498360fea8 CI <CI@example.com> 1634896929 +1100 commit (initial): myfile1 +74ca3dec707dde7c92727d9490517e498360fea8 ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 commit: myfile2 +ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 3fb33027aedae13ab0796292c821a0258f6c2f7b CI <CI@example.com> 1634896929 +1100 commit: myfile3 +3fb33027aedae13ab0796292c821a0258f6c2f7b ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 commit: myfile4 +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 reset: moving to head^^ +ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 efbb36c97316886b089b1b27233cd8bfdc37ed4a CI <CI@example.com> 1634896929 +1100 commit: myfile4 conflict +efbb36c97316886b089b1b27233cd8bfdc37ed4a 9147ce4817b84339d884cee1683f361fd3aa4696 CI <CI@example.com> 1634896929 +1100 commit: 5 +9147ce4817b84339d884cee1683f361fd3aa4696 e2251a5b6d32bf5fc57f234946e3fabeba3b5cca CI <CI@example.com> 1634896929 +1100 commit: 6 +e2251a5b6d32bf5fc57f234946e3fabeba3b5cca 89ee54b2ed7aff7c3aae24f64be85568f9a9d329 CI <CI@example.com> 1634896929 +1100 commit: 7 +89ee54b2ed7aff7c3aae24f64be85568f9a9d329 bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (finish): refs/heads/master onto ea4a99ea801f54f1ec09a88a28c65eb4db5865aa diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..4a22e7de9 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 fetch origin: storing head diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 new file mode 100644 index 000000000..48767aa88 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/24/21815f8570a34d9f8c8991df1005150ed3ae99 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/24/21815f8570a34d9f8c8991df1005150ed3ae99 new file mode 100644 index 000000000..4df0a731d Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/24/21815f8570a34d9f8c8991df1005150ed3ae99 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/29/daf999882c9e60c6b6a2868913a6cfd856d620 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/29/daf999882c9e60c6b6a2868913a6cfd856d620 new file mode 100644 index 000000000..59ed7fe6b Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/29/daf999882c9e60c6b6a2868913a6cfd856d620 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b new file mode 100644 index 000000000..72f6e886b Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/42/3f7757eb2eea3de217b54447a94820af933d3a b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/42/3f7757eb2eea3de217b54447a94820af933d3a new file mode 100644 index 000000000..a0d83ec6c --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/42/3f7757eb2eea3de217b54447a94820af933d3a @@ -0,0 +1,5 @@ +x}�A +1�a�=E��4M�I@D���6) +�� +�.\�}|�������}W�>x ����2�J��A*8!:��l����X�On!Qu�F"�*�R +��!be�����v^�y^���m{ꩬ�b!a N��aܘ�����9⏛d�-�7� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5c/32741b468f0ab8ddd243e9871dcc8dec5c35f9 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5c/32741b468f0ab8ddd243e9871dcc8dec5c35f9 new file mode 100644 index 000000000..3bc24fb42 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5c/32741b468f0ab8ddd243e9871dcc8dec5c35f9 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 new file mode 100644 index 000000000..7fc19f59c Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/74/ca3dec707dde7c92727d9490517e498360fea8 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/74/ca3dec707dde7c92727d9490517e498360fea8 new file mode 100644 index 000000000..2f5e7e39f --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/74/ca3dec707dde7c92727d9490517e498360fea8 @@ -0,0 +1,2 @@ +x��A +�0@Q�9��ɤ�4��c�L��!R"����~����H|�*x�\��2&��H1r��H ��J�'��l;L3ܦ���צ������)$8#z�zL��ɝ}�)�7(,� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/89/ee54b2ed7aff7c3aae24f64be85568f9a9d329 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/89/ee54b2ed7aff7c3aae24f64be85568f9a9d329 new file mode 100644 index 000000000..155cfe5f6 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/89/ee54b2ed7aff7c3aae24f64be85568f9a9d329 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 new file mode 100644 index 000000000..8baacd0cc Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/91/47ce4817b84339d884cee1683f361fd3aa4696 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/91/47ce4817b84339d884cee1683f361fd3aa4696 new file mode 100644 index 000000000..04880639a Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/91/47ce4817b84339d884cee1683f361fd3aa4696 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae new file mode 100644 index 000000000..13e3f581a Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 new file mode 100644 index 000000000..4667dcf6f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 new file mode 100644 index 000000000..5a90eb5f9 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 new file mode 100644 index 000000000..ae05cad1e Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b8/9e837219d9a8aceb8b0f13381be0afb0dac427 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b8/9e837219d9a8aceb8b0f13381be0afb0dac427 new file mode 100644 index 000000000..3d41eceda Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/b8/9e837219d9a8aceb8b0f13381be0afb0dac427 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/bf/4fb489636d4bde42e478b04cbdcc079dcd0183 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/bf/4fb489636d4bde42e478b04cbdcc079dcd0183 new file mode 100644 index 000000000..11a65f3f4 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/bf/4fb489636d4bde42e478b04cbdcc079dcd0183 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 new file mode 100644 index 000000000..1cf77f0bb Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d4/8cf11b7fbbda4199b736bb9e8fadabf773eb9e b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d4/8cf11b7fbbda4199b736bb9e8fadabf773eb9e new file mode 100644 index 000000000..d63c59fb0 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/d4/8cf11b7fbbda4199b736bb9e8fadabf773eb9e differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/e2/251a5b6d32bf5fc57f234946e3fabeba3b5cca b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/e2/251a5b6d32bf5fc57f234946e3fabeba3b5cca new file mode 100644 index 000000000..f4473469b Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/e2/251a5b6d32bf5fc57f234946e3fabeba3b5cca differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa new file mode 100644 index 000000000..a9ed03844 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��df�I"BW=�4N���R"����~�◵��[���wU��!z%�)U�0�$X#��P$d0�����D�0�>D�dr13f, A�T�`���w��F{ƻ~�m�^��n�|ʜ1�3�s��T�?�i�:/���g8� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ef/bb36c97316886b089b1b27233cd8bfdc37ed4a b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ef/bb36c97316886b089b1b27233cd8bfdc37ed4a new file mode 100644 index 000000000..2f6153345 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/ef/bb36c97316886b089b1b27233cd8bfdc37ed4a @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��̤ɘ���U�1�N�ИR"����>��K�u���p껪e�I��P� g�2��x���z2���V8D�̈́��L.�pv9C�,��`�ݟm��do����mՋ�z�H����K��`=������-˪�J{�u�n~/�>@ \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 new file mode 100644 index 000000000..b0b5fcfd9 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 differ diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/refs/heads/master b/test/integration/pullRebaseInteractive/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..bc528dc20 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +bf4fb489636d4bde42e478b04cbdcc079dcd0183 diff --git a/test/integration/pullRebaseInteractive/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullRebaseInteractive/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..0597374d4 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa diff --git a/test/integration/pullRebaseInteractive/expected/myfile1 b/test/integration/pullRebaseInteractive/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullRebaseInteractive/expected/myfile2 b/test/integration/pullRebaseInteractive/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullRebaseInteractive/expected/myfile3 b/test/integration/pullRebaseInteractive/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullRebaseInteractive/expected/myfile4 b/test/integration/pullRebaseInteractive/expected/myfile4 new file mode 100644 index 000000000..9b1719f5c --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile4 @@ -0,0 +1 @@ +conflict diff --git a/test/integration/pullRebaseInteractive/expected/myfile5 b/test/integration/pullRebaseInteractive/expected/myfile5 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile5 @@ -0,0 +1 @@ +test diff --git a/test/integration/pullRebaseInteractive/expected/myfile6 b/test/integration/pullRebaseInteractive/expected/myfile6 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile6 @@ -0,0 +1 @@ +test diff --git a/test/integration/pullRebaseInteractive/expected/myfile7 b/test/integration/pullRebaseInteractive/expected/myfile7 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected/myfile7 @@ -0,0 +1 @@ +test diff --git a/test/integration/pullRebaseInteractive/expected_remote/HEAD b/test/integration/pullRebaseInteractive/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseInteractive/expected_remote/config b/test/integration/pullRebaseInteractive/expected_remote/config new file mode 100644 index 000000000..79d424485 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullRebaseInteractive/./actual diff --git a/test/integration/pullRebaseInteractive/expected_remote/description b/test/integration/pullRebaseInteractive/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseInteractive/expected_remote/info/exclude b/test/integration/pullRebaseInteractive/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseInteractive/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseInteractive/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseInteractive/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseInteractive/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b b/test/integration/pullRebaseInteractive/expected_remote/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b new file mode 100644 index 000000000..72f6e886b Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/3f/b33027aedae13ab0796292c821a0258f6c2f7b differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/74/ca3dec707dde7c92727d9490517e498360fea8 b/test/integration/pullRebaseInteractive/expected_remote/objects/74/ca3dec707dde7c92727d9490517e498360fea8 new file mode 100644 index 000000000..2f5e7e39f --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/objects/74/ca3dec707dde7c92727d9490517e498360fea8 @@ -0,0 +1,2 @@ +x��A +�0@Q�9��ɤ�4��c�L��!R"����~����H|�*x�\��2&��H1r��H ��J�'��l;L3ܦ���צ������)$8#z�zL��ɝ}�)�7(,� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseInteractive/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseInteractive/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 b/test/integration/pullRebaseInteractive/expected_remote/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 new file mode 100644 index 000000000..1cf77f0bb Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/ca/58e8d47d619ffb625dc021f0ab2bb0f0bcf623 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseInteractive/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseInteractive/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseInteractive/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseInteractive/expected_remote/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa b/test/integration/pullRebaseInteractive/expected_remote/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa new file mode 100644 index 000000000..a9ed03844 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/objects/ea/4a99ea801f54f1ec09a88a28c65eb4db5865aa @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��df�I"BW=�4N���R"����~�◵��[���wU��!z%�)U�0�$X#��P$d0�����D�0�>D�dr13f, A�T�`���w��F{ƻ~�m�^��n�|ʜ1�3�s��T�?�i�:/���g8� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/expected_remote/packed-refs b/test/integration/pullRebaseInteractive/expected_remote/packed-refs new file mode 100644 index 000000000..33ecbd263 --- /dev/null +++ b/test/integration/pullRebaseInteractive/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +ea4a99ea801f54f1ec09a88a28c65eb4db5865aa refs/heads/master diff --git a/test/integration/pullRebaseInteractive/recording.json b/test/integration/pullRebaseInteractive/recording.json new file mode 100644 index 000000000..dee2e4d8b --- /dev/null +++ b/test/integration/pullRebaseInteractive/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1280,"Mod":0,"Key":256,"Ch":112},{"Timestamp":2032,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2392,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2640,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2896,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3384,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4158,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullRebaseInteractive/setup.sh b/test/integration/pullRebaseInteractive/setup.sh new file mode 100644 index 000000000..0795a297f --- /dev/null +++ b/test/integration/pullRebaseInteractive/setup.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo conflict > myfile4 +git add . +git commit -am "myfile4 conflict" + +echo test > myfile5 +git add . +git commit -am "5" + +echo test > myfile6 +git add . +git commit -am "6" + +echo test > myfile7 +git add . +git commit -am "7" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase interactive diff --git a/test/integration/pullRebaseInteractive/test.json b/test/integration/pullRebaseInteractive/test.json new file mode 100644 index 000000000..7eb652fa1 --- /dev/null +++ b/test/integration/pullRebaseInteractive/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with interactive rebase, ensure we handle conflicts", "speed": 5 } diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..13b4a42ac --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1,16 @@ +myfile4 conflict + +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# interactive rebase in progress; onto 4589efc +# Last command done (1 command done): +# pick 9013b5f myfile4 conflict +# Next commands to do (3 remaining commands): +# pick 0fa5386 5 +# drop 69a5c9f 6 +# You are currently rebasing branch 'master' on '4589efc'. +# +# Changes to be committed: +# modified: myfile4 +# diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/FETCH_HEAD b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..4d6186494 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +4589efcaf3024e841825bb289bb88eb0e4f8530a branch 'master' of ../actual_remote diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/HEAD b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/ORIG_HEAD b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..d989f6dc2 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +9013b5f12ca8a0fdd44fbe72028500bbac5c89ee diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/config b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/config new file mode 100644 index 000000000..cfff6ba8c --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[pull] + rebase = interactive diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/description b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/index b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/index new file mode 100644 index 000000000..109dfab63 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/index differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/info/exclude b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/HEAD b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..f5f276231 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/HEAD @@ -0,0 +1,14 @@ +0000000000000000000000000000000000000000 5759b6258419271e67a172e51cd90048dd21f9c0 CI <CI@example.com> 1634896936 +1100 commit (initial): myfile1 +5759b6258419271e67a172e51cd90048dd21f9c0 476a1939075b60aa47da50a8c40c5b4412a2f18b CI <CI@example.com> 1634896936 +1100 commit: myfile2 +476a1939075b60aa47da50a8c40c5b4412a2f18b e047462bda495acbe565c85b205d614f38c0a692 CI <CI@example.com> 1634896936 +1100 commit: myfile3 +e047462bda495acbe565c85b205d614f38c0a692 4589efcaf3024e841825bb289bb88eb0e4f8530a CI <CI@example.com> 1634896936 +1100 commit: myfile4 +4589efcaf3024e841825bb289bb88eb0e4f8530a 476a1939075b60aa47da50a8c40c5b4412a2f18b CI <CI@example.com> 1634896936 +1100 reset: moving to head^^ +476a1939075b60aa47da50a8c40c5b4412a2f18b 9013b5f12ca8a0fdd44fbe72028500bbac5c89ee CI <CI@example.com> 1634896936 +1100 commit: myfile4 conflict +9013b5f12ca8a0fdd44fbe72028500bbac5c89ee 0fa53867500c0f3a5cca9b2112982795fae51c51 CI <CI@example.com> 1634896936 +1100 commit: 5 +0fa53867500c0f3a5cca9b2112982795fae51c51 69a5c9fb912112305bfe15272855afb50f6acf4b CI <CI@example.com> 1634896936 +1100 commit: 6 +69a5c9fb912112305bfe15272855afb50f6acf4b af4c4b2b977f8909e590ea5bc3bab59d991e4c28 CI <CI@example.com> 1634896936 +1100 commit: 7 +af4c4b2b977f8909e590ea5bc3bab59d991e4c28 4589efcaf3024e841825bb289bb88eb0e4f8530a CI <CI@example.com> 1634896938 +1100 rebase -i (start): checkout 4589efcaf3024e841825bb289bb88eb0e4f8530a +4589efcaf3024e841825bb289bb88eb0e4f8530a 5d08d9b6315ddb8fb8372d83b54862ba7d7fdc88 CI <CI@example.com> 1634896942 +1100 rebase -i (continue): myfile4 conflict +5d08d9b6315ddb8fb8372d83b54862ba7d7fdc88 7c717449332e4a81f7e5643eef9c95f459444e3f CI <CI@example.com> 1634896942 +1100 rebase -i (pick): 5 +7c717449332e4a81f7e5643eef9c95f459444e3f ae4e33d43751b83fbd0b6f0a1796d58462492e47 CI <CI@example.com> 1634896942 +1100 rebase -i (pick): 7 +ae4e33d43751b83fbd0b6f0a1796d58462492e47 ae4e33d43751b83fbd0b6f0a1796d58462492e47 CI <CI@example.com> 1634896942 +1100 rebase -i (finish): returning to refs/heads/master diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/heads/master b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..ae47bc191 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,10 @@ +0000000000000000000000000000000000000000 5759b6258419271e67a172e51cd90048dd21f9c0 CI <CI@example.com> 1634896936 +1100 commit (initial): myfile1 +5759b6258419271e67a172e51cd90048dd21f9c0 476a1939075b60aa47da50a8c40c5b4412a2f18b CI <CI@example.com> 1634896936 +1100 commit: myfile2 +476a1939075b60aa47da50a8c40c5b4412a2f18b e047462bda495acbe565c85b205d614f38c0a692 CI <CI@example.com> 1634896936 +1100 commit: myfile3 +e047462bda495acbe565c85b205d614f38c0a692 4589efcaf3024e841825bb289bb88eb0e4f8530a CI <CI@example.com> 1634896936 +1100 commit: myfile4 +4589efcaf3024e841825bb289bb88eb0e4f8530a 476a1939075b60aa47da50a8c40c5b4412a2f18b CI <CI@example.com> 1634896936 +1100 reset: moving to head^^ +476a1939075b60aa47da50a8c40c5b4412a2f18b 9013b5f12ca8a0fdd44fbe72028500bbac5c89ee CI <CI@example.com> 1634896936 +1100 commit: myfile4 conflict +9013b5f12ca8a0fdd44fbe72028500bbac5c89ee 0fa53867500c0f3a5cca9b2112982795fae51c51 CI <CI@example.com> 1634896936 +1100 commit: 5 +0fa53867500c0f3a5cca9b2112982795fae51c51 69a5c9fb912112305bfe15272855afb50f6acf4b CI <CI@example.com> 1634896936 +1100 commit: 6 +69a5c9fb912112305bfe15272855afb50f6acf4b af4c4b2b977f8909e590ea5bc3bab59d991e4c28 CI <CI@example.com> 1634896936 +1100 commit: 7 +af4c4b2b977f8909e590ea5bc3bab59d991e4c28 ae4e33d43751b83fbd0b6f0a1796d58462492e47 CI <CI@example.com> 1634896942 +1100 rebase -i (finish): refs/heads/master onto 4589efcaf3024e841825bb289bb88eb0e4f8530a diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..3c26173a8 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 4589efcaf3024e841825bb289bb88eb0e4f8530a CI <CI@example.com> 1634896936 +1100 fetch origin: storing head diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 new file mode 100644 index 000000000..48767aa88 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/00/a0b67048be84a6aeaa50b27ad90ab567d65837 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0f/a53867500c0f3a5cca9b2112982795fae51c51 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0f/a53867500c0f3a5cca9b2112982795fae51c51 new file mode 100644 index 000000000..f5f9df209 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/0f/a53867500c0f3a5cca9b2112982795fae51c51 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/26/02a2a5727666c205fef7f152786e1edb1c5d4b b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/26/02a2a5727666c205fef7f152786e1edb1c5d4b new file mode 100644 index 000000000..90bf4a139 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/26/02a2a5727666c205fef7f152786e1edb1c5d4b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a new file mode 100644 index 000000000..abf2de1e2 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a @@ -0,0 +1,2 @@ +x��A +�0@Q�9E���$3�D��z�$�`��R"����~�◵��[�t껪uUp `�ȇ��Q�C�,:�#�%qD��]_�*�@��(r*YY��x��C�$љ��u��d��t�Oj�S/em7��)D�^������'7�[������8� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b new file mode 100644 index 000000000..6f4196f0d Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 new file mode 100644 index 000000000..08237c841 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 @@ -0,0 +1,3 @@ +x��A +�0@Q�9���4�4��c�L��!R"����~����H|�*x�\��2&��H1r�8֑ +��J�N���v�f�M�C?b�M/�����)0��wG=&]��ξu��6�,� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/08d9b6315ddb8fb8372d83b54862ba7d7fdc88 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/08d9b6315ddb8fb8372d83b54862ba7d7fdc88 new file mode 100644 index 000000000..eb8963927 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/08d9b6315ddb8fb8372d83b54862ba7d7fdc88 @@ -0,0 +1,2 @@ +x}α +�0�a�<EvA.�%���Щ�qI.Xhl)������� ^[����N}��v%φ�W�H-\�0�,�Q���=E����Bh���,Ŕ�$�`%���c��8��8���m[��v�&8���l�:�1��?G��}��>�2箾�=m \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 new file mode 100644 index 000000000..7fc19f59c Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/5d/0d8eb2623180ca95f2634f7e25f40521d5aea2 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/65/401620c5230dfa2ad6e0e2dcb6b447fe21262b b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/65/401620c5230dfa2ad6e0e2dcb6b447fe21262b new file mode 100644 index 000000000..a48fefe98 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/65/401620c5230dfa2ad6e0e2dcb6b447fe21262b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/69/a5c9fb912112305bfe15272855afb50f6acf4b b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/69/a5c9fb912112305bfe15272855afb50f6acf4b new file mode 100644 index 000000000..f4e99e6a6 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/69/a5c9fb912112305bfe15272855afb50f6acf4b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/7c/717449332e4a81f7e5643eef9c95f459444e3f b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/7c/717449332e4a81f7e5643eef9c95f459444e3f new file mode 100644 index 000000000..07becc026 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/7c/717449332e4a81f7e5643eef9c95f459444e3f @@ -0,0 +1,3 @@ +x}�M +�0@a�9E��$�L2�"BW=�L~P0���.\�}|����C[���k�͈Tt���I����L����YL0Qm����X�$,�C6!��z +N8��J&R��u��y����Y/y�WmxJ!A�gk�QG=�F�Ͻ�q��ұ8q \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 new file mode 100644 index 000000000..8baacd0cc Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/8c/fc761d2799512553e491f7ceb3564a5e994999 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/90/13b5f12ca8a0fdd44fbe72028500bbac5c89ee b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/90/13b5f12ca8a0fdd44fbe72028500bbac5c89ee new file mode 100644 index 000000000..93173c9a0 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/90/13b5f12ca8a0fdd44fbe72028500bbac5c89ee differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae new file mode 100644 index 000000000..13e3f581a Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9b/1719f5cf069568785080a0bbabbe7c377e22ae differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 new file mode 100644 index 000000000..4667dcf6f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/4e33d43751b83fbd0b6f0a1796d58462492e47 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/4e33d43751b83fbd0b6f0a1796d58462492e47 new file mode 100644 index 000000000..d2952d0ad --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/4e33d43751b83fbd0b6f0a1796d58462492e47 @@ -0,0 +1,2 @@ +x}α +�0�a�<EvAr��]E�N}�4��`l)||;8��|�_���B����Zd�sf.�B�*Jd]f(a��ly�W�R�(y�J9B L^���B���H}5����n���t�On�S/emW�)&N���9s�c��N��F��7= \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 new file mode 100644 index 000000000..5a90eb5f9 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/ae/d6c0a012c68a8b615ab0185b64f59c414d4746 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/af/4c4b2b977f8909e590ea5bc3bab59d991e4c28 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/af/4c4b2b977f8909e590ea5bc3bab59d991e4c28 new file mode 100644 index 000000000..2c276bd37 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/af/4c4b2b977f8909e590ea5bc3bab59d991e4c28 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 new file mode 100644 index 000000000..ae05cad1e Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/b2/da3d615a1805f094849247add77d09aee06451 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/e0/47462bda495acbe565c85b205d614f38c0a692 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/e0/47462bda495acbe565c85b205d614f38c0a692 new file mode 100644 index 000000000..528db3bd1 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/e0/47462bda495acbe565c85b205d614f38c0a692 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 new file mode 100644 index 000000000..b0b5fcfd9 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/objects/f0/bbe52a52883609acdb825c8af32b4b3ccb0607 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/heads/master b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..7de8bfce5 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +ae4e33d43751b83fbd0b6f0a1796d58462492e47 diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/remotes/origin/master b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..06e0fc5ca --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +4589efcaf3024e841825bb289bb88eb0e4f8530a diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile1 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile2 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile3 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile4 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile4 new file mode 100644 index 000000000..9b1719f5c --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile4 @@ -0,0 +1 @@ +conflict diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile5 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile5 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile5 @@ -0,0 +1 @@ +test diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected/myfile7 b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile7 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected/myfile7 @@ -0,0 +1 @@ +test diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/HEAD b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/config b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/config new file mode 100644 index 000000000..fb9626026 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullRebaseInteractiveWithDrop/./actual diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/description b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/info/exclude b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a new file mode 100644 index 000000000..abf2de1e2 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/45/89efcaf3024e841825bb289bb88eb0e4f8530a @@ -0,0 +1,2 @@ +x��A +�0@Q�9E���$3�D��z�$�`��R"����~�◵��[�t껪uUp `�ȇ��Q�C�,:�#�%qD��]_�*�@��(r*YY��x��C�$љ��u��d��t�Oj�S/em7��)D�^������'7�[������8� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b new file mode 100644 index 000000000..6f4196f0d Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/47/6a1939075b60aa47da50a8c40c5b4412a2f18b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 new file mode 100644 index 000000000..08237c841 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/57/59b6258419271e67a172e51cd90048dd21f9c0 @@ -0,0 +1,3 @@ +x��A +�0@Q�9���4�4��c�L��!R"����~����H|�*x�\��2&��H1r�8֑ +��J�N���v�f�M�C?b�M/�����)0��wG=&]��ξu��6�,� \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/e0/47462bda495acbe565c85b205d614f38c0a692 b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/e0/47462bda495acbe565c85b205d614f38c0a692 new file mode 100644 index 000000000..528db3bd1 Binary files /dev/null and b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/objects/e0/47462bda495acbe565c85b205d614f38c0a692 differ diff --git a/test/integration/pullRebaseInteractiveWithDrop/expected_remote/packed-refs b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/packed-refs new file mode 100644 index 000000000..27634cc2c --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +4589efcaf3024e841825bb289bb88eb0e4f8530a refs/heads/master diff --git a/test/integration/pullRebaseInteractiveWithDrop/recording.json b/test/integration/pullRebaseInteractiveWithDrop/recording.json new file mode 100644 index 000000000..9c1f842cb --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1430,"Mod":0,"Key":256,"Ch":112},{"Timestamp":2247,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2630,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2886,"Mod":0,"Key":259,"Ch":0},{"Timestamp":3175,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3599,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4357,"Mod":0,"Key":260,"Ch":0},{"Timestamp":4630,"Mod":0,"Key":260,"Ch":0},{"Timestamp":4983,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5214,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5470,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5989,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6838,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pullRebaseInteractiveWithDrop/setup.sh b/test/integration/pullRebaseInteractiveWithDrop/setup.sh new file mode 100644 index 000000000..0795a297f --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/setup.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 + +echo conflict > myfile4 +git add . +git commit -am "myfile4 conflict" + +echo test > myfile5 +git add . +git commit -am "5" + +echo test > myfile6 +git add . +git commit -am "6" + +echo test > myfile7 +git add . +git commit -am "7" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +git config pull.rebase interactive diff --git a/test/integration/pullRebaseInteractiveWithDrop/test.json b/test/integration/pullRebaseInteractiveWithDrop/test.json new file mode 100644 index 000000000..6f85ff5b7 --- /dev/null +++ b/test/integration/pullRebaseInteractiveWithDrop/test.json @@ -0,0 +1 @@ +{ "description": "When user has configured pull with interactive rebase, ensure we handle conflicts and show commits yet to be rebased", "speed": 5 } diff --git a/test/integration/push/expected/.git_keep/COMMIT_EDITMSG b/test/integration/push/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/push/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/push/expected/.git_keep/FETCH_HEAD b/test/integration/push/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..ecbad2700 --- /dev/null +++ b/test/integration/push/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +547f41a06ebd3bee30fbba3f43631810fa24f1bb branch 'master' of ../actual_remote diff --git a/test/integration/push/expected/.git_keep/HEAD b/test/integration/push/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/push/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/push/expected/.git_keep/config b/test/integration/push/expected/.git_keep/config new file mode 100644 index 000000000..821803a3e --- /dev/null +++ b/test/integration/push/expected/.git_keep/config @@ -0,0 +1,16 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/push/expected/.git_keep/description b/test/integration/push/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/push/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/push/expected/.git_keep/index b/test/integration/push/expected/.git_keep/index new file mode 100644 index 000000000..7d490a7c8 Binary files /dev/null and b/test/integration/push/expected/.git_keep/index differ diff --git a/test/integration/push/expected/.git_keep/info/exclude b/test/integration/push/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/push/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/push/expected/.git_keep/logs/HEAD b/test/integration/push/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..6c2301554 --- /dev/null +++ b/test/integration/push/expected/.git_keep/logs/HEAD @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 eb831bc1251f71f602159d98f4550e380007ca4f CI <CI@example.com> 1634897746 +1100 commit (initial): myfile1 +eb831bc1251f71f602159d98f4550e380007ca4f 547f41a06ebd3bee30fbba3f43631810fa24f1bb CI <CI@example.com> 1634897746 +1100 commit: myfile2 +547f41a06ebd3bee30fbba3f43631810fa24f1bb a09547e07257ed0456f498fde1b8214152427384 CI <CI@example.com> 1634897746 +1100 commit: myfile3 +a09547e07257ed0456f498fde1b8214152427384 a6e580c7c3c4ea40bc311466d57a946bb3f77541 CI <CI@example.com> 1634897746 +1100 commit: myfile4 diff --git a/test/integration/push/expected/.git_keep/logs/refs/heads/master b/test/integration/push/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..6c2301554 --- /dev/null +++ b/test/integration/push/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 eb831bc1251f71f602159d98f4550e380007ca4f CI <CI@example.com> 1634897746 +1100 commit (initial): myfile1 +eb831bc1251f71f602159d98f4550e380007ca4f 547f41a06ebd3bee30fbba3f43631810fa24f1bb CI <CI@example.com> 1634897746 +1100 commit: myfile2 +547f41a06ebd3bee30fbba3f43631810fa24f1bb a09547e07257ed0456f498fde1b8214152427384 CI <CI@example.com> 1634897746 +1100 commit: myfile3 +a09547e07257ed0456f498fde1b8214152427384 a6e580c7c3c4ea40bc311466d57a946bb3f77541 CI <CI@example.com> 1634897746 +1100 commit: myfile4 diff --git a/test/integration/push/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/push/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..a82757c78 --- /dev/null +++ b/test/integration/push/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 547f41a06ebd3bee30fbba3f43631810fa24f1bb CI <CI@example.com> 1634897746 +1100 fetch origin: storing head +547f41a06ebd3bee30fbba3f43631810fa24f1bb a6e580c7c3c4ea40bc311466d57a946bb3f77541 CI <CI@example.com> 1634897748 +1100 update by push diff --git a/test/integration/push/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/push/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/push/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/push/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/push/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/push/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/push/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/push/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/push/expected/.git_keep/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb b/test/integration/push/expected/.git_keep/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb new file mode 100644 index 000000000..419d9ecdf Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb differ diff --git a/test/integration/push/expected/.git_keep/objects/a0/9547e07257ed0456f498fde1b8214152427384 b/test/integration/push/expected/.git_keep/objects/a0/9547e07257ed0456f498fde1b8214152427384 new file mode 100644 index 000000000..02e8b627c --- /dev/null +++ b/test/integration/push/expected/.git_keep/objects/a0/9547e07257ed0456f498fde1b8214152427384 @@ -0,0 +1,2 @@ +x��A +�0E]����L�"BW=�L:��ƖAoo�����=�y+e��t�����)�l�hLh�3���� t�o���|���#�UfU&��∐ wd ��]��������.�����������@џBp��SU��]�ڲ*�`L;W \ No newline at end of file diff --git a/test/integration/push/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/push/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/push/expected/.git_keep/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 b/test/integration/push/expected/.git_keep/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 new file mode 100644 index 000000000..e50d53ba1 --- /dev/null +++ b/test/integration/push/expected/.git_keep/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 @@ -0,0 +1,4 @@ +x��M +�0@a�9E���$��H� �-%��^����-��t��}7� +*CL@1U�E8��b*�"O�3�����@fR �6�TʩΆc +Hȁ��D���}��m���p�wi��N��.%Rʪ$���~�7��O�ڧ.#�Z�7� \ No newline at end of file diff --git a/test/integration/push/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/push/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/push/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/push/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/push/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/push/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/push/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/push/expected/.git_keep/objects/eb/831bc1251f71f602159d98f4550e380007ca4f b/test/integration/push/expected/.git_keep/objects/eb/831bc1251f71f602159d98f4550e380007ca4f new file mode 100644 index 000000000..4acb8b3ca --- /dev/null +++ b/test/integration/push/expected/.git_keep/objects/eb/831bc1251f71f602159d98f4550e380007ca4f @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF����<ƘL���")���#t�y�S5[ �����S��K4f"��9b'X-�g�"��9��W�a��1ͣ~�ޛ�R�' �����;�9i�'w�+��6�,� \ No newline at end of file diff --git a/test/integration/push/expected/.git_keep/refs/heads/master b/test/integration/push/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..ccbf04e76 --- /dev/null +++ b/test/integration/push/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +a6e580c7c3c4ea40bc311466d57a946bb3f77541 diff --git a/test/integration/push/expected/.git_keep/refs/remotes/origin/master b/test/integration/push/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..ccbf04e76 --- /dev/null +++ b/test/integration/push/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +a6e580c7c3c4ea40bc311466d57a946bb3f77541 diff --git a/test/integration/push/expected/myfile1 b/test/integration/push/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/push/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/push/expected/myfile2 b/test/integration/push/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/push/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/push/expected/myfile3 b/test/integration/push/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/push/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/push/expected/myfile4 b/test/integration/push/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/push/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/push/expected_remote/HEAD b/test/integration/push/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/push/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/push/expected_remote/config b/test/integration/push/expected_remote/config new file mode 100644 index 000000000..26275994b --- /dev/null +++ b/test/integration/push/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/push/./actual diff --git a/test/integration/push/expected_remote/description b/test/integration/push/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/push/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/push/expected_remote/info/exclude b/test/integration/push/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/push/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/push/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/push/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/push/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/push/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/push/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/push/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/push/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/push/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/push/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/push/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/push/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/push/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/push/expected_remote/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb b/test/integration/push/expected_remote/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb new file mode 100644 index 000000000..419d9ecdf Binary files /dev/null and b/test/integration/push/expected_remote/objects/54/7f41a06ebd3bee30fbba3f43631810fa24f1bb differ diff --git a/test/integration/push/expected_remote/objects/a0/9547e07257ed0456f498fde1b8214152427384 b/test/integration/push/expected_remote/objects/a0/9547e07257ed0456f498fde1b8214152427384 new file mode 100644 index 000000000..02e8b627c --- /dev/null +++ b/test/integration/push/expected_remote/objects/a0/9547e07257ed0456f498fde1b8214152427384 @@ -0,0 +1,2 @@ +x��A +�0E]����L�"BW=�L:��ƖAoo�����=�y+e��t�����)�l�hLh�3���� t�o���|���#�UfU&��∐ wd ��]��������.�����������@џBp��SU��]�ڲ*�`L;W \ No newline at end of file diff --git a/test/integration/push/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/push/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/push/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/push/expected_remote/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 b/test/integration/push/expected_remote/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 new file mode 100644 index 000000000..e50d53ba1 --- /dev/null +++ b/test/integration/push/expected_remote/objects/a6/e580c7c3c4ea40bc311466d57a946bb3f77541 @@ -0,0 +1,4 @@ +x��M +�0@a�9E���$��H� �-%��^����-��t��}7� +*CL@1U�E8��b*�"O�3�����@fR �6�TʩΆc +Hȁ��D���}��m���p�wi��N��.%Rʪ$���~�7��O�ڧ.#�Z�7� \ No newline at end of file diff --git a/test/integration/push/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/push/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/push/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/push/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/push/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/push/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/push/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/push/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/push/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/push/expected_remote/objects/eb/831bc1251f71f602159d98f4550e380007ca4f b/test/integration/push/expected_remote/objects/eb/831bc1251f71f602159d98f4550e380007ca4f new file mode 100644 index 000000000..4acb8b3ca --- /dev/null +++ b/test/integration/push/expected_remote/objects/eb/831bc1251f71f602159d98f4550e380007ca4f @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JF����<ƘL���")���#t�y�S5[ �����S��K4f"��9b'X-�g�"��9��W�a��1ͣ~�ޛ�R�' �����;�9i�'w�+��6�,� \ No newline at end of file diff --git a/test/integration/push/expected_remote/packed-refs b/test/integration/push/expected_remote/packed-refs new file mode 100644 index 000000000..0c4bde9c0 --- /dev/null +++ b/test/integration/push/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +547f41a06ebd3bee30fbba3f43631810fa24f1bb refs/heads/master diff --git a/test/integration/push/expected_remote/refs/heads/master b/test/integration/push/expected_remote/refs/heads/master new file mode 100644 index 000000000..ccbf04e76 --- /dev/null +++ b/test/integration/push/expected_remote/refs/heads/master @@ -0,0 +1 @@ +a6e580c7c3c4ea40bc311466d57a946bb3f77541 diff --git a/test/integration/push/recording.json b/test/integration/push/recording.json new file mode 100644 index 000000000..62b3bfb86 --- /dev/null +++ b/test/integration/push/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":916,"Mod":0,"Key":256,"Ch":80},{"Timestamp":2131,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/push/setup.sh b/test/integration/push/setup.sh new file mode 100644 index 000000000..7d137b349 --- /dev/null +++ b/test/integration/push/setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master diff --git a/test/integration/push/test.json b/test/integration/push/test.json new file mode 100644 index 000000000..bcf197ae6 --- /dev/null +++ b/test/integration/push/test.json @@ -0,0 +1 @@ +{ "description": "push changes to the remote", "speed": 10 } diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pushAndSetUpstream/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/FETCH_HEAD b/test/integration/pushAndSetUpstream/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..989da164a --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +dab77371cf53420955fc9baeb84303414f7e4a60 not-for-merge branch 'master' of ../actual_remote diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/HEAD b/test/integration/pushAndSetUpstream/expected/.git_keep/HEAD new file mode 100644 index 000000000..cea9d05ed --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/test diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/config b/test/integration/pushAndSetUpstream/expected/.git_keep/config new file mode 100644 index 000000000..7b5eaec7c --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[push] + default = nothing +[branch "test"] + remote = origin + merge = refs/heads/test diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/description b/test/integration/pushAndSetUpstream/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/index b/test/integration/pushAndSetUpstream/expected/.git_keep/index new file mode 100644 index 000000000..b9df8bc71 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/index differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/info/exclude b/test/integration/pushAndSetUpstream/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/logs/HEAD b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..ab1e651fb --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 65c52315dc238c164b914369f49bd70882cc1d85 CI <CI@example.com> 1634897751 +1100 commit (initial): myfile1 +65c52315dc238c164b914369f49bd70882cc1d85 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 commit: myfile2 +dab77371cf53420955fc9baeb84303414f7e4a60 dbd679941d871665b7ff70fffe6116725e56e270 CI <CI@example.com> 1634897751 +1100 commit: myfile3 +dbd679941d871665b7ff70fffe6116725e56e270 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897751 +1100 commit: myfile4 +707a2a0835c897496934849bf6e0815593b140b3 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897753 +1100 checkout: moving from master to test diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/master b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..0efb79581 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 65c52315dc238c164b914369f49bd70882cc1d85 CI <CI@example.com> 1634897751 +1100 commit (initial): myfile1 +65c52315dc238c164b914369f49bd70882cc1d85 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 commit: myfile2 +dab77371cf53420955fc9baeb84303414f7e4a60 dbd679941d871665b7ff70fffe6116725e56e270 CI <CI@example.com> 1634897751 +1100 commit: myfile3 +dbd679941d871665b7ff70fffe6116725e56e270 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897751 +1100 commit: myfile4 diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/test b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/test new file mode 100644 index 000000000..c22f24f3c --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/heads/test @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897753 +1100 branch: Created from master diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..2b03e0efd --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 fetch origin: storing head diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/test b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/test new file mode 100644 index 000000000..1e7209170 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/logs/refs/remotes/origin/test @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897754 +1100 update by push diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/65/c52315dc238c164b914369f49bd70882cc1d85 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/65/c52315dc238c164b914369f49bd70882cc1d85 new file mode 100644 index 000000000..9f235e0ed Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/65/c52315dc238c164b914369f49bd70882cc1d85 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/70/7a2a0835c897496934849bf6e0815593b140b3 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/70/7a2a0835c897496934849bf6e0815593b140b3 new file mode 100644 index 000000000..3556acfa5 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/70/7a2a0835c897496934849bf6e0815593b140b3 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 new file mode 100644 index 000000000..fd638ab15 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/db/d679941d871665b7ff70fffe6116725e56e270 b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/db/d679941d871665b7ff70fffe6116725e56e270 new file mode 100644 index 000000000..49cc241d7 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/db/d679941d871665b7ff70fffe6116725e56e270 differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/master b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..683d3d319 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +707a2a0835c897496934849bf6e0815593b140b3 diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/test b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/test new file mode 100644 index 000000000..683d3d319 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/heads/test @@ -0,0 +1 @@ +707a2a0835c897496934849bf6e0815593b140b3 diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/master b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..874cd1689 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +dab77371cf53420955fc9baeb84303414f7e4a60 diff --git a/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/test b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/test new file mode 100644 index 000000000..683d3d319 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/.git_keep/refs/remotes/origin/test @@ -0,0 +1 @@ +707a2a0835c897496934849bf6e0815593b140b3 diff --git a/test/integration/pushAndSetUpstream/expected/myfile1 b/test/integration/pushAndSetUpstream/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pushAndSetUpstream/expected/myfile2 b/test/integration/pushAndSetUpstream/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pushAndSetUpstream/expected/myfile3 b/test/integration/pushAndSetUpstream/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pushAndSetUpstream/expected/myfile4 b/test/integration/pushAndSetUpstream/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pushAndSetUpstream/expected_remote/HEAD b/test/integration/pushAndSetUpstream/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pushAndSetUpstream/expected_remote/config b/test/integration/pushAndSetUpstream/expected_remote/config new file mode 100644 index 000000000..de756510f --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pushAndSetUpstream/./actual diff --git a/test/integration/pushAndSetUpstream/expected_remote/description b/test/integration/pushAndSetUpstream/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushAndSetUpstream/expected_remote/info/exclude b/test/integration/pushAndSetUpstream/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushAndSetUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushAndSetUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushAndSetUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushAndSetUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/65/c52315dc238c164b914369f49bd70882cc1d85 b/test/integration/pushAndSetUpstream/expected_remote/objects/65/c52315dc238c164b914369f49bd70882cc1d85 new file mode 100644 index 000000000..9f235e0ed Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/65/c52315dc238c164b914369f49bd70882cc1d85 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/70/7a2a0835c897496934849bf6e0815593b140b3 b/test/integration/pushAndSetUpstream/expected_remote/objects/70/7a2a0835c897496934849bf6e0815593b140b3 new file mode 100644 index 000000000..3556acfa5 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/70/7a2a0835c897496934849bf6e0815593b140b3 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushAndSetUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushAndSetUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushAndSetUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 b/test/integration/pushAndSetUpstream/expected_remote/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 new file mode 100644 index 000000000..fd638ab15 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/da/b77371cf53420955fc9baeb84303414f7e4a60 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/db/d679941d871665b7ff70fffe6116725e56e270 b/test/integration/pushAndSetUpstream/expected_remote/objects/db/d679941d871665b7ff70fffe6116725e56e270 new file mode 100644 index 000000000..49cc241d7 Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/db/d679941d871665b7ff70fffe6116725e56e270 differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushAndSetUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushAndSetUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushAndSetUpstream/expected_remote/packed-refs b/test/integration/pushAndSetUpstream/expected_remote/packed-refs new file mode 100644 index 000000000..8271e61c9 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +dab77371cf53420955fc9baeb84303414f7e4a60 refs/heads/master diff --git a/test/integration/pushAndSetUpstream/expected_remote/refs/heads/test b/test/integration/pushAndSetUpstream/expected_remote/refs/heads/test new file mode 100644 index 000000000..683d3d319 --- /dev/null +++ b/test/integration/pushAndSetUpstream/expected_remote/refs/heads/test @@ -0,0 +1 @@ +707a2a0835c897496934849bf6e0815593b140b3 diff --git a/test/integration/pushAndSetUpstream/recording.json b/test/integration/pushAndSetUpstream/recording.json new file mode 100644 index 000000000..6b209be21 --- /dev/null +++ b/test/integration/pushAndSetUpstream/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":519,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1101,"Mod":0,"Key":256,"Ch":110},{"Timestamp":1286,"Mod":0,"Key":256,"Ch":116},{"Timestamp":1382,"Mod":0,"Key":256,"Ch":101},{"Timestamp":1574,"Mod":0,"Key":256,"Ch":115},{"Timestamp":1613,"Mod":0,"Key":256,"Ch":116},{"Timestamp":1814,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2430,"Mod":0,"Key":256,"Ch":80},{"Timestamp":2910,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4149,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pushAndSetUpstream/setup.sh b/test/integration/pushAndSetUpstream/setup.sh new file mode 100644 index 000000000..2911a073c --- /dev/null +++ b/test/integration/pushAndSetUpstream/setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +git remote add origin ../actual_remote +git fetch origin +git config push.default nothing diff --git a/test/integration/pushAndSetUpstream/test.json b/test/integration/pushAndSetUpstream/test.json new file mode 100644 index 000000000..f417f0ee5 --- /dev/null +++ b/test/integration/pushAndSetUpstream/test.json @@ -0,0 +1 @@ +{ "description": "push changes to the remote, setting upstream", "speed": 10 } diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/FETCH_HEAD b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..adf0b729b --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +dc7117cc68b23798cabb2c388a45036da33c2f10 not-for-merge branch 'master' of ../actual_remote diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/HEAD b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/HEAD new file mode 100644 index 000000000..cea9d05ed --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/test diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/config b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/config new file mode 100644 index 000000000..ec0727bec --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/config @@ -0,0 +1,18 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[push] + default = current +[branch "test"] + remote = origin + merge = refs/heads/test diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/description b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/index b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/index new file mode 100644 index 000000000..6bf05e8bb Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/index differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/info/exclude b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/HEAD b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..734f642ab --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 d0e2575d4cdf78f6845db57439c7b526d02dbc7d CI <CI@example.com> 1634897757 +1100 commit (initial): myfile1 +d0e2575d4cdf78f6845db57439c7b526d02dbc7d dc7117cc68b23798cabb2c388a45036da33c2f10 CI <CI@example.com> 1634897757 +1100 commit: myfile2 +dc7117cc68b23798cabb2c388a45036da33c2f10 6552acdbb2da7b153b78bbd9f6a564a54fce1ed9 CI <CI@example.com> 1634897757 +1100 commit: myfile3 +6552acdbb2da7b153b78bbd9f6a564a54fce1ed9 2d0011f18dcd00e21fd13ede01792048ccd09e85 CI <CI@example.com> 1634897757 +1100 commit: myfile4 +2d0011f18dcd00e21fd13ede01792048ccd09e85 2d0011f18dcd00e21fd13ede01792048ccd09e85 CI <CI@example.com> 1634897760 +1100 checkout: moving from master to test diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/master b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..00e298ce4 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 d0e2575d4cdf78f6845db57439c7b526d02dbc7d CI <CI@example.com> 1634897757 +1100 commit (initial): myfile1 +d0e2575d4cdf78f6845db57439c7b526d02dbc7d dc7117cc68b23798cabb2c388a45036da33c2f10 CI <CI@example.com> 1634897757 +1100 commit: myfile2 +dc7117cc68b23798cabb2c388a45036da33c2f10 6552acdbb2da7b153b78bbd9f6a564a54fce1ed9 CI <CI@example.com> 1634897757 +1100 commit: myfile3 +6552acdbb2da7b153b78bbd9f6a564a54fce1ed9 2d0011f18dcd00e21fd13ede01792048ccd09e85 CI <CI@example.com> 1634897757 +1100 commit: myfile4 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/test b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/test new file mode 100644 index 000000000..26a649f81 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/heads/test @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 2d0011f18dcd00e21fd13ede01792048ccd09e85 CI <CI@example.com> 1634897760 +1100 branch: Created from master diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..63ed3051f --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 dc7117cc68b23798cabb2c388a45036da33c2f10 CI <CI@example.com> 1634897757 +1100 fetch origin: storing head diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/test b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/test new file mode 100644 index 000000000..8b11b4981 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/logs/refs/remotes/origin/test @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 2d0011f18dcd00e21fd13ede01792048ccd09e85 CI <CI@example.com> 1634897761 +1100 update by push diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 new file mode 100644 index 000000000..3b028eaf7 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 new file mode 100644 index 000000000..5e637927f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d new file mode 100644 index 000000000..d93d894fa --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JFǙ�\y��L������#t�y�S5[ ����S�5d"��9`�-�g��й�n�z�4�}�����ozK���SE�+������ٷ����7,,� \ No newline at end of file diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 new file mode 100644 index 000000000..bd9a3df16 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/master b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..fcd0d8e35 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +2d0011f18dcd00e21fd13ede01792048ccd09e85 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/test b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/test new file mode 100644 index 000000000..fcd0d8e35 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/heads/test @@ -0,0 +1 @@ +2d0011f18dcd00e21fd13ede01792048ccd09e85 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/master b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..caea74126 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +dc7117cc68b23798cabb2c388a45036da33c2f10 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/test b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/test new file mode 100644 index 000000000..fcd0d8e35 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/.git_keep/refs/remotes/origin/test @@ -0,0 +1 @@ +2d0011f18dcd00e21fd13ede01792048ccd09e85 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/myfile1 b/test/integration/pushAndSetUpstreamDefault/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/myfile2 b/test/integration/pushAndSetUpstreamDefault/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/myfile3 b/test/integration/pushAndSetUpstreamDefault/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pushAndSetUpstreamDefault/expected/myfile4 b/test/integration/pushAndSetUpstreamDefault/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/HEAD b/test/integration/pushAndSetUpstreamDefault/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/config b/test/integration/pushAndSetUpstreamDefault/expected_remote/config new file mode 100644 index 000000000..5f4aec3f4 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pushAndSetUpstreamDefault/./actual diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/description b/test/integration/pushAndSetUpstreamDefault/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/info/exclude b/test/integration/pushAndSetUpstreamDefault/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 new file mode 100644 index 000000000..3b028eaf7 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2d/0011f18dcd00e21fd13ede01792048ccd09e85 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 new file mode 100644 index 000000000..5e637927f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/65/52acdbb2da7b153b78bbd9f6a564a54fce1ed9 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d new file mode 100644 index 000000000..d93d894fa --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d0/e2575d4cdf78f6845db57439c7b526d02dbc7d @@ -0,0 +1,2 @@ +x��A +�0@Ѯs��JFǙ�\y��L������#t�y�S5[ ����S�5d"��9`�-�g��й�n�z�4�}�����ozK���SE�+������ٷ����7,,� \ No newline at end of file diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 new file mode 100644 index 000000000..bd9a3df16 Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/dc/7117cc68b23798cabb2c388a45036da33c2f10 differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushAndSetUpstreamDefault/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/packed-refs b/test/integration/pushAndSetUpstreamDefault/expected_remote/packed-refs new file mode 100644 index 000000000..aadce3af8 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +dc7117cc68b23798cabb2c388a45036da33c2f10 refs/heads/master diff --git a/test/integration/pushAndSetUpstreamDefault/expected_remote/refs/heads/test b/test/integration/pushAndSetUpstreamDefault/expected_remote/refs/heads/test new file mode 100644 index 000000000..fcd0d8e35 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/expected_remote/refs/heads/test @@ -0,0 +1 @@ +2d0011f18dcd00e21fd13ede01792048ccd09e85 diff --git a/test/integration/pushAndSetUpstreamDefault/recording.json b/test/integration/pushAndSetUpstreamDefault/recording.json new file mode 100644 index 000000000..f3e4e79b1 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1523,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1953,"Mod":0,"Key":256,"Ch":110},{"Timestamp":2224,"Mod":0,"Key":256,"Ch":116},{"Timestamp":2289,"Mod":0,"Key":256,"Ch":101},{"Timestamp":2432,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2455,"Mod":0,"Key":256,"Ch":116},{"Timestamp":2633,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3369,"Mod":0,"Key":256,"Ch":80},{"Timestamp":4464,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pushAndSetUpstreamDefault/setup.sh b/test/integration/pushAndSetUpstreamDefault/setup.sh new file mode 100644 index 000000000..d12f985f6 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +git remote add origin ../actual_remote +git fetch origin +git config push.default current diff --git a/test/integration/pushAndSetUpstreamDefault/test.json b/test/integration/pushAndSetUpstreamDefault/test.json new file mode 100644 index 000000000..5b9f43bd3 --- /dev/null +++ b/test/integration/pushAndSetUpstreamDefault/test.json @@ -0,0 +1 @@ +{ "description": "push changes to the remote, setting upstream automatically based on config", "speed": 10 } diff --git a/test/integration/setUpstream/expected/.git_keep/COMMIT_EDITMSG b/test/integration/setUpstream/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/setUpstream/expected/.git_keep/FETCH_HEAD b/test/integration/setUpstream/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..865fc1191 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b branch 'master' of ../actual_remote diff --git a/test/integration/setUpstream/expected/.git_keep/HEAD b/test/integration/setUpstream/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/setUpstream/expected/.git_keep/ORIG_HEAD b/test/integration/setUpstream/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..131e55236 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +058c8904c25889dd77ee3e817325fd1a28134037 diff --git a/test/integration/setUpstream/expected/.git_keep/config b/test/integration/setUpstream/expected/.git_keep/config new file mode 100644 index 000000000..821803a3e --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/config @@ -0,0 +1,16 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/setUpstream/expected/.git_keep/description b/test/integration/setUpstream/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/setUpstream/expected/.git_keep/index b/test/integration/setUpstream/expected/.git_keep/index new file mode 100644 index 000000000..9c34edeae Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/index differ diff --git a/test/integration/setUpstream/expected/.git_keep/info/exclude b/test/integration/setUpstream/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/setUpstream/expected/.git_keep/logs/HEAD b/test/integration/setUpstream/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..0a0706f6a --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/logs/HEAD @@ -0,0 +1,6 @@ +0000000000000000000000000000000000000000 7d7da1f440cca8d28eaf4b46e63f207993562b84 CI <CI@example.com> 1634898072 +1100 commit (initial): myfile1 +7d7da1f440cca8d28eaf4b46e63f207993562b84 058c8904c25889dd77ee3e817325fd1a28134037 CI <CI@example.com> 1634898072 +1100 commit: myfile2 +058c8904c25889dd77ee3e817325fd1a28134037 409dd039b9ec270067678ae23b710c8e4c49c458 CI <CI@example.com> 1634898072 +1100 commit: myfile3 +409dd039b9ec270067678ae23b710c8e4c49c458 148a38f7ce513079d6cd40e4a02f11e46ea2ba6b CI <CI@example.com> 1634898072 +1100 commit: myfile4 +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b 058c8904c25889dd77ee3e817325fd1a28134037 CI <CI@example.com> 1634898072 +1100 reset: moving to HEAD~2 +058c8904c25889dd77ee3e817325fd1a28134037 148a38f7ce513079d6cd40e4a02f11e46ea2ba6b CI <CI@example.com> 1634898082 +1100 pull --no-edit: Fast-forward diff --git a/test/integration/setUpstream/expected/.git_keep/logs/refs/heads/master b/test/integration/setUpstream/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..0a0706f6a --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,6 @@ +0000000000000000000000000000000000000000 7d7da1f440cca8d28eaf4b46e63f207993562b84 CI <CI@example.com> 1634898072 +1100 commit (initial): myfile1 +7d7da1f440cca8d28eaf4b46e63f207993562b84 058c8904c25889dd77ee3e817325fd1a28134037 CI <CI@example.com> 1634898072 +1100 commit: myfile2 +058c8904c25889dd77ee3e817325fd1a28134037 409dd039b9ec270067678ae23b710c8e4c49c458 CI <CI@example.com> 1634898072 +1100 commit: myfile3 +409dd039b9ec270067678ae23b710c8e4c49c458 148a38f7ce513079d6cd40e4a02f11e46ea2ba6b CI <CI@example.com> 1634898072 +1100 commit: myfile4 +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b 058c8904c25889dd77ee3e817325fd1a28134037 CI <CI@example.com> 1634898072 +1100 reset: moving to HEAD~2 +058c8904c25889dd77ee3e817325fd1a28134037 148a38f7ce513079d6cd40e4a02f11e46ea2ba6b CI <CI@example.com> 1634898082 +1100 pull --no-edit: Fast-forward diff --git a/test/integration/setUpstream/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/setUpstream/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..10925c1eb --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 148a38f7ce513079d6cd40e4a02f11e46ea2ba6b CI <CI@example.com> 1634898079 +1100 fetch origin: storing head diff --git a/test/integration/setUpstream/expected/.git_keep/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 b/test/integration/setUpstream/expected/.git_keep/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 new file mode 100644 index 000000000..ae34bb7c1 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��$��$"BW=Ƥ�`��R"����~���kkK����wU+1����+E�2��L���*�'�ɮ�nc�E|Et�,�@R����B��@�y�Ǻ�q��q��G���˼���0qr��{��Q���rӾuy*�ݜ:< \ No newline at end of file diff --git a/test/integration/setUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/setUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b b/test/integration/setUpstream/expected/.git_keep/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b new file mode 100644 index 000000000..9d94a934d --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b @@ -0,0 +1,3 @@ +x��A +�0@Ѯs��e&�L& ���c�8R�T����#t�y�_�Z�f1ѥ��͌� � /3҈�A����PrHh�|�Y�4M�Ә�����du~�E� +�BAL~��v�~�]?<����l�n�=I��^�Yϩ�rS��*���8M \ No newline at end of file diff --git a/test/integration/setUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/setUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/setUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/setUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 b/test/integration/setUpstream/expected/.git_keep/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 new file mode 100644 index 000000000..fa4e2ebaa --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 @@ -0,0 +1,3 @@ +x��A +� E����q4�J!�Ì# �&������x<>ﵮMCt�v�h�@@�rq�%9,%e�B�iA�����#��j�xb�Ʊ�D1�DP�G�/�%@g0��n���Ӭ�i~�'�c����a@G�L�� +`�괟j�귬�����9� \ No newline at end of file diff --git a/test/integration/setUpstream/expected/.git_keep/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 b/test/integration/setUpstream/expected/.git_keep/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 new file mode 100644 index 000000000..54afb1c5a --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 @@ -0,0 +1,3 @@ +x��A +�0@Q�9��ɤ�d +"BW=�4�`�!R"����~��j]; ��f��S��KM2��p�%�BCf*����?���i~�G�k�Kj���(>8#z�zL���]��u3t?4A,� \ No newline at end of file diff --git a/test/integration/setUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/setUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/setUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/setUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/setUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/setUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/setUpstream/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/setUpstream/expected/.git_keep/refs/heads/master b/test/integration/setUpstream/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..25aa18f55 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b diff --git a/test/integration/setUpstream/expected/.git_keep/refs/remotes/origin/master b/test/integration/setUpstream/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..25aa18f55 --- /dev/null +++ b/test/integration/setUpstream/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b diff --git a/test/integration/setUpstream/expected/myfile1 b/test/integration/setUpstream/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/setUpstream/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/setUpstream/expected/myfile2 b/test/integration/setUpstream/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/setUpstream/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/setUpstream/expected/myfile3 b/test/integration/setUpstream/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/setUpstream/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/setUpstream/expected/myfile4 b/test/integration/setUpstream/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/setUpstream/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/setUpstream/expected_remote/HEAD b/test/integration/setUpstream/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/setUpstream/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/setUpstream/expected_remote/config b/test/integration/setUpstream/expected_remote/config new file mode 100644 index 000000000..1a0f699c7 --- /dev/null +++ b/test/integration/setUpstream/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/setUpstream/./actual diff --git a/test/integration/setUpstream/expected_remote/description b/test/integration/setUpstream/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/setUpstream/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/setUpstream/expected_remote/info/exclude b/test/integration/setUpstream/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/setUpstream/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/setUpstream/expected_remote/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 b/test/integration/setUpstream/expected_remote/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 new file mode 100644 index 000000000..ae34bb7c1 --- /dev/null +++ b/test/integration/setUpstream/expected_remote/objects/05/8c8904c25889dd77ee3e817325fd1a28134037 @@ -0,0 +1,2 @@ +x��A +�0@Q�9E��$��$"BW=Ƥ�`��R"����~���kkK����wU+1����+E�2��L���*�'�ɮ�nc�E|Et�,�@R����B��@�y�Ǻ�q��q��G���˼���0qr��{��Q���rӾuy*�ݜ:< \ No newline at end of file diff --git a/test/integration/setUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/setUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/setUpstream/expected_remote/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b b/test/integration/setUpstream/expected_remote/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b new file mode 100644 index 000000000..9d94a934d --- /dev/null +++ b/test/integration/setUpstream/expected_remote/objects/14/8a38f7ce513079d6cd40e4a02f11e46ea2ba6b @@ -0,0 +1,3 @@ +x��A +�0@Ѯs��e&�L& ���c�8R�T����#t�y�_�Z�f1ѥ��͌� � /3҈�A����PrHh�|�Y�4M�Ә�����du~�E� +�BAL~��v�~�]?<����l�n�=I��^�Yϩ�rS��*���8M \ No newline at end of file diff --git a/test/integration/setUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/setUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/setUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/setUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/setUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/setUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/setUpstream/expected_remote/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 b/test/integration/setUpstream/expected_remote/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 new file mode 100644 index 000000000..fa4e2ebaa --- /dev/null +++ b/test/integration/setUpstream/expected_remote/objects/40/9dd039b9ec270067678ae23b710c8e4c49c458 @@ -0,0 +1,3 @@ +x��A +� E����q4�J!�Ì# �&������x<>ﵮMCt�v�h�@@�rq�%9,%e�B�iA�����#��j�xb�Ʊ�D1�DP�G�/�%@g0��n���Ӭ�i~�'�c����a@G�L�� +`�괟j�귬�����9� \ No newline at end of file diff --git a/test/integration/setUpstream/expected_remote/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 b/test/integration/setUpstream/expected_remote/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 new file mode 100644 index 000000000..54afb1c5a --- /dev/null +++ b/test/integration/setUpstream/expected_remote/objects/7d/7da1f440cca8d28eaf4b46e63f207993562b84 @@ -0,0 +1,3 @@ +x��A +�0@Q�9��ɤ�d +"BW=�4�`�!R"����~��j]; ��f��S��KM2��p�%�BCf*����?���i~�G�k�Kj���(>8#z�zL���]��u3t?4A,� \ No newline at end of file diff --git a/test/integration/setUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/setUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/setUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/setUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/setUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/setUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/setUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/setUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/setUpstream/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/setUpstream/expected_remote/packed-refs b/test/integration/setUpstream/expected_remote/packed-refs new file mode 100644 index 000000000..a5eca4e4d --- /dev/null +++ b/test/integration/setUpstream/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +148a38f7ce513079d6cd40e4a02f11e46ea2ba6b refs/heads/master diff --git a/test/integration/setUpstream/recording.json b/test/integration/setUpstream/recording.json new file mode 100644 index 000000000..d4983d00b --- /dev/null +++ b/test/integration/setUpstream/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":555,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1226,"Mod":0,"Key":256,"Ch":93},{"Timestamp":1731,"Mod":0,"Key":256,"Ch":110},{"Timestamp":1971,"Mod":0,"Key":256,"Ch":111},{"Timestamp":2131,"Mod":0,"Key":256,"Ch":114},{"Timestamp":2219,"Mod":0,"Key":256,"Ch":105},{"Timestamp":2274,"Mod":0,"Key":256,"Ch":103},{"Timestamp":2338,"Mod":0,"Key":256,"Ch":105},{"Timestamp":2418,"Mod":0,"Key":256,"Ch":110},{"Timestamp":2843,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3379,"Mod":0,"Key":256,"Ch":46},{"Timestamp":3522,"Mod":0,"Key":256,"Ch":46},{"Timestamp":3690,"Mod":0,"Key":256,"Ch":47},{"Timestamp":3947,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4105,"Mod":0,"Key":256,"Ch":99},{"Timestamp":4266,"Mod":0,"Key":256,"Ch":116},{"Timestamp":4338,"Mod":0,"Key":256,"Ch":117},{"Timestamp":4442,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4530,"Mod":0,"Key":256,"Ch":108},{"Timestamp":4731,"Mod":0,"Key":256,"Ch":95},{"Timestamp":4915,"Mod":0,"Key":256,"Ch":114},{"Timestamp":4962,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5041,"Mod":0,"Key":256,"Ch":109},{"Timestamp":5090,"Mod":0,"Key":256,"Ch":111},{"Timestamp":5146,"Mod":0,"Key":256,"Ch":116},{"Timestamp":5170,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5443,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6313,"Mod":0,"Key":256,"Ch":102},{"Timestamp":7171,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7883,"Mod":0,"Key":256,"Ch":117},{"Timestamp":8459,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9411,"Mod":0,"Key":256,"Ch":112},{"Timestamp":10298,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/setUpstream/setup.sh b/test/integration/setUpstream/setup.sh new file mode 100644 index 000000000..6a2b91419 --- /dev/null +++ b/test/integration/setUpstream/setup.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +git reset --hard HEAD~2 diff --git a/test/integration/setUpstream/test.json b/test/integration/setUpstream/test.json new file mode 100644 index 000000000..32b4b9d64 --- /dev/null +++ b/test/integration/setUpstream/test.json @@ -0,0 +1 @@ +{ "description": "allow setting the upstream of the current branch", "speed": 10 } diff --git a/test/runner/main.go b/test/runner/main.go index 585f26546..b122568fe 100644 --- a/test/runner/main.go +++ b/test/runner/main.go @@ -40,8 +40,8 @@ func main() { updateSnapshots, record, speedEnv, - func(_t *testing.T, expected string, actual string) { - assert.Equal(MockTestingT{}, expected, actual, fmt.Sprintf("expected:\n%s\nactual:\n%s\n", expected, actual)) + func(_t *testing.T, expected string, actual string, prefix string) { + assert.Equal(MockTestingT{}, expected, actual, fmt.Sprintf("Unexpected %s. Expected:\n%s\nActual:\n%s\n", prefix, expected, actual)) }, includeSkipped, )