feat(dolt): auto-commit write commands and set explicit commit authors (#1270)
Adds Dolt auto-commit functionality for write commands and sets explicit commit authors. Includes fix for race condition in commandDidWrite (converted to atomic.Bool). Original PR: #1267 by @coffeegoddd Co-authored-by: Dustin Brown <dustin@dolthub.com>
This commit is contained in:
@@ -742,6 +742,8 @@ func doExportSync(ctx context.Context, jsonlPath string, force, dryRun bool) err
|
||||
fmt.Println("⚠ Dolt remote not available, falling back to JSONL-only")
|
||||
} else {
|
||||
fmt.Println("→ Committing to Dolt...")
|
||||
// We are explicitly creating a Dolt commit inside sync; avoid redundant auto-commit in PersistentPostRun.
|
||||
commandDidExplicitDoltCommit = true
|
||||
if err := rs.Commit(ctx, "bd sync: auto-commit"); err != nil {
|
||||
// Ignore "nothing to commit" errors
|
||||
if !strings.Contains(err.Error(), "nothing to commit") {
|
||||
|
||||
Reference in New Issue
Block a user