diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-15 06:47:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-15 06:47:59 +0200 |
commit | 280bd445515acffb83231dfee79c21719ad3bc7b (patch) | |
tree | 170dbd8e836c6111200970d172743a531f5e7387 /t/t3030-merge-recursive.sh | |
parent | Eighth batch (diff) | |
parent | merge-recursive: fix the fix to the diff3 common ancestor label (diff) | |
download | git-280bd445515acffb83231dfee79c21719ad3bc7b.tar.xz git-280bd445515acffb83231dfee79c21719ad3bc7b.zip |
Merge branch 'en/merge-recursive-cleanup'
The merge-recursive machiery is one of the most complex parts of
the system that accumulated cruft over time. This large series
cleans up the implementation quite a bit.
* en/merge-recursive-cleanup: (26 commits)
merge-recursive: fix the fix to the diff3 common ancestor label
merge-recursive: fix the diff3 common ancestor label for virtual commits
merge-recursive: alphabetize include list
merge-recursive: add sanity checks for relevant merge_options
merge-recursive: rename MERGE_RECURSIVE_* to MERGE_VARIANT_*
merge-recursive: split internal fields into a separate struct
merge-recursive: avoid losing output and leaking memory holding that output
merge-recursive: comment and reorder the merge_options fields
merge-recursive: consolidate unnecessary fields in merge_options
merge-recursive: move some definitions around to clean up the header
merge-recursive: rename merge_options argument to opt in header
merge-recursive: rename 'mrtree' to 'result_tree', for clarity
merge-recursive: use common name for ancestors/common/base_list
merge-recursive: fix some overly long lines
cache-tree: share code between functions writing an index as a tree
merge-recursive: don't force external callers to do our logging
merge-recursive: remove useless parameter in merge_trees()
merge-recursive: exit early if index != head
Ensure index matches head before invoking merge machinery, round N
merge-recursive: remove another implicit dependency on the_repository
...
Diffstat (limited to 't/t3030-merge-recursive.sh')
-rwxr-xr-x | t/t3030-merge-recursive.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh index faa8892741..2170758e38 100755 --- a/t/t3030-merge-recursive.sh +++ b/t/t3030-merge-recursive.sh @@ -695,15 +695,22 @@ test_expect_success 'merging with triple rename across D/F conflict' ' test_expect_success 'merge-recursive remembers the names of all base trees' ' git reset --hard HEAD && + # make the index match $c1 so that merge-recursive below does not + # fail early + git diff --binary HEAD $c1 -- | git apply --cached && + # more trees than static slots used by oid_to_hex() for commit in $c0 $c2 $c4 $c5 $c6 $c7 do git rev-parse "$commit^{tree}" done >trees && - # ignore the return code -- it only fails because the input is weird + # ignore the return code; it only fails because the input is weird... test_must_fail git -c merge.verbosity=5 merge-recursive $(cat trees) -- $c1 $c3 >out && + # ...but make sure it fails in the expected way + test_i18ngrep CONFLICT.*rename/rename out && + # merge-recursive prints in reverse order, but we do not care sort <trees >expect && sed -n "s/^virtual //p" out | sort >actual && |