Hello everyone, I'll show you the situation right away.
Let's do some tests
Now a little attention
Why?
Code:
$ pwd
/var/tmp/tmp.Ov42tdafyq
$ echo OLD > old
$ echo NEW > new
Let's do some tests
Code:
$ diff -u $PWD/old $PWD/new | tee file.patch
--- /var/tmp/tmp.Ov42tdafyq/old 2024-09-01 14:59:23.806596090 +0200
+++ /var/tmp/tmp.Ov42tdafyq/new 2024-09-01 14:59:23.806596090 +0200
@@ -1 +1 @@
-OLD
+NEW
$ patch -d/ -p0 --dry-run < file.patch
checking file /var/tmp/tmp.Ov42tdafyq/old
Now a little attention
Code:
$ mv old old2
$ diff -u $PWD/old2 $PWD/new | tee file.patch
--- /var/tmp/tmp.Ov42tdafyq/old2 2024-09-01 14:59:23.806596090 +0200
+++ /var/tmp/tmp.Ov42tdafyq/new 2024-09-01 14:59:23.806596090 +0200
@@ -1 +1 @@
-OLD
+NEW
$ patch -d/ -p0 --dry-run < file.patch
checking file /var/tmp/tmp.Ov42tdafyq/new
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
Why?