Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combinediff: /dev/null is not handled correctly #23

Open
vicencb opened this issue May 13, 2018 · 1 comment
Open

combinediff: /dev/null is not handled correctly #23

vicencb opened this issue May 13, 2018 · 1 comment

Comments

@vicencb
Copy link

vicencb commented May 13, 2018

Hi,
when combining two patches where the first one creates a new file

--- /dev/null
+++ b/txt
@@ -0,0 +1,3 @@
+a
+b
+c

and the second one modifies that same file

--- a/txt
+++ b/txt
@@ -1,3 +1,2 @@
 a
 b
-c

then combinediff outputs

unchanged:
--- /dev/null
+++ b/txt
@@ -0,0 +1,3 @@
+a
+b
+c
only in patch2:
unchanged:
--- a/txt
+++ b/txt
@@ -1,3 +1,2 @@
 a
 b
-c

that is, the patches are not combined.

Regards,
  Vicenç.

@isidroas
Copy link

isidroas commented Jun 5, 2024

I also see this.

That device (/dev/null) is used by git to express a file addition or deletion.

The expected output is

--- /dev/null
+++ b/txt
@@ -0,0 +1,2 @@
+a
+b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants