Re: cp -u should skip copying a file to itself

2008-10-05 Thread Jim Meyering
Ed Avis [EMAIL PROTECTED] wrote:
 % touch foo foo
 % cp -u foo foo  echo yes
 cp: `foo' and `foo' are the same file

 I expected that since -u says

-u, --update
   copy only when the SOURCE file is newer than the
   destination file or when the destination file is missing

 it would not attempt to copy the file in this case (since the file is
 not newer than itself) and cp would return a true exit status.

Sounds like it'd be worthwhile to change that, if you can do it
in an obviously safe manner.  If you write a patch, please
follow the guidelines in HACKING:

  http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=HACKING;hb=HEAD


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


cp -u should skip copying a file to itself

2008-10-04 Thread Ed Avis

% touch foo foo
% cp -u foo foo  echo yes
cp: `foo' and `foo' are the same file

I expected that since -u says

   -u, --update
  copy only when the SOURCE file is newer than the
  destination file or when the destination file is missing

it would not attempt to copy the file in this case (since the file is 
not newer than itself) and cp would return a true exit status.


--
Ed Avis [EMAIL PROTECTED]



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils