* fix: suppress auto-backup address conflict warning when default backup is configured When a user runs `bd backup init <path>` it registers a Dolt backup named "default". The auto-backup system also calls BackupDatabase() which registers its own remote named "backup_export" pointing to the same .beads/backup/ directory. Dolt returns "Error 1105: address conflict with a remote: 'default'" because two remotes cannot share a URL, causing a noisy warning on every write: Warning: auto-backup failed: register backup remote: add backup backup_export: \ Error 1105: address conflict with a remote: 'default' -> file://.../backup Fix: when BackupAdd fails with an address conflict, extract the name of the already-registered remote from the error message and sync using that name instead. The backup still runs — it just reuses the existing remote. Adds ExtractAddressConflictName() to versioncontrolops for parsing the conflicting name out of the Dolt error. Applies the fix to both the EmbeddedDoltStore and DoltStore implementations of BackupDatabase(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add table-driven tests for ExtractAddressConflictName --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| backup.go | ||
| backup_test.go | ||
| branches.go | ||
| clone.go | ||
| commit.go | ||
| compact.go | ||
| db.go | ||
| flatten.go | ||
| gc.go | ||
| remotes.go | ||
| version_control.go | ||