Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: correctly copy ancestor dirs in --parents mode #4071

Merged
merged 3 commits into from
Oct 23, 2022

Commits on Oct 23, 2022

  1. Configuration menu
    Copy the full SHA
    cee6c25 View commit details
    Browse the repository at this point in the history
  2. cp: make cp -a not fail on Windows

    Before this commit, `cp -a` would terminate with a non-zero status
    code on Windows because there are no extended attributes (xattr) to
    copy. However, the GNU documentation for cp states
    
    > Try to preserve SELinux security context and extended attributes
    > (xattr), but ignore any failure to do that and print no
    > corresponding diagnostic.
    
    so it seems reasonable to do nothing instead of exiting with an error
    in this case.
    jfinkels committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    cd3f7b8 View commit details
    Browse the repository at this point in the history
  3. cp: correctly copy ancestor dirs in --parents mode

    Fix a bug where `cp` failed to copy ancestor directories when using
    the `--parents` option. For example, before this commit:
    
        $ mkdir -p a/b/c d
        $ cp --parents a/b/c d
        $ find d
        d
        d/c
    
    After this commit
    
        $ mkdir -p a/b/c d
        $ cp --parents a/b/c d
        $ find d
        d
        d/a
        d/a/b
        d/a/b/c
    
    This commit also adds the correct messages for `--verbose` mode:
    
        $ cp -r --parents --verbose a/b/c d
        a -> d/a
        a/b -> d/a/b
        'a/b/c' -> 'd/a/b/c'
    
    Fixes uutils#3332.
    jfinkels committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    ac3fcca View commit details
    Browse the repository at this point in the history