diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-05 16:39:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-05 22:15:51 +1000 |
commit | fb395bca6eedfc44afb04ad26005a45e7b7dfea9 (patch) | |
tree | 4669caf828ea97afdb9c829820ff53c5731fcca2 /test | |
parent | f91adf026bfbddc9505d6d84d3fabc80d49c7ca0 (diff) |
support reverting merge commits
Diffstat (limited to 'test')
38 files changed, 96 insertions, 0 deletions
diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/COMMIT_EDITMSG b/test/integration/mergeConflictRevert/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +test diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/FETCH_HEAD b/test/integration/mergeConflictRevert/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/FETCH_HEAD diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/HEAD b/test/integration/mergeConflictRevert/expected/.git_keep/HEAD new file mode 100644 index 000000000..0ca960536 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/other diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/ORIG_HEAD b/test/integration/mergeConflictRevert/expected/.git_keep/ORIG_HEAD new file mode 100644 index 000000000..bf57b6527 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/ORIG_HEAD @@ -0,0 +1 @@ +e5265503c8aea2860fc4754c1025e4597530ce0e diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/config b/test/integration/mergeConflictRevert/expected/.git_keep/config new file mode 100644 index 000000000..8ae104545 --- /dev/null +++ b/test/integration/mergeConflictRevert/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/mergeConflictRevert/expected/.git_keep/description b/test/integration/mergeConflictRevert/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/index b/test/integration/mergeConflictRevert/expected/.git_keep/index Binary files differnew file mode 100644 index 000000000..7b55ac988 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/index diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/info/exclude b/test/integration/mergeConflictRevert/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/mergeConflictRevert/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/mergeConflictRevert/expected/.git_keep/logs/HEAD b/test/integration/mergeConflictRevert/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..d2c3533b1 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/logs/HEAD @@ -0,0 +1,12 @@ +0000000000000000000000000000000000000000 d3b35176a575d48743900b1f0863cefbc198f84c CI <CI@example.com> 1622875852 +1000 commit (initial): test 1 +d3b35176a575d48743900b1f0863cefbc198f84c d3b35176a575d48743900b1f0863cefbc198f84c CI <CI@example.com> 1622875853 +1000 checkout: moving from master to other +d3b35176a575d48743900b1f0863cefbc198f84c 3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 CI <CI@example.com> 1622875853 +1000 commit: test 2 +3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 CI <CI@example.com> 1622875853 +1000 checkout: moving from other to another +3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 1e7d643e0db24ebee10f92aa2f8099d50dbe0f0f CI <CI@example.com> 1622875853 +1000 commit: test 3 +1e7d643e0db24ebee10f92aa2f8099d50dbe0f0f 3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 CI <CI@example.com> 1622875853 +1000 checkout: moving from another to other +3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 fa0b6bf64815f57729716334319596c926b6564a CI <CI@example.com> 1622875853 +1000 commit: test 4 +fa0b6bf64815f57729716334319596c926b6564a ba4581dc53b5b2ff56803651dfd79245203d546b CI <CI@example.com> 1622875853 +1000 merge another: Merge made by the 'recursive' strategy. +ba4581dc53b5b2ff56803651dfd79245203d546b a4942a576eec3a1a15fb790c942b6860331bee32 CI <CI@example.com> 1622875853 +1000 commit: test 5 +a4942a576eec3a1a15fb790c942b6860331bee32 e5265503c8aea2860fc4754c1025e4597530ce0e CI <CI@example.com> 1622875856 +1000 revert: Revert "Merge branch 'another' into other" +e5265503c8aea2860fc4754c1025e4597530ce0e a4942a576eec3a1a15fb790c942b6860331bee32 CI <CI@example.com> 1622875860 +1000 reset: moving to a4942a576eec3a1a15fb790c942b6860331bee32 +a4942a576eec3a1a15fb790c942b6860331bee32 ddad764e9e78b555cd41e5e81f8ce969cfa3972c CI <CI@example.com> 1622875862 +1000 commit: test diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/another b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/another new file mode 100644 index 000000000..0c750bad0 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/another @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 CI <CI@example.com> 1622875853 +1000 branch: Created from HEAD +3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 1e7d643e0db24ebee10f92aa2f8099d50dbe0f0f CI <CI@example.com> 1622875853 +1000 commit: test 3 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/master b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..63a4baf99 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 d3b35176a575d48743900b1f0863cefbc198f84c CI <CI@example.com> 1622875852 +1000 commit (initial): test 1 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/other b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/other new file mode 100644 index 000000000..3d3e05626 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/logs/refs/heads/other @@ -0,0 +1,8 @@ +0000000000000000000000000000000000000000 d3b35176a575d48743900b1f0863cefbc198f84c CI <CI@example.com> 1622875853 +1000 branch: Created from HEAD +d3b35176a575d48743900b1f0863cefbc198f84c 3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 CI <CI@example.com> 1622875853 +1000 commit: test 2 +3c3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 fa0b6bf64815f57729716334319596c926b6564a CI <CI@example.com> 1622875853 +1000 commit: test 4 +fa0b6bf64815f57729716334319596c926b6564a ba4581dc53b5b2ff56803651dfd79245203d546b CI <CI@example.com> 1622875853 +1000 merge another: Merge made by the 'recursive' strategy. +ba4581dc53b5b2ff56803651dfd79245203d546b a4942a576eec3a1a15fb790c942b6860331bee32 CI <CI@example.com> 1622875853 +1000 commit: test 5 +a4942a576eec3a1a15fb790c942b6860331bee32 e5265503c8aea2860fc4754c1025e4597530ce0e CI <CI@example.com> 1622875856 +1000 revert: Revert "Merge branch 'another' into other" +e5265503c8aea2860fc4754c1025e4597530ce0e a4942a576eec3a1a15fb790c942b6860331bee32 CI <CI@example.com> 1622875860 +1000 reset: moving to a4942a576eec3a1a15fb790c942b6860331bee32 +a4942a576eec3a1a15fb790c942b6860331bee32 ddad764e9e78b555cd41e5e81f8ce969cfa3972c CI <CI@example.com> 1622875862 +1000 commit: test diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/1e/7d643e0db24ebee10f92aa2f8099d50dbe0f0f b/test/integration/mergeConflictRevert/expected/.git_keep/objects/1e/7d643e0db24ebee10f92aa2f8099d50dbe0f0f Binary files differnew file mode 100644 index 000000000..9bc4b492b --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/1e/7d643e0db24ebee10f92aa2f8099d50dbe0f0f diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/3c/3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/3c/3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 Binary files differnew file mode 100644 index 000000000..94a4067b7 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/3c/3594b2fd655fb7ffe36077ee8a9c3f79fb5fc6 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/41/bed9f222cc54e68d7846dc010bea6d23bea33e b/test/integration/mergeConflictRevert/expected/.git_keep/objects/41/bed9f222cc54e68d7846dc010bea6d23bea33e Binary files differnew file mode 100644 index 000000000..823da94ec --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/41/bed9f222cc54e68d7846dc010bea6d23bea33e diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/61/3e54e7fd6e080d53ef44c18ecd33c545ac0e08 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/61/3e54e7fd6e080d53ef44c18ecd33c545ac0e08 Binary files differnew file mode 100644 index 000000000..82182cab4 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/61/3e54e7fd6e080d53ef44c18ecd33c545ac0e08 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/89/8618af3fef6edf472d0f4a483ed8010d7bcfbb b/test/integration/mergeConflictRevert/expected/.git_keep/objects/89/8618af3fef6edf472d0f4a483ed8010d7bcfbb Binary files differnew file mode 100644 index 000000000..3f22e7000 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/89/8618af3fef6edf472d0f4a483ed8010d7bcfbb diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/98/f656b294e5f3b447e3fd66814a80d0d4080627 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/98/f656b294e5f3b447e3fd66814a80d0d4080627 Binary files differnew file mode 100644 index 000000000..ea393ce6b --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/98/f656b294e5f3b447e3fd66814a80d0d4080627 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 Binary files differnew file mode 100644 index 000000000..4667dcf6f --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/9d/aeafb9864cf43055ae93beb0afd6c7d144bfa4 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/a4/942a576eec3a1a15fb790c942b6860331bee32 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/a4/942a576eec3a1a15fb790c942b6860331bee32 new file mode 100644 index 000000000..4af7a4f8b --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/a4/942a576eec3a1a15fb790c942b6860331bee32 @@ -0,0 +1,2 @@ +xK +1]әDWst҃q17GpEQ`;]DY&/cIe(`f*R - yhka',,#:϶.5$UA?p|m{ꩬ-"Aǩ)9
\ No newline at end of file diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/a7/fd052c52f174943cdea637f2d11f5ab7d090cd b/test/integration/mergeConflictRevert/expected/.git_keep/objects/a7/fd052c52f174943cdea637f2d11f5ab7d090cd Binary files differnew file mode 100644 index 000000000..54af6d3b3 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/a7/fd052c52f174943cdea637f2d11f5ab7d090cd diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/ba/4581dc53b5b2ff56803651dfd79245203d546b b/test/integration/mergeConflictRevert/expected/.git_keep/objects/ba/4581dc53b5b2ff56803651dfd79245203d546b Binary files differnew file mode 100644 index 000000000..f2995f300 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/ba/4581dc53b5b2ff56803651dfd79245203d546b diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/be/5b46b808c9c808be26710daeb2ce9ed2c7a070 b/test/integration/mergeConflictRevert/expected/.git_keep/objects/be/5b46b808c9c808be26710daeb2ce9ed2c7a070 Binary files differnew file mode 100644 index 000000000..5a34d287e --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/be/5b46b808c9c808be26710daeb2ce9ed2c7a070 diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/c5/af43f6cc1d51ebb3ab4800347595541f81799c b/test/integration/mergeConflictRevert/expected/.git_keep/objects/c5/af43f6cc1d51ebb3ab4800347595541f81799c Binary files differnew file mode 100644 index 000000000..a11ab4a6c --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/c5/af43f6cc1d51ebb3ab4800347595541f81799c diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/d3/b35176a575d48743900b1f0863cefbc198f84c b/test/integration/mergeConflictRevert/expected/.git_keep/objects/d3/b35176a575d48743900b1f0863cefbc198f84c Binary files differnew file mode 100644 index 000000000..a2cdf6ec8 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/d3/b35176a575d48743900b1f0863cefbc198f84c diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/dd/ad764e9e78b555cd41e5e81f8ce969cfa3972c b/test/integration/mergeConflictRevert/expected/.git_keep/objects/dd/ad764e9e78b555cd41e5e81f8ce969cfa3972c new file mode 100644 index 000000000..2d746cac5 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/dd/ad764e9e78b555cd41e5e81f8ce969cfa3972c @@ -0,0 +1,2 @@ +xM +1@a=E$mf5Hcuw-,?łZ!n(7Bs
D(`˘Ja9RTHk9XU3el|/'Ybt.'#ugn8
\ No newline at end of file diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/e5/265503c8aea2860fc4754c1025e4597530ce0e b/test/integration/mergeConflictRevert/expected/.git_keep/objects/e5/265503c8aea2860fc4754c1025e4597530ce0e new file mode 100644 index 000000000..cde3bd747 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/e5/265503c8aea2860fc4754c1025e4597530ce0e @@ -0,0 +1 @@ +xPj0Y_CKkWR)^J`%bCmY-zy1e穃#Л]R̀Frv} ћMH7Y:O2)
9$]v6S$"*|U~x}ʩ6HhjgQ])W-MU 7^G^>J;´8m
h.c"EPG݀ӟq*#/W`A`ϯ3J>`6Cyg&*R&$'l'
\ No newline at end of file diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/objects/fa/0b6bf64815f57729716334319596c926b6564a b/test/integration/mergeConflictRevert/expected/.git_keep/objects/fa/0b6bf64815f57729716334319596c926b6564a Binary files differnew file mode 100644 index 000000000..a6bc9c709 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/objects/fa/0b6bf64815f57729716334319596c926b6564a diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/another b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/another new file mode 100644 index 000000000..24e534ce9 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/another @@ -0,0 +1 @@ +1e7d643e0db24ebee10f92aa2f8099d50dbe0f0f diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/master b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..249ffa1c2 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +d3b35176a575d48743900b1f0863cefbc198f84c diff --git a/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/other b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/other new file mode 100644 index 000000000..b22b268a7 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/.git_keep/refs/heads/other @@ -0,0 +1 @@ +ddad764e9e78b555cd41e5e81f8ce969cfa3972c diff --git a/test/integration/mergeConflictRevert/expected/file1 b/test/integration/mergeConflictRevert/expected/file1 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/file1 @@ -0,0 +1 @@ +test diff --git a/test/integration/mergeConflictRevert/expected/file2 b/test/integration/mergeConflictRevert/expected/file2 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/file2 @@ -0,0 +1 @@ +test diff --git a/test/integration/mergeConflictRevert/expected/file4 b/test/integration/mergeConflictRevert/expected/file4 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/file4 @@ -0,0 +1 @@ +test diff --git a/test/integration/mergeConflictRevert/expected/file5 b/test/integration/mergeConflictRevert/expected/file5 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/mergeConflictRevert/expected/file5 @@ -0,0 +1 @@ +test diff --git a/test/integration/mergeConflictRevert/recording.json b/test/integration/mergeConflictRevert/recording.json new file mode 100644 index 000000000..bbb4056aa --- /dev/null +++ b/test/integration/mergeConflictRevert/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1730,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2002,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2305,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2968,"Mod":0,"Key":256,"Ch":116},{"Timestamp":3402,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3985,"Mod":0,"Key":257,"Ch":0},{"Timestamp":4304,"Mod":0,"Key":257,"Ch":0},{"Timestamp":5850,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6785,"Mod":0,"Key":256,"Ch":103},{"Timestamp":7441,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7978,"Mod":0,"Key":260,"Ch":0},{"Timestamp":8304,"Mod":0,"Key":260,"Ch":0},{"Timestamp":8585,"Mod":0,"Key":256,"Ch":99},{"Timestamp":8816,"Mod":0,"Key":256,"Ch":116},{"Timestamp":8873,"Mod":0,"Key":256,"Ch":101},{"Timestamp":9041,"Mod":0,"Key":256,"Ch":115},{"Timestamp":9081,"Mod":0,"Key":256,"Ch":116},{"Timestamp":9416,"Mod":0,"Key":13,"Ch":13},{"Timestamp":11041,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":135,"Height":74}]}
\ No newline at end of file diff --git a/test/integration/mergeConflictRevert/setup.sh b/test/integration/mergeConflictRevert/setup.sh new file mode 100644 index 000000000..4618aa37c --- /dev/null +++ b/test/integration/mergeConflictRevert/setup.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +cd $1 + +git init +git config user.email "CI@example.com" +git config user.name "CI" + +git checkout -b master + +echo "test" > file1 +git add . +git commit -m "test 1" + +git checkout -b other + +echo "test" > file2 +git add . +git commit -m "test 2" + +git checkout -b another + +echo "test" > file3 +git add . +git commit -m "test 3" + +git checkout other + +echo "test" > file4 +git add . +git commit -m "test 4" + +git merge another + +echo "test" > file5 +git add . +git commit -m "test 5" + diff --git a/test/integration/mergeConflictRevert/test.json b/test/integration/mergeConflictRevert/test.json new file mode 100644 index 000000000..d6ccd0d39 --- /dev/null +++ b/test/integration/mergeConflictRevert/test.json @@ -0,0 +1 @@ +{ "description": "In this test we revert a merge conflict, choosing which parent we want to retain... or something like that. We need to rename the newly created commit so that we don't fail on the snapshot comparison", "speed": 10 } |