"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: merge chokes, creates bogus conflicts Reply-To:
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Sun, 19 Feb 2023 11:38:35 +0100

Download raw body.

Thread
On Sun, Feb 19, 2023 at 09:31:18PM +1100, Mark Jamsek wrote:
> I did look to see if we could do that [seek to the first hunk with added
> lines] and came to the same conclusion; that is, no, we can't do it
> (unless GOT_DIFF_NO_MMAP is defined) so I think we should add hunk
> offsets to the result irrespective of whether the files are mmap'd.

Indeed. The API user could still make use of line-offsets in bytes
even with mapped files. So in the long run we'll want to adjust
the diff API to support this, in any case.

> But I didn't want to mix such changes in with this diff, and then when
> I discovered the couple bugs I just wanted to push this out quickly, so
> I instead added it to my todo list with the other diff API change (i.e.,
> reuse diff_result).

Yes, makes sense.