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: Use PathBuf instead of String for paths #4348

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

tmccombs
Copy link
Contributor

I think this should avoid unnecessarily validating utf-8, and avoids a few allocations.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@tertsdiepraam
Copy link
Member

Good idea! Could you add a small test for this with some invalid utf-8, so we don't regress?

@tmccombs
Copy link
Contributor Author

Sure.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

1 similar comment
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@tmccombs tmccombs marked this pull request as ready for review February 14, 2023 08:05
Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

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

I like it! There are just some clippy lints to fix.

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!

@jfinkels
Copy link
Collaborator

Looks like some test failures on macos and windows

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/rm/rm2. tests/rm/rm2 is passing on 'main'. Maybe you have to rebase?

I think this should avoid unnecessarily validating utf-8, and avoids a few allocations.
@tmccombs
Copy link
Contributor Author

hmm, it appears that mac won't actually let you create a file with an invalid utf-8 file name, and from some quick research windows might be similar? For now I've just restricted the tests to linux.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/timeout. tests/misc/timeout is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre merged commit d8a3ca0 into uutils:main Mar 6, 2023
@tmccombs tmccombs deleted the cp-pathbuf branch March 6, 2023 08:58
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.

4 participants