patchutils icon indicating copy to clipboard operation
patchutils copied to clipboard

combinediff is setting incorrect paths to files

Open Roo4L opened this issue 2 years ago • 4 comments

Hi! I've face a bug during execution of combinediff. Let's say I have following first and second patch files: first.patch

--- a/file.c
+++ b/file.c
@@ -0,0 +1,3 @@
+a
+b
+c

second.patch

--- a/file.c
+++ b/file.c
@@ -1,3 +1,2 @@
 a
 b
-c

After executing combinediff -p1 first.patch second.patch I get the following output:

diff -u b/file.c b/file.c
--- b/file.c
+++ b/file.c
@@ -0,0 +1,2 @@
+a
+b

As you see, the path to the first file is b instead of a. I understand that it doesn't affect patch applying, but it breaks the convention used by almost all package vendors. Hope you would have a chance to fix it. Thanks in advance!

Roo4L avatar Jul 07 '22 06:07 Roo4L

I have seen this as well!

samatcodeapprove avatar Feb 01 '23 06:02 samatcodeapprove

@Roo4L I think have a fix here: https://github.com/twaugh/patchutils/pull/56

samatcodeapprove avatar Feb 02 '23 04:02 samatcodeapprove

Cool , I will try test it this weekend , and give some feedback

sergiomb2 avatar Feb 02 '23 10:02 sergiomb2

what command did you use to make those patch files? My diff has different output.

malhal avatar May 23 '24 11:05 malhal