Skip to content

Commit

Permalink
feat: provide a way to record and apply index changes.
Browse files Browse the repository at this point in the history
These changes will then be applicable to an index that is created
from the written tree editor.
  • Loading branch information
Byron committed Nov 15, 2024
1 parent 465e4b1 commit d4b718b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file modified gix-merge/tests/fixtures/generated-archives/tree-baseline.tar
Binary file not shown.
14 changes: 14 additions & 0 deletions gix-merge/tests/fixtures/tree-baseline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ function baseline () (
git -c merge.conflictStyle=$conflict_style merge-tree -z --write-tree --allow-unrelated-histories "$their_committish" "$our_committish" > "$merge_info" || :
echo "$dir" "$conflict_style" "$their_commit_id" "$their_committish" "$our_commit_id" "$our_committish" "$merge_info" "$maybe_expected_tree" "$opt_deviation_message" >> ../baseline.cases
fi

local index_path=.git/${conflict_style}-${our_committish}-${their_committish}.index
if [ ! -e $index_path ]; then
git checkout -f $our_committish
git merge -m m $their_committish || :
cp .git/index "$index_path"
fi

local index_path=.git/${conflict_style}-${their_committish}-${our_committish}.index
if [ ! -e $index_path ]; then
git checkout -f $their_committish
git merge -m m $our_committish || :
cp .git/index "$index_path"
fi
)

git init simple
Expand Down

0 comments on commit d4b718b

Please sign in to comment.