Skip to content

Commit d4b718b

Browse files
committed
feat: provide a way to record and apply index changes.
These changes will then be applicable to an index that is created from the written tree editor.
1 parent 465e4b1 commit d4b718b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Binary file not shown.

gix-merge/tests/fixtures/tree-baseline.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@ function baseline () (
6666
git -c merge.conflictStyle=$conflict_style merge-tree -z --write-tree --allow-unrelated-histories "$their_committish" "$our_committish" > "$merge_info" || :
6767
echo "$dir" "$conflict_style" "$their_commit_id" "$their_committish" "$our_commit_id" "$our_committish" "$merge_info" "$maybe_expected_tree" "$opt_deviation_message" >> ../baseline.cases
6868
fi
69+
70+
local index_path=.git/${conflict_style}-${our_committish}-${their_committish}.index
71+
if [ ! -e $index_path ]; then
72+
git checkout -f $our_committish
73+
git merge -m m $their_committish || :
74+
cp .git/index "$index_path"
75+
fi
76+
77+
local index_path=.git/${conflict_style}-${their_committish}-${our_committish}.index
78+
if [ ! -e $index_path ]; then
79+
git checkout -f $their_committish
80+
git merge -m m $our_committish || :
81+
cp .git/index "$index_path"
82+
fi
6983
)
7084

7185
git init simple

0 commit comments

Comments
 (0)