bugGNU patch - Bugs: bug #62905, patch skips remaining hunks when...

 
 

bug #62905: patch skips remaining hunks when hunk line counts one less than lines in hunk

Submitter:  None
Submitted:  Tue 16 Aug 2022 07:20:51 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)
   

Comment Type & Canned Response:
       No canned response available

 

Tue 16 Aug 2022 07:20:51 PM UTC, original submission:  

rebasing Cygwin patches for new coreutils release

managed to get one hunk with line counts

@@ ...,7 ...,11 ...

one less than hunk size -- counts should have been

@@ ...,8 ...,12 ...

patch silently ignores the remaining line and the remaining hunks in the patch file

would be desirable to have an end of hunk line count and/or hunk @@ flag check and error message, as it looked like the patch worked okay, and the package regressions passed, but specific operations failed

reproduce bug with attached files and run:

        $ patch -b -p2 < coreutils-9.1-bad-src-copy.c.patch
        patching file copy.c
        Hunk #7 succeeded at 2328 with fuzz 2.

hunks 8 and 9 are ignored and not applied

I realize this may have been due to manual tweaking after original patch generation with diff, and patch tries to allow operation with arbitrary content, which may make this request difficult

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53570:  coreutils-9.1-src-copy.c-bad-hunk-7.patch added by None (6KiB - text/plain - attached patch file and source file to reproduce bug)
file #53571:  copy.c added by None (113KiB - application/octet-stream - attached patch file and source file to reproduce bug)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2022-08-16 None Attached File- Added coreutils-9.1-src-copy.c-bad-hunk-7.patch, #53570
    Attached File- Added copy.c, #53571

Back to the top


Powered by Savane 3.9