Repository navigation
Conversation
limadog9
force-pushed
the
fix/cp-hardlink-indirect-symlink
branch
from
October 17, 2026 14:53
8ebb363 to
0d58d3e
Compare
sylvestre
reviewed
Oct 24, 2026
| ) -> CopyResult<PerformedAction> { | ||
| match options.copy_mode { | ||
| CopyMode::Link => { | ||
| let replace_symlink = !options.dereference(source_in_command_line) |
Contributor
There was a problem hiding this comment.
with --backup, dest has already been moved away, so we would print "removed" on top of the backup message, no?
sylvestre
reviewed
Oct 24, 2026
| ) | ||
| })?; | ||
| if replace_symlink && options.verbose { | ||
| use std::io::Write; |
Contributor
There was a problem hiding this comment.
could you please use println! like delete_path does? or share the helper, it is almost the same code
sylvestre
reviewed
Oct 24, 2026
| source, | ||
| dest, | ||
| options.dereference(source_in_command_line) | ||
| || !source_is_symlink |
Contributor
There was a problem hiding this comment.
this condition is hard to read, could you please put it in a named variable?
limadog9
force-pushed
the
fix/cp-hardlink-indirect-symlink
branch
from
October 24, 2026 14:30
0d58d3e to
e0e154b
Compare
sylvestre
force-pushed
the
fix/cp-hardlink-indirect-symlink
branch
from
October 25, 2026 09:28
e0e154b to
76a46c3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compare symlinks themselves under -P, so cp -lP replaces a distinct destination link even when both links resolve to the same file. Use atomic replacement and leave existing hard links unchanged.
Closes #6531