From 9a280e0f6084b6ff1953ecbf773adc0372dccb90 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sat, 8 Nov 2025 22:45:36 -0800 Subject: [PATCH] Clean up snapshot files after successful merge (bd-auf1) Amp-Thread-ID: https://ampcode.com/threads/T-15e8dbc1-4706-4640-883e-6830a8e79fe8 Co-authored-by: Amp --- cmd/bd/sync.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/bd/sync.go b/cmd/bd/sync.go index 15c3accd..4298cbcb 100644 --- a/cmd/bd/sync.go +++ b/cmd/bd/sync.go @@ -269,6 +269,12 @@ Use --merge to merge the sync branch back to main branch.`, if err := updateBaseSnapshot(jsonlPath); err != nil { fmt.Fprintf(os.Stderr, "Warning: failed to update base snapshot: %v\n", err) } + + // Clean up temporary snapshot files after successful merge + sm := NewSnapshotManager(jsonlPath) + if err := sm.Cleanup(); err != nil { + fmt.Fprintf(os.Stderr, "Warning: failed to clean up snapshots: %v\n", err) + } } }