bugGNU patch - Bugs: bug #34031, patch should have a mode for...

 
 

bug #34031: patch should have a mode for rejecting patches that require offsets

Submitted by:  Eric Blake <ericb>
Submitted on:  Tue 16 Aug 2011 11:08:22 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 16 Aug 2011 11:08:22 PM UTC, original submission:

See original thread at: https://lists.gnu.org/archive/html/bug-patch/2011-08/msg00004.html

Short summary - there are some contexts, like RPM spec files, where patch series are supposed to be perfect (no offsets). I encountered a case of an ambiguous patch with 3 lines of context (it took 6 lines of context before the patch became unambiguous), and when generated against the wrong version of the file, the patch was silently applied by 'patch -s --fuzz=0' even though patch had to guess at which ambiguous point to apply the patch. Worse, 'git apply' picked a different point than 'patch', rendering the rpc broken but only according to which tool chain applied the patch series. That is, --fuzz=0 didn't reject the patch, and -s hid the message, making the problem undetectable.

If there were an option to reject patch offsets, the rpm would have been identified as broken up front, and the broken patch in the series fixed to list the right offsets for a 0-offset application. Of course, the option should not be default (offsets are a very useful feature when applying patches from disparate points in time), but clients like rpm patch series would benefit from it.

Eric Blake <ericb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup