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

 
 

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

Submitted by:  Eric Blake <ericb>
Submitted on:  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

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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

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)
  •  

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

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3