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

add -u flag to cp, mv command #9214

Merged
merged 4 commits into from May 20, 2023
Merged

add -u flag to cp, mv command #9214

merged 4 commits into from May 20, 2023

Conversation

WindSoilder
Copy link
Collaborator

Description

Closes: #7853

I found that I want this feature too...

So I take over it, sorry for that @VincenzoCarlino

User-Facing Changes

Tests + Formatting

After Submitting

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@8695b57). Click here to learn what that means.
The diff coverage is 95.34%.

❗ Current head e92a0d8 differs from pull request most recent head 8962d11. Consider uploading reports for the commit 8962d11 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9214   +/-   ##
=======================================
  Coverage        ?   68.93%           
=======================================
  Files           ?      635           
  Lines           ?   102081           
  Branches        ?        0           
=======================================
  Hits            ?    70374           
  Misses          ?    31707           
  Partials        ?        0           
Impacted Files Coverage Δ
crates/nu-command/src/filesystem/mv.rs 81.96% <92.30%> (ø)
crates/nu-command/src/filesystem/util.rs 77.88% <93.33%> (ø)
crates/nu-command/src/filesystem/cp.rs 69.74% <100.00%> (ø)

@amtoine amtoine changed the title add -u flag to cp, mv comamnd add -u flag to cp, mv command May 19, 2023
Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

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

this looks like it's working just fine to me 👌

i'm just wondering if we should add two tests to make sure the copy works indeed when the source is newer than the destination 🤔
currently we only test when source is older 😮

@WindSoilder
Copy link
Collaborator Author

Thanks for your review! I've added one more action in the test case to match relative scenario

Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

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

thanks @WindSoilder 😊

@rgwood rgwood merged commit 5a34671 into nushell:main May 20, 2023
15 of 16 checks passed
@WindSoilder WindSoilder deleted the cp_u_flag branch May 20, 2023 23:49
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.

add ^cp's -u flag to builtin cp
3 participants