Bug 221338

Summary: patch(1) overwrites Oops.rej if multiple non-existent files
Product: Base System Reporter: Ed Maste <emaste>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: cem
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Ed Maste freebsd_committer freebsd_triage 2017-08-08 17:32:52 UTC
It seems patch writes rejected hunks to Oops.rej if the source file(path?) does not exist; if this is true for multiple files in the patch Oops.rej is overwritten with each successive one.

Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: source/Plugins/Platform/Linux/PlatformLinux.h
|===================================================================
|--- source/Plugins/Platform/Linux/PlatformLinux.h
|+++ source/Plugins/Platform/Linux/PlatformLinux.h
--------------------------
File to patch: 
No file found--skip this patch? [n] y
Skipping patch...
Hunk #1 ignored at 59.
1 out of 1 hunks ignored--saving rejects to Oops.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
|===================================================================
|--- source/Plugins/Platform/Linux/PlatformLinux.cpp
|+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
--------------------------
File to patch: 
No file found--skip this patch? [n] y
Skipping patch...
Hunk #1 ignored at 390.
Hunk #2 ignored at 408.
2 out of 2 hunks ignored--saving rejects to Oops.rej