From: Tanga Joris Date: Thu, 19 Nov 2026 23:50:40 GMT Subject: Re: [PATCH 3/3] xdiff: drop LONG_MAX check on merge result size Message-ID: In-Reply-To: <20261117174353.1158905-8-christian.couder@gmail.com> Hello Christian, Great work with the series. On Tue, 17 Nov 2026 at 20:46, Christian Couder wrote: > Let's then get rid of this `size > LONG_MAX` check and allow sizes as > big as `size_t` allows, so that merges with results over 2 GiB no > longer fail on 64-bit Windows. I ran t4300 with GIT_TEST_LONG=1 on a Windows server runner on GitHub Actions, as you requested in the cover letter: https://github.com/tmjoris/git/actions/runs/44423166965 On e1ec09b23c, the two big merge tests are skipped, because long is 32 bits there. "merge-tree dies when merge buffer size does not fit long" passes. With the series on top, both big merge tests pass. I also ran it natively on a Windows laptop with the Git SDK, and got similar results. I went through the other callers of ll_merge() and xdl_merge(), to see if any of them still pass the result through an unsigned long. They all end up in odb_write_object(), write_buf_to_worktree(), strbuf_attach() or fwrite(), which all take a size_t with this series. So I agree the check is not needed anymore. Looks good to me. Thanks, Tanga