Re: [PATCH v2 5/7] merge-ll: use read_mmfile() to read external merge results
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 1, 2026, 13:15 UTC
- Message-ID
- <ar5dDe02hgodgOHS@pks.im>
- In-Reply-To
- <20260930234416.GE1347555@coredump.intra.peff.net>
On Wed, Sep 30, 2026 at 07:44:16PM -0400, Jeff King wrote:
Show 15 quoted lines
> After running an external merge driver, ll_ext_merge() reads the result > back from a temporary file. We can do the same thing with much less code > by using read_mmfile(). > > There are also two behavior improvements. > > One, read_mmfile() correctly uses xsize_t() to detect the case when we'd > truncate the result. > > And two, read_mmfile() will report errors to stderr if it can't read the > file (whereas the existing code silently returned NULL). I think most > callers would have said _something_ in this case like "failed to execute > merge" (from merge-ort), but more specifics are probably helpful (e.g., > to distinguish a random system error from a badly configured merge > driver).
Okay. Those code paths would now print two error messages, but that's probably fine.
Patrick