Re: [PATCH v2 7/8] merge-tree: support saving merge messages to a separate file
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 7, 2022, 18:07 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2201071906050.339@tvgsbejvaqbjf.bet>
- In-Reply-To
- <4b513a6d696b8e6ff2c1b669059fcd8747bfa10d.1641403655.git.gitgitgadget@gmail.com>
Hi Elijah,
On Wed, 5 Jan 2022, Elijah Newren via GitGitGadget wrote:
Show 10 quoted lines
> diff --git a/t/t4301-merge-tree-real.sh b/t/t4301-merge-tree-real.sh > index f7aa310f8c1..5f3f27f504d 100755 > --- a/t/t4301-merge-tree-real.sh > +++ b/t/t4301-merge-tree-real.sh > @@ -78,4 +78,22 @@ test_expect_success 'Barf on too many arguments' ' > grep "^usage: git merge-tree" expect > ' > > +test_expect_success '--messages gives us the conflict notices and such' ' > + test_must_fail git merge-tree --real --messages=MSG_FILE side1 side2 &&
Since we discern between exit status 1 (= merge conflict) and >1 (fatal error), we should probably use `test_expect_code` here.
Other than that, this patch looks good.
Thank you, Dscho
Show 21 quoted lines
> + > + # Expected results: > + # "greeting" should merge with conflicts > + # "numbers" should merge cleanly > + # "whatever" has *both* a modify/delete and a file/directory conflict > + cat <<-EOF >expect && > + Auto-merging greeting > + CONFLICT (content): Merge conflict in greeting > + Auto-merging numbers > + CONFLICT (file/directory): directory in the way of whatever from side1; moving it to whatever~side1 instead. > + CONFLICT (modify/delete): whatever~side1 deleted in side2 and modified in side1. Version side1 of whatever~side1 left in tree. > + EOF > + > + test_cmp expect MSG_FILE > +' > + > test_done > -- > gitgitgadget > >