Skip to content

Add dolt_config() for committer name and email#149

Merged
timsehn merged 1 commit intomasterfrom
fix/committer-config
Mar 26, 2026
Merged

Add dolt_config() for committer name and email#149
timsehn merged 1 commit intomasterfrom
fix/committer-config

Conversation

@timsehn
Copy link
Copy Markdown
Collaborator

@timsehn timsehn commented Mar 26, 2026

Summary

Closes #147. Adds dolt_config() SQL function for setting committer name and email.

SELECT dolt_config('user.name', 'Tim Sehn');
SELECT dolt_config('user.email', 'tim@dolthub.com');
SELECT dolt_commit('-m', 'my commit');
-- committer: Tim Sehn, email: tim@dolthub.com
  • Per-session config (stored on Btree struct, same pattern as zBranch)
  • All 4 commit-creating operations now use config: dolt_commit, dolt_merge, dolt_cherry_pick, dolt_revert
  • --author flag on dolt_commit still works as per-commit override
  • dolt_config('key') returns current value
  • Default: "doltlite" with empty email (unchanged behavior if config not set)

Test plan

  • Default author shows "doltlite"
  • Config set changes commit author
  • --author flag overrides config
  • Merge commits use config
  • Config is per-session (not persisted across connections)

🤖 Generated with Claude Code

New SQL function:
  SELECT dolt_config('user.name', 'Tim Sehn');
  SELECT dolt_config('user.email', 'tim@dolthub.com');
  SELECT dolt_config('user.name');  -- get current value

Per-session config stored on the Btree struct (same pattern as zBranch).
All commit-creating operations (dolt_commit, dolt_merge, dolt_cherry_pick,
dolt_revert) now use session config instead of hardcoded "doltlite".
The --author flag on dolt_commit still works as a per-commit override.

Closes https://github.com/timsehn/doltlite/issues/147

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timsehn timsehn force-pushed the fix/committer-config branch from b0d9df4 to 1470620 Compare March 26, 2026 00:40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 26, 2026

Sysbench-Style Benchmark: Doltlite vs SQLite

In-Memory

Reads

Test SQLite (ms) Doltlite (ms) Multiplier
oltp_point_select 49 76 1.55
oltp_range_select 31 36 1.16
oltp_sum_range 13 15 1.15
oltp_order_range 5 6 1.20
oltp_distinct_range 7 7 1.00
oltp_index_scan 6 55 9.17
select_random_points 22 69 3.14
select_random_ranges 7 9 1.29
covering_index_scan 12 68 5.67
groupby_scan 53 58 1.09
index_join 6 21 3.50
index_join_scan 3 255 85.00
types_table_scan 11 12 1.09
table_scan 1 2 2.00
oltp_read_only 207 236 1.14

Writes

Test SQLite (ms) Doltlite (ms) Multiplier
oltp_bulk_insert 27 40 1.48
oltp_insert 21 31 1.48
oltp_update_index 48 614 12.79
oltp_update_non_index 33 46 1.39
oltp_delete_insert 47 333 7.09
oltp_write_only 18 265 14.72
types_delete_insert 24 33 1.38
oltp_read_write 123 433 3.52

File-Backed

Reads

Test SQLite (ms) Doltlite (ms) Multiplier
oltp_point_select 134 89 0.66
oltp_range_select 59 40 0.68
oltp_sum_range 22 19 0.86
oltp_order_range 10 6 0.60
oltp_distinct_range 7 7 1.00
oltp_index_scan 15 57 3.80
select_random_points 34 74 2.18
select_random_ranges 17 13 0.76
covering_index_scan 22 66 3.00
groupby_scan 53 58 1.09
index_join 14 21 1.50
index_join_scan 3 257 85.67
types_table_scan 13 13 1.00
table_scan 2 3 1.50
oltp_read_only 315 283 0.90

Writes

Test SQLite (ms) Doltlite (ms) Multiplier
oltp_bulk_insert 30 39 1.30
oltp_insert 22 34 1.55
oltp_update_index 47 678 14.43
oltp_update_non_index 37 49 1.32
oltp_delete_insert 45 327 7.27
oltp_write_only 23 269 11.70
types_delete_insert 26 31 1.19
oltp_read_write 139 415 2.99

10000 rows, single CLI invocation per test, workload-only timing via SQL timestamps.

@timsehn timsehn merged commit e31a332 into master Mar 26, 2026
2 checks passed
@timsehn timsehn deleted the fix/committer-config branch March 26, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to configure and change committer and email.

1 participant