Phase 3: Finalization and verification.
(&self, stats: &ImportStats)
| 3490 | |
| 3491 | /// Phase 3: Finalization and verification. |
| 3492 | fn phase3_finalize(&self, stats: &ImportStats) -> CliResult<()> { |
| 3493 | // Verify counts |
| 3494 | let expected = stats.commits_parsed; |
| 3495 | let actual = stats.changes_written |
| 3496 | + stats.empty_commits |
| 3497 | + stats.merge_commits |
| 3498 | + stats.self_push_skipped; |
| 3499 | |
| 3500 | if actual != expected { |
| 3501 | return Err(CliError::GitError { |
| 3502 | message: format!( |
| 3503 | "Import verification failed: {} commits parsed but {} changes created", |
| 3504 | expected, actual |
| 3505 | ), |
| 3506 | }); |
| 3507 | } |
| 3508 | |
| 3509 | Ok(()) |
| 3510 | } |
| 3511 | } |
| 3512 | |
| 3513 | // ═══════════════════════════════════════════════════════════════════════════ |