diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-17 18:29:13 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-17 19:14:59 +1100 |
commit | d3a3c8d87d5a25fe30ea5da76c572fad895bdfdb (patch) | |
tree | 5b088d2c348ba566cb828f5df6ba4d8863d86801 /test/integration | |
parent | ee622d044eb6a2964dc2410e7b001234014b8039 (diff) |
add integration test for merge conflicts resolved externally
Diffstat (limited to 'test/integration')
29 files changed, 100 insertions, 0 deletions
diff --git a/test/integration/mergeConflictsResolvedExternally/config/config.yml b/test/integration/mergeConflictsResolvedExternally/config/config.yml new file mode 100644 index 000000000..33b63939a --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/config/config.yml @@ -0,0 +1,6 @@ +disableStartupPopups: true +customCommands: + - key: 'N' + description: 'Resolve conflict' + context: 'files' + command: 'echo "master2" > file' diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/COMMIT_EDITMSG b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..9c1b1e853 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1,20 @@ +Merge branch 'master' into other + +# Conflicts: +# file +# +# 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/mergeConflictsResolvedExternally/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 other +# All conflicts fixed but you are still merging. +# +# Changes to be committed: +# modified: file +# diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/FETCH_HEAD b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/FETCH_HEAD diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/HEAD b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/HEAD new file mode 100644 index 000000000..0ca960536 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/other diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/ORIG_HEAD b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..30d51fe1d --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +769c8b8d89700f6f196b8331159150746a839662 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/config b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/config new file mode 100644 index 000000000..8ae104545 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/config @@ -0,0 +1,10 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/description b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/index b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/index Binary files differnew file mode 100644 index 000000000..61de7270a --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/index diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/info/exclude b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/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/mergeConflictsResolvedExternally/expected/.git_keep/logs/HEAD b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..e316f4ff1 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/HEAD @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 CI <CI@example.com> 1642403134 +1100 commit (initial): master1 +03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 CI <CI@example.com> 1642403134 +1100 checkout: moving from master to other +03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 769c8b8d89700f6f196b8331159150746a839662 CI <CI@example.com> 1642403134 +1100 commit: other1 +769c8b8d89700f6f196b8331159150746a839662 03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 CI <CI@example.com> 1642403134 +1100 checkout: moving from other to master +03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 691ee9e9d9c654c81214f56c514ff725f46cb9e4 CI <CI@example.com> 1642403134 +1100 commit: master2 +691ee9e9d9c654c81214f56c514ff725f46cb9e4 769c8b8d89700f6f196b8331159150746a839662 CI <CI@example.com> 1642403134 +1100 checkout: moving from master to other +769c8b8d89700f6f196b8331159150746a839662 f2df244fb87b6ba1d2ab484d76c66baba168a867 CI <CI@example.com> 1642403138 +1100 commit (merge): Merge branch 'master' into other diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/master b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..2e39e4fcd --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 CI <CI@example.com> 1642403134 +1100 commit (initial): master1 +03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 691ee9e9d9c654c81214f56c514ff725f46cb9e4 CI <CI@example.com> 1642403134 +1100 commit: master2 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/other b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/other new file mode 100644 index 000000000..a462e4b21 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/logs/refs/heads/other @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 CI <CI@example.com> 1642403134 +1100 branch: Created from HEAD +03959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 769c8b8d89700f6f196b8331159150746a839662 CI <CI@example.com> 1642403134 +1100 commit: other1 +769c8b8d89700f6f196b8331159150746a839662 f2df244fb87b6ba1d2ab484d76c66baba168a867 CI <CI@example.com> 1642403138 +1100 commit (merge): Merge branch 'master' into other diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/03/959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/03/959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 new file mode 100644 index 000000000..e91b55a9f --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/03/959db9f70fcb4a8f0931e4ad64e1c9ec1016a4 @@ -0,0 +1,4 @@ +xA +1@Q=E$v!"j) +X#<=Bȹą}TYbQ8%Hϸ
.vӯ멧 +#{8!Ydܙ'&xR-k
\ No newline at end of file diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/08/84a47e04257f4c85435a8b10ff4f15fffa63fc b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/08/84a47e04257f4c85435a8b10ff4f15fffa63fc Binary files differnew file mode 100644 index 000000000..20a13c218 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/08/84a47e04257f4c85435a8b10ff4f15fffa63fc diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/0b/e6e80a67f6276c5ede28dd6b8fa8873f1b23c5 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/0b/e6e80a67f6276c5ede28dd6b8fa8873f1b23c5 Binary files differnew file mode 100644 index 000000000..eb74d7a88 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/0b/e6e80a67f6276c5ede28dd6b8fa8873f1b23c5 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/2d/8021ed8803ed6142d31b331850ef46246391a7 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/2d/8021ed8803ed6142d31b331850ef46246391a7 Binary files differnew file mode 100644 index 000000000..660150da8 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/2d/8021ed8803ed6142d31b331850ef46246391a7 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/53/502c7023f80c046a1b00b45614d5ffef8977d9 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/53/502c7023f80c046a1b00b45614d5ffef8977d9 Binary files differnew file mode 100644 index 000000000..fdb7cf9f9 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/53/502c7023f80c046a1b00b45614d5ffef8977d9 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/69/1ee9e9d9c654c81214f56c514ff725f46cb9e4 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/69/1ee9e9d9c654c81214f56c514ff725f46cb9e4 Binary files differnew file mode 100644 index 000000000..ebc29f7ce --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/69/1ee9e9d9c654c81214f56c514ff725f46cb9e4 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/6b/03bc7537ecf00b48a0ea57ce1edf388ed3f1ad b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/6b/03bc7537ecf00b48a0ea57ce1edf388ed3f1ad Binary files differnew file mode 100644 index 000000000..9ccb24501 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/6b/03bc7537ecf00b48a0ea57ce1edf388ed3f1ad diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/76/9c8b8d89700f6f196b8331159150746a839662 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/76/9c8b8d89700f6f196b8331159150746a839662 new file mode 100644 index 000000000..f6c47ec28 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/76/9c8b8d89700f6f196b8331159150746a839662 @@ -0,0 +1,3 @@ +xA +0@Q9Ed1"BW=FL`L <=[j}BUjHGvp%0= ƫc@2I^\c( 1{VL }d?ckC/V=;Bb{F0G=Mv4? +8
\ No newline at end of file diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/bd/2b32f02abf86a2bb79a12ab09758e44b204b34 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/bd/2b32f02abf86a2bb79a12ab09758e44b204b34 Binary files differnew file mode 100644 index 000000000..abea13842 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/bd/2b32f02abf86a2bb79a12ab09758e44b204b34 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/c0/565d7cfcf1039c969105f2e1c86ca5eff64381 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/c0/565d7cfcf1039c969105f2e1c86ca5eff64381 Binary files differnew file mode 100644 index 000000000..7d88244be --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/c0/565d7cfcf1039c969105f2e1c86ca5eff64381 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/f2/df244fb87b6ba1d2ab484d76c66baba168a867 b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/f2/df244fb87b6ba1d2ab484d76c66baba168a867 Binary files differnew file mode 100644 index 000000000..a8bc1219e --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/objects/f2/df244fb87b6ba1d2ab484d76c66baba168a867 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/master b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..b735e793a --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +691ee9e9d9c654c81214f56c514ff725f46cb9e4 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/other b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/other new file mode 100644 index 000000000..52ac4afa8 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/.git_keep/refs/heads/other @@ -0,0 +1 @@ +f2df244fb87b6ba1d2ab484d76c66baba168a867 diff --git a/test/integration/mergeConflictsResolvedExternally/expected/file b/test/integration/mergeConflictsResolvedExternally/expected/file new file mode 100644 index 000000000..0884a47e0 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/expected/file @@ -0,0 +1 @@ +master2 diff --git a/test/integration/mergeConflictsResolvedExternally/recording.json b/test/integration/mergeConflictsResolvedExternally/recording.json new file mode 100644 index 000000000..21b60ce5a --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":438,"Mod":0,"Key":259,"Ch":0},{"Timestamp":663,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1206,"Mod":0,"Key":256,"Ch":77},{"Timestamp":1487,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2045,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2951,"Mod":0,"Key":256,"Ch":78},{"Timestamp":3606,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4343,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
\ No newline at end of file diff --git a/test/integration/mergeConflictsResolvedExternally/setup.sh b/test/integration/mergeConflictsResolvedExternally/setup.sh new file mode 100644 index 000000000..1e6ecd751 --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/setup.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +cd $1 + +git init +git config user.email "CI@example.com" +git config user.name "CI" + +git checkout -b master + +echo "master1" > file +git add . +git commit -m "master1" + +git checkout -b other + +echo "other1" > file +git add . +git commit -m "other1" + +git checkout master + +echo "master2" > file +git add . +git commit -m "master2" + +git checkout other diff --git a/test/integration/mergeConflictsResolvedExternally/test.json b/test/integration/mergeConflictsResolvedExternally/test.json new file mode 100644 index 000000000..e51abcada --- /dev/null +++ b/test/integration/mergeConflictsResolvedExternally/test.json @@ -0,0 +1,4 @@ +{ + "description": "This test verifies that merge conflicts resolved externally are recognised by lazygit and the user is prompted to continue", + "speed": 10 +} |