Phase 3: Finalization and verification.
(&self, stats: &ImportStats)
| 8235 | |
| 8236 | /// Phase 3: Finalization and verification. |
| 8237 | fn phase3_finalize(&self, stats: &ImportStats) -> CliResult<()> { |
| 8238 | // Verify counts |
| 8239 | let expected = stats.commits_parsed; |
| 8240 | let actual = stats.changes_written |
| 8241 | + stats.empty_commits |
| 8242 | + stats.merge_commits |
| 8243 | + stats.self_push_skipped |
| 8244 | + stats.squash_inserted |
| 8245 | + stats.squash_skipped; |
| 8246 | |
| 8247 | if actual != expected { |
| 8248 | return Err(CliError::GitError { |
| 8249 | message: format!( |
| 8250 | "Import verification failed: {} commits parsed but {} changes created", |
| 8251 | expected, actual |
| 8252 | ), |
| 8253 | }); |
| 8254 | } |
| 8255 | |
| 8256 | Ok(()) |
| 8257 | } |
| 8258 | } |
| 8259 | |
| 8260 | // ═══════════════════════════════════════════════════════════════════════════ |