Subject: Re: bug#18681: The Linux cp command has bugs

From: Eric Blake <[email-masked]>
Date: Fri, 10 Oct 2014 14:54:59 -0600

On 10/10/2014 02:00 PM, Polehn, Mike A wrote:

> This still left the incorrect operation of the interactive operation when both -i and -f is used.

The behavior of -i vs. -f interaction is required by POSIX; in
particular, POSIX is explicit that -i and -f are NOT a toggle switch of
one another, but each turns on slightly different, somewhat overlapping,
changes in behavior (so specifying both is different from specifying one
in isolation).  We can't change what either one of those flags means.
If there is another mode of operation that is also useful, then it needs
yet another flag.  At one point in the past, we had
--reply={yes,no,query} to try and offer a third mode, but it had
confusing semantics and we ended up pulling it because of the confusion
it could cause.  At the time we pulled it, we admitted that 'rsync' has
some modes of operations that might be better suited for the particular
modes that people people seemed to be requesting when they thought that
--reply would do the trick (and usually, what they thought --reply would
do and what it actually did were different, which is why we removed it
to avoid confusion).  We have also added a --no-clobber option, which is
somewhat of a compromise (what some people thought --reply=no would do,
--no-clobber actually does better).

So adding a new option is not out of the question, but you'd have to
have well-defined semantics of what it should do, and how it differs
from either normal mode, '-i' mode, '-f' mode, '-i -f' mode, or
'--no-clobber' mode.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org