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
Votes: 1
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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

See original thread at: https://lists.gnu ... -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>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by correabuscar (Voted in favor of this item)
  • -email is unavailable- added by ericb (Submitted the item)
  •  

    Votes

    There is 1 vote 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.

     

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-07-04 correabuscar Carbon-Copy- Added correabuscar

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code