bugGNU patch - Bugs: bug #44494, Damaged patch gives unexpected...

 
 

bug #44494: Damaged patch gives unexpected output

Submitted by:  Tim Waugh <twaugh>
Submitted on:  Mon 09 Mar 2015 05:29:37 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 10 Mar 2015 01:23:54 PM UTC, comment #3:

Good, I've already pushed the fix, thanks.

Andreas Gruenbacher <agruen>
Project Administrator
Tue 10 Mar 2015 11:30:25 AM UTC, comment #2:

Looks good to me.

Tim Waugh <twaugh>
Project Member
Mon 09 Mar 2015 07:06:30 PM UTC, comment #1:

Here's a fix. We still accept non-unified diffs after a "git --diff" line which git will never produce; if we set diff_type to UNI_DIFF there as well, we would only accept unified diffs anymore.

(file #33302)

Andreas Gruenbacher <agruen>
Project Administrator
Mon 09 Mar 2015 05:29:37 PM UTC, original submission:

Here is how to run the test case:

echo a > test
patch -i test.patch || echo Status: $?
cat test

The output is:

patching file test
a

but I'd expect either a non-zero exit code, or not to see 'patching file test'.

Original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1083407

Tim Waugh <twaugh>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #33302:  header.diff added by agruen (313B - text/x-patch)
file #33300:  test.patch added by twaugh (73B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by agruen (Updated the item)
  • -unavailable- added by twaugh (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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Mar 2015 01:23:54 PM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 09 Mar 2015 07:06:30 PM UTCagruenAttached File-=>Added header.diff, #33302
    Mon 09 Mar 2015 05:29:37 PM UTCtwaughAttached File-=>Added test.patch, #33300

    Back to the top


    Powered by Savane 3.1-cleanup1