Re: [PATCH 1/3] merge-ort: copy a few small helper functions from merge-recursive.c
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 16, 2020, 16:12 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2012161710170.56@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqh7om5z50.fsf@gitster.c.googlers.com>
Hi Junio,
On Tue, 15 Dec 2020, Junio C Hamano wrote:
Show 20 quoted lines
> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > In a subsequent commit, we will implement the traditional recursiveness
> > that gave merge-recursive its name, namely merging non-unique
> > merge-bases to come up with a single virtual merge base. Copy a few
> > helper functions from merge-recursive.c that we will use in the
> > implementation.
> >
> > Signed-off-by: Elijah Newren <newren@gmail.com>
> > ...
> > @@ -1462,5 +1492,7 @@ void merge_incore_recursive(struct merge_options *opt,
> > struct commit *side2,
> > struct merge_result *result)
> > {
> > + (void)reverse_commit_list;
> > + (void)make_virtual_commit;
>
> To keep these symbols referenced? Cute ;-)I saw this technique used extensively in cURL. Note that we ourselves introduced the first such thing in 2fb330ca723 (packed_delete_refs(): implement method, 2017-09-08).
However, we seem to have the `MAYBE_UNUSED` macro specifically for such use cases (and use it in four instances as of time of writing). I wonder whether we want to settle one one strategy instead of keeping both?
Ciao, Dscho
>
> > die("Not yet implemented");
> > }
>