bugGNU patch - Bugs: bug #34032, feature request: use @@ context...


bug #34032: feature request: use @@ context when determining offset

Submitter:  Eric Blake <ericb>
Submitted:  Tue 16 Aug 2011 11:11:44 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

Tue 16 Aug 2011 11:11:44 PM UTC, original submission:  

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

Short summary - I encountered a case of an ambiguous patch generated with diff -p and containing 3 lines of context (the patch needed 6 lines before it became unambiguous), and where the patch file did not list the right line compared to the version of the file I was patching.

When passed through patch, the offset chosen was the minimal offset (the closest location that matched the context), even though this was NOT the function labeled in the @@ hunk header.  When passed through 'git am', the offset chosen was further away from the line number in the patch, but happened to match the function name in the @@ header.

Patch should be taught how to use any and all information in the @@ header as part of its disambiguation algorithm when determining an offset to apply to a context patch.

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.13-9c15.
    Corresponding source code