--- Begin Message ---
Subject: |
-o creates empty output on null patch |
Date: |
Tue, 05 Sep 2006 23:13:43 +0200 |
Package: patch
Version: 2.5.9-4
Severity: normal
[11/address@hidden:~/tmp$ ls -al
total 16K
drwxr-xr-x 2 mh mh 4.0K Sep 5 23:06 ./
drwxr-xr-x 18 mh mh 4.0K Sep 5 16:58 ../
-rwxr-xr-x 1 mh mh 5.5K Sep 5 23:04 some-file*
[12/address@hidden:~/tmp$ patch some-file /dev/null
[13/address@hidden:~/tmp$ ls -al
total 16K
drwxr-xr-x 2 mh mh 4.0K Sep 5 23:06 ./
drwxr-xr-x 18 mh mh 4.0K Sep 5 16:58 ../
-rwxr-xr-x 1 mh mh 5.5K Sep 5 23:04 some-file*
[14/address@hidden:~/tmp$ patch -o other-file some-file /dev/null
[15/address@hidden:~/tmp$ ls -al
total 16K
drwxr-xr-x 2 mh mh 4.0K Sep 5 23:06 ./
drwxr-xr-x 18 mh mh 4.0K Sep 5 16:58 ../
-rw------- 1 mh mh 0 Sep 5 23:06 other-file
-rwxr-xr-x 1 mh mh 5.5K Sep 5 23:04 some-file*
[16/address@hidden:~/tmp$
I think that patch -o should create a copy of the input file if fed a
null patch, as this is the same behavior as when editing a file in
place with a null patch.
Greetings
Marc
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.11-zgsrv
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages patch depends on:
ii libc6 2.3.6.ds1-3 GNU C Library: Shared libraries
patch recommends no packages.
-- no debconf information
--- End Message ---