Repository navigation
Add delay-updates support across CLI and engine - #1099
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Err(error) | ||
| if error.kind() == io::ErrorKind::NotFound | ||
| && context.delay_updates_enabled() | ||
| && !attempted_commit => | ||
| { | ||
| context.commit_delayed_update_for(&existing_target)?; | ||
| attempted_commit = true; |
There was a problem hiding this comment.
Avoid early commits when handling hard links
The hard-link creation path commits queued delayed updates when the target file does not yet exist (commit_delayed_update_for). With --delay-updates, this makes the first member of a hard-link set visible as soon as another link references it, even if the overall transfer later fails. The command-line help and LocalCopyOptions::delay_updates promise to move updated files into place only after the transfer finishes, so committing here defeats the purpose of delayed updates and can leave a partially updated destination after an error. Hard links should either be staged alongside the other delayed updates or resolved against the temporary file rather than finalising early.
Useful? React with 👍 / 👎.
Summary
Testing