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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: got diff chomps trailing \r
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 12 May 2023 22:09:43 +0200

Download raw body.

Thread
  • Omar Polo:

    got diff chomps trailing \r

    • Christian Weisgerber:

      got diff chomps trailing \r

  • Omar Polo:
    
    > just for curiosity, have you tried to see how 'got patch' handles
    > this?  I haven't written any test (yet!) for this case.
    
    It couldn't apply the diff.
    
    The problem is that the diff code tries to accommodate both LF and
    CRLF line endings and treat them the same.  In fact, there is still
    code to this effect in diff_atomize_text.c, but I haven't looked
    further.
    
    > Asking because this had made me think about the various pitfalls of
    > different line endings again.  When importing 'got patch' I remember
    > talking with Stefan about this and how subversion handles it.
    
    Subversion is intended to also run on Windows, where CRLF is the
    native format.  I don't think that's a goal for Got.
    
    -- 
    Christian "naddy" Weisgerber                          naddy@mips.inka.de
    
    
  • Omar Polo:

    got diff chomps trailing \r