Re: [PATCH 4/7] merge-ort: capture and print ll-merge warnings in our preferred fashion
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-10-01 07:24:04
On Thu, Sep 30 2021, Elijah Newren wrote:
On Thu, Sep 30, 2021 at 9:53 AM Ævar Arnfjörð Bjarmason [off-list ref] wrote:quoted
On Tue, Aug 31 2021, Elijah Newren via GitGitGadget wrote:quoted
@@ -108,8 +108,14 @@ test_expect_success 'refuse to merge binary files' ' printf "\0\0" >binary-file && git add binary-file && git commit -m binary2 && - test_must_fail git merge F >merge.out 2>merge.err && - grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.err + if test "$GIT_TEST_MERGE_ALGORITHM" = ort + then + test_must_fail git merge F >merge.out && + grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.out + else + test_must_fail git merge F >merge.out 2>merge.err && + grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.err + fi 'To save readers from eyeballing if a single character has changed here, which I don't think it has, just do: if ... then cmd >actual else other cmd >actualDo you mean other cmd >/dev/null 2>actual ?
Yes, sorry. I was going for lazy pseudocode. I meant maybe the "grep" can be shared between the two.