patch: .diff interpreted incorrectly?
Bernhard Fischer
rep.nop at aon.at
Mon Oct 10 12:42:31 UTC 2005
Hi,
./patch is the busybox one, it behaves differently as GNU patch,
i.e. it seems to patch the "wrong" file as compared to GNU patch
version 2.5.9? "wrong" because i'd expect _both_ patch commands to patch
the same file..
Is this a feature or a bug in busybox' patch?
$ cp -a TMP/* .;diff -qs one two ;patch -p0 <test.diff;diff -qs one two;ls -l one two
Files one and two are identical
patching file one
Files one and two differ
-rw-r--r-- 1 b b 14 Oct 10 13:43 one
-rw-r--r-- 1 b b 16 Oct 10 11:30 two
$ cp -a TMP/* .;diff -qs one two ;./patch -p0 <test.diff;diff -qs one two;ls -l one two
Files one and two are identical
patching file two
Files one and two differ
-rw-r--r-- 1 b b 16 Oct 10 11:30 one
-rw-r--r-- 1 b b 14 Oct 10 13:43 two
input is:
$ for i in TMP/*;do echo "# $i:";cat $i;done
# TMP/one:
one
towel
three
# TMP/test.diff:
--- one 2005-10-10 11:30:30.000000000 +0200
+++ two 2005-10-10 13:30:39.000000000 +0200
@@ -1,3 +1,3 @@
one
-towel
+two
three
# TMP/two:
one
towel
three
More information about the busybox
mailing list