@@ -58,3 +58,58 @@ git init merge-in-the-middle
5858 git checkout with-inner-merge && git merge --no-ff B
5959 echo seq 10 > ' added-after-with-inner-merge' && git add . && git commit -m " on top of inner merge"
6060)
61+
62+ git init cherry-pick-scenario
63+ (cd cherry-pick-scenario
64+ echo " a" > base-f && git add . && git commit -m " base" && git branch base
65+
66+ git checkout -b single-clean-parent
67+ echo " clean" > clean-f && git add . && git commit -m " single-clean-parent"
68+
69+ git checkout -b single-clean-commit
70+ echo " clean-commit" > clean-commit-f && git add . && git commit -m " single-clean-commit"
71+
72+ git checkout -b single-target
73+ git reset --hard base
74+ echo " target" > target-f && git add . && git commit -m " single-target"
75+
76+ git checkout -b single-conflicting-commit
77+ git reset --hard single-clean-parent
78+ echo " conflict" > target-f && git add . && git commit -m " single-conflicting-commit"
79+
80+ git checkout -b second-target
81+ git reset --hard base
82+ echo " target 2" > target-2-f && git add . && git commit -m " second-target"
83+
84+ git checkout -b second-conflicting-target
85+ git reset --hard base
86+ echo " target 2" > target-f && git add . && git commit -m " second-conflicting-target"
87+
88+ git checkout -b second-clean-parent
89+ git reset --hard base
90+ echo " clean 2" > clean-2-f && git add . && git commit -m " second-clean-parent"
91+
92+ git checkout -b merge-clean-commit
93+ git merge single-clean-parent
94+ echo " clean-commit" > clean-commit-f && git add . && git commit -m " merge-clean-commit" --amend
95+
96+ git checkout -b merge-conflicting-commit
97+ rm clean-commit-f && echo " conflict" > target-f && git add . && git commit -m " merge-conflicting-commit" --amend
98+
99+ git checkout -b second-conflicting-parent
100+ git reset --hard base
101+ echo " conflict" > clean-f && git add . && git commit -m " second-conflicting-parent"
102+
103+ git checkout -b merge-clean-commit-conflicting-parents
104+ set +e
105+ git merge single-clean-parent --no-edit
106+ set -e
107+ echo " resolved" > clean-f
108+ git add .
109+ git commit -m " foo"
110+ echo " clean-commit" > clean-commit-f && git add . && git commit -m " merge-clean-commit-conflicting-parents" --amend
111+
112+ git checkout -b base-conflicting
113+ git reset --hard base
114+ echo " conflict" > target-f && git add . && git commit -m " base-conflicting" --amend
115+ )
0 commit comments