Subject: Re: [PATCH v4] submodule merge: update conflict error message

From: Junio C Hamano <[email-masked]>
Date: Fri, 15 Jul 2022 23:22:38 -0700

Johannes Schindelin <[email-masked]> writes:

>> +test_expect_success 'merging should conflict for non fast-forward' '
>> +	(cd merge-search &&
>> +	 git checkout -b test-nonforward-a b &&
>> +	  if test "$GIT_TEST_MERGE_ALGORITHM" = ort
>> +	  then
>> +		test_must_fail git merge c >actual
>> +	  else
>> +		test_must_fail git merge c 2> actual
>> +	  fi &&
>> +	 sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" &&
>> +	 grep "$sub_expect" actual &&
>
> No matter how hard I tried to stare at the code, no matter whether I
> looked at `cw/submodule-merge-messages` or `seen`, I cannot see how this
> `grep` could ever succeed when `GIT_TEST_MERGE_ALGORITHM=recursive`: only
> the `ort` code has been taught this new trick.

Indeed.  https://github.com/git/git/runs/7366982085 is how it failed
in 'seen'.

Thanks for helping Calvin.