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