[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62572: Bug#1058752: bug#62572: cp --no-clobber behavior has changed
From: |
Pádraig Brady |
Subject: |
bug#62572: Bug#1058752: bug#62572: cp --no-clobber behavior has changed |
Date: |
Sat, 24 Feb 2024 22:13:42 +0000 |
User-agent: |
Mozilla Thunderbird |
On 01/02/2024 00:36, Paul Eggert wrote:
On 1/31/24 06:06, Pádraig Brady wrote:
To my mind the most protective option takes precedence.
That's not how POSIX works with mv -i and mv -f. The last flag wins. I
assume this is so that people can have aliases or shell scripts that
make -i the default, but you can override by specifying -f on the
command line. E.g., in mymv:
#!/bin/sh
mv -i "$@"
then "mymv -f a b" works as expected.
Wouldn't a similar argument apply to cp's --update options?
Or perhaps we should play it safe, and reject any combination of
--update etc. options that are incompatible. We can always change our
mind later and say that later options override earlier ones, or do
something else that's less conservative.
OK I err'd on the side of changing as little as possible wrt precedence.
-n still has precedence over any -u,--update option.
That's simplest to understand (while not changing existing precedence),
and shouldn't cause any practical issues.
I plan to push the 2 attached patches for this tomorrow.
thanks,
Pádraig
0001-cp-mv-reinstate-that-n-exits-with-success-if-files-s.patch
Description: Text Data
0002-cp-mv-add-update-none-fail-to-fail-if-existing-files.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#62572: Bug#1058752: bug#62572: cp --no-clobber behavior has changed,
Pádraig Brady <=