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

From:
Tom Jones <thj@freebsd.org>
Subject:
Re: diff.git: Fix ed script output
To:
gameoftrees@openbsd.org
Date:
Fri, 2 Sep 2022 09:48:18 +0100

Download raw body.

Thread
  • Stefan Sperling:

    diff.git: Fix ed script output

  • On Fri, Sep 02, 2022 at 10:43:15AM +0200, Stefan Sperling wrote:
    > On Wed, Aug 31, 2022 at 01:24:44PM +0100, Tom Jones wrote:
    > > I have looked into this. getchange in diff3.c takes any line that starts
    > > with an integer and treats it as a hunk header. 
    > > 
    > > The current diff_output_edscript.c is creating valid classic diff
    > > headers rather than ed edits. This seems to mean that while the edscript
    > > output works, it is isn't correct just in the way that diff3 wants.
    > > 
    > > I have substituted in the updated diff_output_plain.c from yesterday and
    > > am able to pass got's `make regress`.
    > > 
    > > For this case there is an optimisation where diff_output_plain only
    > > generates the headers for a hunk, but I'll leave that path for future
    > > hackers.
    > > 
    > > Follows is a diff with the changes I made to got, they are minimal
    > > beyond copying over the updated diff_output_plain.c
    > 
    > Thanks for digging into this. I've committed your changes to got.git.
    > 
    > A hunk-header-only option for plain mode would be nice to have, it
    > should speed up merges of large files.
    > 
    > Is your previously proposed ed-script diff for diff.git still valid?
    > Or will it need to be updated?
    
    It is still correct, the changes to the diff stuff was on the got side
    this time.
    
    Thanks
    
    - Tom
    
    
  • Stefan Sperling:

    diff.git: Fix ed script output