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: copy attributes after making subdir #6884

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

rm-dr
Copy link

@rm-dr rm-dr commented Nov 23, 2024

Closes #6875.

TODO:

@rm-dr rm-dr marked this pull request as draft November 23, 2024 23:14
@rm-dr rm-dr changed the title opy attributes after making subdir Copy attributes after making subdir Nov 23, 2024
@rm-dr rm-dr force-pushed the 6875-cp-a branch 2 times, most recently from 898a027 to 6676cde Compare November 23, 2024 23:56
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-HL. tests/cp/cp-HL is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/cp-deref. tests/cp/cp-deref is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/dir-slash. tests/cp/dir-slash is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/fail-perm. tests/cp/fail-perm is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/link-preserve. tests/cp/link-preserve is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/parent-perm-race. tests/cp/parent-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/preserve-mode. tests/cp/preserve-mode is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/symlink-slash. tests/cp/symlink-slash is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/dup-source. tests/mv/dup-source is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
GNU test error: tests/cp/link-heap. tests/cp/link-heap is passing on 'main'. Maybe you have to rebase?

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@rm-dr rm-dr marked this pull request as ready for review November 24, 2024 17:09
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/link-heap. tests/cp/link-heap is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker changed the title Copy attributes after making subdir cp: copy attributes after making subdir Nov 25, 2024
fn build_dir(
path: &PathBuf,
recursive: bool,
options: &Options,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changing the order?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the usual convention, no?
The "primary" argument is first, all options and etc come afterwards.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe but if you do, it should be in a sep commit :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done. I've reorganized commits & force-pushed.

tests/by-util/test_cp.rs Outdated Show resolved Hide resolved
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/link-heap. tests/cp/link-heap is passing on 'main'. Maybe you have to rebase?

@rm-dr rm-dr marked this pull request as draft November 26, 2024 16:50
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/link-heap. tests/cp/link-heap is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@rm-dr rm-dr marked this pull request as ready for review November 30, 2024 06:23
@rm-dr rm-dr requested a review from sylvestre November 30, 2024 06:23
@rm-dr rm-dr force-pushed the 6875-cp-a branch 4 times, most recently from 82de5b9 to 62c33d4 Compare November 30, 2024 06:33
Copy link

GNU testsuite comparison:

GNU test error: tests/cp/link-heap. tests/cp/link-heap is passing on 'main'. Maybe you have to rebase?

Copy link

github-actions bot commented Dec 1, 2024

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Dec 3, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@rm-dr
Copy link
Author

rm-dr commented Dec 11, 2024

This pr should be ready to be merged.
Is there anything else I need to do?

@sylvestre
Copy link
Contributor

Sorry, i looked if skip_last wasn't implemented elsewhere and got distracted

// (Note that there can be more than one! We might step out of
// `./a/b/c` into `./a/`, in which case we'll need to fix the
// permissions of both `./a/b/c` and `./a/b`, in that order.)
if direntry.file_type().is_dir() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to move this into a function?
it is starting to be a bit long

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

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.

cp -a does not copy attributes (owner, rights) of directories
2 participants