readd update flag to cp command (#10824)

# Description
- this PR should close #10819


# User-Facing Changes
Behaviour is similar to pre 0.86.0 behaviour of the cp command and
should as such not have a user-facing change, only compared to the
current version, were the option is readded.


# After Submitting
I guess the documentation will be automatically updated and as this
feature is no further highlighted, probably, no more work will be needed
here.

# Considerations
coreutils actually allows a third option:
```
pub enum UpdateMode {
    // --update=`all`,
    ReplaceAll,
    // --update=`none`
    ReplaceNone,
    // --update=`older`
    // -u
    ReplaceIfOlder,
}
```
namely `ReplaceNone`, which I have not added. Also I think that
specifying `--update 'abc'` is non functional.
This commit is contained in:
Ludwig Austermann
2023-10-25 11:30:13 +02:00
committed by GitHub
parent f043a8a8ff
commit 8429aec57f
2 changed files with 18 additions and 4 deletions

View File

@ -582,7 +582,6 @@ fn copy_file_with_read_permission_impl(progress: bool) {
});
}
#[ignore = "not implemented with ucp"]
#[test]
fn copy_file_with_update_flag() {
copy_file_with_update_flag_impl(false);