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


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

Submitter:  Eric Blake <ericb>
Submitted:  Tue 16 Aug 2011 11:08:22 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    No changes have been made to this item

    Back to the top

    Powered by Savane 3.10