Skip to content

mv: honor overwrite and target options during exchange - #17134

Open
qodelicious wants to merge 1 commit into
uutils:mainfrom
qodelicious:mv-exchange-options
Open

qodelicious wants to merge 1 commit into
uutils:mainfrom
qodelicious:mv-exchange-options

Conversation

@qodelicious

Copy link
Copy Markdown
Contributor

mv --exchange swapped the two paths before looking at any of the options that control a normal move, so -i, -n, --update and -b had no effect, and -t/-T were ignored when picking the paths to swap.

The overwrite policy (-i, -n, --update) is now applied before the swap, --backup is rejected together with --exchange, and -t/-T are used to select the destinations. Tests added in tests/by-util/test_mv.rs.

Closes #17112

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mv --exchange ignores -i, -n, -b, --update, -t and -T

1 participant