bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-o creates empty output on null patch (fwd)


From: Christoph Berg
Subject: -o creates empty output on null patch (fwd)
Date: Fri, 8 Sep 2006 15:35:40 +0200
User-agent: Mutt/1.5.13+cvs (2006-07-13)

Hi,

the appended bug report was reported as Debian bug #386188:

Christoph
-- 
address@hidden | http://www.df7cb.de/cs/
Universität des Saarlandes, Compiler Design Lab
--- 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 ---

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]