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
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:
   
   
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 correabuscar (Voted in favor of this item)
  • -email is unavailable- added by ericb (Submitted the item)
  •  

    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.

     

    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.13-54b4.
    Corresponding source code