Skip to content

Fix cp --sparse=auto not creating sparse-files. #6130

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

Closed

Conversation

AnirbanHalder654322
Copy link
Contributor

Fixes #6129

  • Adds sparse-copy as clone fallback
  • Uses the sparse-copy fallback for sparse=auto invocations.

Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/sparse-to-pipe. tests/cp/sparse-to-pipe is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/head/head-c. tests/head/head-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/od/od-j. tests/od/od-j is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/tail-c. tests/tail/tail-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/wc/wc-proc. tests/wc/wc-proc is passing on 'main'. Maybe you have to rebase?

@sylvestre
Copy link
Contributor

GNU testsuite comparison:

GNU test failed: tests/cp/sparse-to-pipe. tests/cp/sparse-to-pipe is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/head/head-c. tests/head/head-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/od/od-j. tests/od/od-j is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/tail-c. tests/tail/tail-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/wc/wc-proc. tests/wc/wc-proc is passing on 'main'. Maybe you have to rebase?

these are probably yours

@AnirbanHalder654322 AnirbanHalder654322 marked this pull request as draft March 26, 2024 06:13
Copy link

GNU testsuite comparison:

GNU test failed: tests/head/head-c. tests/head/head-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/od/od-j. tests/od/od-j is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/tail-c. tests/tail/tail-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/wc/wc-proc. tests/wc/wc-proc is passing on 'main'. Maybe you have to rebase?

Copy link

GNU testsuite comparison:

GNU test failed: tests/head/head-c. tests/head/head-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/od/od-j. tests/od/od-j is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
GNU test failed: tests/tail/tail-c. tests/tail/tail-c is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/wc/wc-proc. tests/wc/wc-proc is passing on 'main'. Maybe you have to rebase?

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@AnirbanHalder654322 AnirbanHalder654322 marked this pull request as ready for review March 27, 2024 15:13
@sylvestre
Copy link
Contributor

Could you please add tests?

@AnirbanHalder654322
Copy link
Contributor Author

Could you please add tests?

Added tests .

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Copy link

github-actions bot commented Apr 1, 2024

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@BenWiederhake
Copy link
Collaborator

BenWiederhake commented Apr 1, 2024

The overall code changes look good to me, but someone else should merge it.

In particular, I'm unhappy with squashing it all into a single commit, but I'm also unhappy with 39 fix-fixing commits ^^'

EDIT: Also, please see ./tests/by-util/test_cp.rs:2349:22 - Unknown word (unsuccesful) fix: (unsuccessful)

@AnirbanHalder654322
Copy link
Contributor Author

AnirbanHalder654322 commented Apr 1, 2024

The overall code changes look good to me, but someone else should merge it.

In particular, I'm unhappy with squashing it all into a single commit, but I'm also unhappy with 39 fix-fixing commits ^^'

EDIT: Also, please see ./tests/by-util/test_cp.rs:2349:22 - Unknown word (unsuccesful) fix: (unsuccessful)

Sorry for the bad commit hygiene . Do i do another commit to fix the spelling ? ;(

@BenWiederhake
Copy link
Collaborator

commit hygiene: No worries, no damage has been done! :D
I see at least three ways forward: You could rebase/squash some of the commits, or if that's too much effort just squash everything into a single commit, or someone else squashes the entire PR into a single commit. In either case, I already did enough damage for today (I messed up a different PR), so I'm not going to merge anything today.

spelling: Yes, please fix the typo in whatever way you think is best.

Copy link

github-actions bot commented Apr 1, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@AnirbanHalder654322
Copy link
Contributor Author

AnirbanHalder654322 commented Apr 1, 2024

Will let someone else squash , i am too bad at git :(

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

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

Those match arms look like they're repeating, and the error types should be compatible. Can this be simplified? EDIT: Nope, they can't be simplified. All is good.

Copy link

github-actions bot commented Apr 1, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@AnirbanHalder654322
Copy link
Contributor Author

Closed in favor of #6220

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 --sparse=auto doesn't create a sparse file
4 participants