Skip to content

More revert dirty-set rules to sync with git#11076

Merged
macneale4 merged 1 commit into
mainfrom
macneale4-claude/dolt-revert
May 19, 2026
Merged

More revert dirty-set rules to sync with git#11076
macneale4 merged 1 commit into
mainfrom
macneale4-claude/dolt-revert

Conversation

@macneale4
Copy link
Copy Markdown
Contributor

Git will reject revert when there is anything staged, regardless of conflicts or not in the changed. This change makes dolt follow the same pattern.

Related: #11073

Two fixes on top of the prior table-level granularity change:

1. Match git's index-clean requirement: refuse on any staged change
   regardless of which tables the revert touches. git refuses
   "your local changes would be overwritten by revert" even when the
   staged file is unrelated, because the resulting commit would mix
   staged work with the revert's inverse-change commit.
2. Filter TableUnmodified entries out of stageRevertedTables. Without
   this, a working-set table that the merge "took ours" for would be
   staged and silently committed alongside the revert. The new disjoint
   test caught this once dolt_status was exercised.

Add a test for the staged-disjoint case that should refuse.
@macneale4 macneale4 requested a review from fulghum May 19, 2026 22:16
Copy link
Copy Markdown
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.54 0.55 1.85
groupby_scan 9.91 9.91 0.0
index_join 1.86 1.86 0.0
index_join_scan 1.34 1.34 0.0
index_scan 20.74 20.74 0.0
oltp_point_select 0.25 0.26 4.0
oltp_read_only 5.09 5.09 0.0
select_random_points 0.51 0.51 0.0
select_random_ranges 0.56 0.56 0.0
table_scan 20.37 20.74 1.82
types_table_scan 46.63 46.63 0.0
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.21 6.21 0.0
oltp_insert 3.02 3.02 0.0
oltp_read_write 10.84 10.84 0.0
oltp_update_index 3.13 3.13 0.0
oltp_update_non_index 2.97 2.97 0.0
oltp_write_only 5.77 5.77 0.0
types_delete_insert 6.55 6.55 0.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 45.79 45.79 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt a13d740 52.91 dolt 014f1d8 52.67 -0.45

@coffeegoddd
Copy link
Copy Markdown
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
014f1d8 ok 5937471
version total_tests
014f1d8 5937471
correctness_percentage
100.0

@macneale4 macneale4 merged commit e3aa2c5 into main May 19, 2026
40 of 44 checks passed
@github-actions
Copy link
Copy Markdown

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.59
adds_updates_deletes 60000 60000 60000 2.94
deletes_only 0 60000 0 1.43
updates_only 0 0 60000 1.79

@github-actions
Copy link
Copy Markdown

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.05 2
batching batch sql 10000 1 0.06 2
batching by line sql 10000 1 0.06 2
blob 1 blob 200000 1 0.86 2.74 2.59
blob 2 blobs 200000 1 0.86 2.71 2.58
blob no blob 200000 1 0.88 2.68 2.53
col type datetime 200000 1 0.79 2.63 2.49
col type varchar 200000 1 0.65 3.89 3.62
config width 2 cols 200000 1 0.75 2.65 2.44
config width 32 cols 200000 1 1.67 3.37 2.91
config width 8 cols 200000 1 0.96 2.77 2.63
pk type float 200000 1 0.84 2.44 2.2
pk type int 200000 1 0.77 2.6 2.35
pk type varchar 200000 1 1.41 1.74 1.58
row count 1.6mm 1600000 1 5.53 2.95 2.68
row count 400k 400000 1 1.43 2.87 2.55
row count 800k 800000 1 2.86 2.86 2.55
secondary index four index 200000 1 3.37 1.3 1.06
secondary index no secondary 200000 1 0.87 2.74 2.55
secondary index one index 200000 1 1.1 2.51 2.19
secondary index two index 200000 1 1.93 1.72 1.55
sorting shuffled 1mm 1000000 0 4.86 2.96 2.79
sorting sorted 1mm 1000000 1 4.91 2.92 2.75

@github-actions
Copy link
Copy Markdown

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.26
dolt_blame_commit_filter system table 1.2
dolt_commit_ancestors_commit_filter system table 0.61
dolt_commits_commit_filter system table 1.1
dolt_diff_log_join_from_commit system table 3.05
dolt_diff_log_join_to_commit system table 3.07
dolt_diff_table_from_commit_filter system table 1.26
dolt_diff_table_to_commit_filter system table 1.26
dolt_diffs_commit_filter system table 1.13
dolt_history_commit_filter system table 1.54
dolt_log_commit_filter system table 1.33

@tbantle22 tbantle22 deleted the macneale4-claude/dolt-revert branch May 20, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants