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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: check file status before applying patches (second try)
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 13 Mar 2022 13:21:11 +0100

Download raw body.

Thread
  • Omar Polo:

    check file status before applying patches (second try)

    • Stefan Sperling:

      check file status before applying patches (second try)

  • On Sun, Mar 13, 2022 at 12:53:31PM +0100, Omar Polo wrote:
    > Stefan Sperling <stsp@stsp.name> wrote:
    > > >  	if (p->old != NULL && p->new == NULL) {
    > > >  		/*
    > > >  		 * special case: delete a file.  don't try to match
    > > >  		 * the lines but just schedule the removal.
    > > >  		 */
    > > 
    > > In the long term, this code should try to match the lines.
    > > If lines don't match then we are deleting "with fuzz", which
    > > might not be what the user wants. It should at least result in a
    > > warning or fuzz factor or similar appearing in progress output.
    > 
    > I was posticipating that, but at least for the deletion case the fuzzy
    > is easy to implement so why posticipate at all?  here's a draft of how
    > it would work, with a test case even :)
    > 
    > (i'm not sure if/how to document that.  could we keep it a secret until
    > i manage to implement a real fuzzy for all cases?)
    
    Maybe keep it simple and require an exact match, for now?
    
    We could add fuzzing later and think more about how a fuzz factor for
    deleted files should work in combination with other cases.
    
    
    
  • Omar Polo:

    check file status before applying patches (second try)