Subject: Re: [PATCH 0/3] Makefile update libgit.a: Include xdiff and reftable in libgit.a

From: Junio C Hamano <[email-masked]>
Date: Wed, 01 Oct 2025 16:32:08 -0700

"Ezekiel Newren via GitGitGadget" <[email-masked]> writes:

> The Rust compiler only needs to know how to link against libgit.a in 2 cases
> that I can think of:
>
>  * Rust unit tests
>  * Rust defining the main function
>
> Otherwise Rust can be compiled without linking, and then Makefile and Meson
> can use Cargo's produced static lib files to build Git.

It is a bit unclear why two (or three) are so much more hassle than
one, but OK.  Allowing both build systems to agree on the same set
of artifacts is very much desirable, and if meson based build rolls
everythning into a single library archive, the the other one should
do the same.

Of course we could run "ar" ourselves and combine the three into a
single library archive, but as an approach, what you have here is a
perfectly fine, and more preferrable, way to achieve the goal of
ending up with a single archive file.

This topic, however, especially its first step, had caused rather
unpleasant textual conflicts when merged to 'seen' (I didn't check
which other topic was the most heavily conflicting, though).  I may
attempt to get a clean merge again tomorrow, but due to time
pressure, tonight's 'seen' was done without these patches merged.

Thanks.