Move the actual file on disk.
(&self, repo_root: &Path, from: &str, to: &str)
| 169 | |
| 170 | /// Move the actual file on disk. |
| 171 | fn move_file_on_disk(&self, repo_root: &Path, from: &str, to: &str) -> std::io::Result<()> { |
| 172 | let from_path = repo_root.join(from); |
| 173 | let to_path = repo_root.join(to); |
| 174 | |
| 175 | // Create parent directories if needed |
| 176 | if let Some(parent) = to_path.parent() { |
| 177 | std::fs::create_dir_all(parent)?; |
| 178 | } |
| 179 | |
| 180 | std::fs::rename(&from_path, &to_path) |
| 181 | } |
| 182 | |
| 183 | fn restore_after_staging_failure( |
| 184 | source: &Path, |