omnidiff 0.2.0

Fast, robust, syntax-aware code diffing using tree-sitter ASTs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
/*  This file is part of the OmniDiff code diffing tool.
 *
 *  Copyright (C) 2026 Marko Ivankovic
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published
 *  by the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program. If not, see <https://www.gnu.org/licenses/>.
 */
#[cfg(test)]
mod c_awslabs_aws_c_common_only_insert;
#[cfg(test)]
mod c_graph_algorithms_edge_addition_planarity_suite_real_change_all_across_the_file;
#[cfg(test)]
mod c_intel_vpl_gpu_rt_whitespace_only_change;
#[cfg(test)]
mod c_libtom_libtomcrypt_change_function_call;
#[cfg(test)]
mod c_ondsel_development_ondselsolver_add_include;
#[cfg(test)]
mod c_pixaranimationstudios_opensubdiv_change_license_comment;
#[cfg(test)]
mod c_pocoproject_poco_replace_0_with_nullptr;
#[cfg(test)]
mod c_relianoid_nftlb_zcu_log_to_u_log;
#[cfg(test)]
mod c_sched_ext_scx_many_many_moves_some_deletes_some_adds;
#[cfg(test)]
mod c_tripwire_tripwire_open_source_add_single_item_to_list;
#[cfg(test)]
mod cpp_arximboldi_lager_add_two_test_cases;
#[cfg(test)]
mod cpp_bolero_murakami_sprout_copyright_comment_update;
#[cfg(test)]
mod cpp_bolero_murakami_sprout_copyright_update;
#[cfg(test)]
mod cpp_bolero_murakami_sprout_copyright_update_3;
#[cfg(test)]
mod cpp_cgdb_cgdb_struct_to_pointer;
#[cfg(test)]
mod cpp_jpnurmi_znc_playback_adding_new_feature;
#[cfg(test)]
mod cpp_lancos_ponyprog_remove_a_few_lines;
#[cfg(test)]
mod cpp_llnl_sundials_comment_change;
#[cfg(test)]
mod cpp_mikepopoloski_slang_remove_if_condition_and_brackets;
#[cfg(test)]
mod cpp_qpdf_qpdf_move_to_assert_from_if_and_throw;
#[cfg(test)]
mod csharp_cyanfish_naps2_add_condition_to_if;
#[cfg(test)]
mod csharp_dotnet_script_dotnet_script_remove_two_arguments;
#[cfg(test)]
mod csharp_glibsharp_gtksharp_formatting_only_change;
#[cfg(test)]
mod csharp_glibsharp_gtksharp_interesting_case_where_most_should_be_flagged_as_insert_delete_with_a_single_update;
#[cfg(test)]
mod csharp_glibsharp_gtksharp_whitespace_only_change;
#[cfg(test)]
mod csharp_glibsharp_gtksharp_whitespace_only_change_2;
#[cfg(test)]
mod csharp_glibsharp_gtksharp_whitespace_only_change_3;
#[cfg(test)]
mod csharp_icsharpcode_avaloniailspy_a_few_formatting_changes_and_use_a_struct_instead_of_tuples;
#[cfg(test)]
mod csharp_valvesoftware_openvr_add_many_constants_and_fields;
#[cfg(test)]
mod csharp_waf_csharprepl_update_string_url;
#[cfg(test)]
mod css_fortawesome_font_awesome_update_version_comment_2;
#[cfg(test)]
mod css_fortawesome_font_awesome_update_version_comment_3;
#[cfg(test)]
mod css_fortawesome_font_awesome_upgrade_version_comment;
#[cfg(test)]
mod css_heroic_games_launcher_heroicgameslauncher_add_6_lines;
#[cfg(test)]
mod css_horst3180_vertex_theme_add_spaces_to_change_class_selector_into_descendant_selectors;
#[cfg(test)]
mod css_horst3180_vertex_theme_remove_single_rule;
#[cfg(test)]
mod css_lassekongo83_zuki_themes_fails_to_parse;
#[cfg(test)]
mod css_madmaxms_theme_obsidian_2_add_gnome_44_and_a_few_changes;
#[cfg(test)]
mod css_source_foundry_hack_change_font_string;
#[cfg(test)]
mod go_cloudflare_cfssl_change_zero_value_to_is_zero;
#[cfg(test)]
mod go_containers_storage_add_two_constants;
#[cfg(test)]
mod go_cri_o_cri_o_change_importa;
#[cfg(test)]
mod go_darylhjd_mangadesk_remove_a_function_uptade_comments;
#[cfg(test)]
mod go_dweymouth_supersonic_remove_two_lines;
#[cfg(test)]
mod go_henri_gasc_cliphist_auto_generated_file;
#[cfg(test)]
mod go_jesseduffield_lazygit_add_function;
#[cfg(test)]
mod go_nwg_piotr_gopsuinfo_shuffle_around_if_blocks;
#[cfg(test)]
mod go_prometheus_node_exporter_remove_one_comment;
#[cfg(test)]
mod go_stackexchange_blackbox_add_comment;
#[cfg(test)]
mod html_abs_lang_abs_version_update_in_string;
#[cfg(test)]
mod html_berndporr_iir1_a_lot_of_new_functionality;
#[cfg(test)]
mod html_chennes_med_extreme_test;
#[cfg(test)]
mod html_chennes_med_only_text_value_change;
#[cfg(test)]
mod html_chennes_med_only_text_value_change_2;
#[cfg(test)]
mod html_milkytracker_milkytracker_text_update;
#[cfg(test)]
mod html_oauth_xx_oauth_ruby_version_and_timestamp_update;
#[cfg(test)]
mod html_tcltk_thread_one_multiline_value_changed;
#[cfg(test)]
mod html_xiaoyeli_superlu_change_a_bunch_of_values_and_add_one_element;
#[cfg(test)]
mod java_eclipse_jdt_eclipse_remove_import_and_inheritance;
#[cfg(test)]
mod java_hunterhacker_jdom_javadoc_update;
#[cfg(test)]
mod java_hunterhacker_jdom_move_a_block;
#[cfg(test)]
mod java_jakartaee_rest_real_logic_change_of_a_significant_chunck;
#[cfg(test)]
mod java_jflex_de_jflex_javadoc_update;
#[cfg(test)]
mod java_jopt_simple_jopt_simple_remove_import;
#[cfg(test)]
mod java_junit_pioneer_junit_pioneer_add_block_comment;
#[cfg(test)]
mod java_pdftk_java_pdftk_license_comment_change;
#[cfg(test)]
mod java_pdftk_java_pdftk_real_change_all_across_the_file;
#[cfg(test)]
mod java_zeroc_ice_ice_comment_only_update;
#[cfg(test)]
mod javascript_grobian_carbonapi_web_add_binary_expression_to_existing_assignment;
#[cfg(test)]
mod javascript_home_sweet_gnome_dash_to_panel_change_set_style_arguments;
#[cfg(test)]
mod javascript_jquery_ui_rails_jquery_ui_rails_add_strict_and_move_function_call_parenthesis;
#[cfg(test)]
mod javascript_jquery_ui_rails_jquery_ui_rails_update_text_in_string;
#[cfg(test)]
mod javascript_jquery_ui_rails_jquery_ui_rails_update_text_in_string_2;
#[cfg(test)]
mod javascript_usebruno_bruno_add_class_to_classname_attribute;
#[cfg(test)]
mod javascript_usebruno_bruno_style_change;
#[cfg(test)]
mod javascript_xpra_org_xpra_html5_small_change;
#[cfg(test)]
mod json_fedoraqt_qgnomeplatform_remove_from_list;
#[cfg(test)]
mod json_fortawesome_font_awesome_string_change;
#[cfg(test)]
mod json_governikus_ausweisapp_whitespace_only;
#[cfg(test)]
mod json_ipfs_ipfs_desktop_only_update_version_strings;
#[cfg(test)]
mod json_iwalton3_jellyfin_web_jmp_gigantic_file_trivial_string_version_change;
#[cfg(test)]
mod json_kellyjonbrazil_jc_add_maxhops_to_traceroute;
#[cfg(test)]
mod json_kiwix_kiwix_desktop_add_a_few_change_a_few;
#[cfg(test)]
mod json_main_branch_track_open_instances_remove_item_from_list;
#[cfg(test)]
mod json_webgpu_native_webgpu_headers_only_insertions;
#[cfg(test)]
mod kotlin_jetbrains_kotlin_add_single_const;
#[cfg(test)]
mod kotlin_jetbrains_kotlin_remove_one_comment_line;
#[cfg(test)]
mod kotlin_jetbrains_kotlin_remove_some_deprecation;
#[cfg(test)]
mod kotlin_jetbrains_kotlin_remove_typealias_with_annotations;
#[cfg(test)]
mod kotlin_yairm210_unciv_another_vector2_removal;
#[cfg(test)]
mod kotlin_yairm210_unciv_move_from_vec2_to_hexexpression;
#[cfg(test)]
mod kotlin_yairm210_unciv_remove_tovector2_from_multiple_callsites;
#[cfg(test)]
mod kotlin_yairm210_unciv_small_change;
#[cfg(test)]
mod kotlin_yairm210_unciv_vector2_to_hexgrid;
#[cfg(test)]
mod kotlin_yairm210_unciv_yet_another_vector2_removal;
#[cfg(test)]
mod lua_corsixth_corsixth_refactor_if_expressions;
#[cfg(test)]
mod lua_dromozoa_dromozoa_utf8_only_comment_text_update;
#[cfg(test)]
mod lua_luakit_luakit_actual_test_change_merging_two_tests_into_one;
#[cfg(test)]
mod lua_luals_lua_language_server_add_gsub_function_call;
#[cfg(test)]
mod lua_luals_lua_language_server_add_two_translations;
#[cfg(test)]
mod lua_luaposix_luaposix_copyright_year_change;
#[cfg(test)]
mod lua_return_to_the_roots_s25client_add_two_items_to_list;
#[cfg(test)]
mod lua_return_to_the_roots_s25client_few_added_lines;
#[cfg(test)]
mod lua_teeworlds_teeworlds_add_or_expression_to_existing_if;
#[cfg(test)]
mod php_consol_monitoring_pnp_move_from_one_function_to_other_that_has_more_params;
#[cfg(test)]
mod php_doctrine_orm_delete_3_comments_and_update_1;
#[cfg(test)]
mod php_icinga_icingaweb2_module_graphite_add_a_few_nodes;
#[cfg(test)]
mod php_php_fig_log_deleted_a_class;
#[cfg(test)]
mod php_rk4an_phpsysinfo_actual_logic_change;
#[cfg(test)]
mod php_smarty_php_smarty_change_version_string;
#[cfg(test)]
mod php_symfony_finder_move_elseif_block_to_else;
#[cfg(test)]
mod php_theseer_directoryscanner_add_two_test_cases_and_reformat_file;
#[cfg(test)]
mod php_zetacomponents_base_whitespace_only_change;
#[cfg(test)]
mod php_zetacomponents_consoletools_file_with_parse_errors_and_a_few_deletions;
#[cfg(test)]
mod python_aajanki_yle_dl_tiny_change;
#[cfg(test)]
mod python_aboutcode_org_license_expression_excellent_test_case;
#[cfg(test)]
mod python_bolero_murakami_sprout_change_copyright_year;
#[cfg(test)]
mod python_cloudflare_cloudflare_python_comment_only_changes;
#[cfg(test)]
mod python_espressomd_espresso_fix_comment_typo;
#[cfg(test)]
mod python_fuzzyray_esearch_whitespace_only_change;
#[cfg(test)]
mod python_open_telemetry_opentelemetry_python_move_from_one_function_to_other;
#[cfg(test)]
mod python_persepolisdm_persepolis_add_a_single_node;
#[cfg(test)]
mod python_portagefilelist_client_remove_one_import_and_update_one_const_string;
#[cfg(test)]
mod python_zaneb_autopage_move_time_sleep;
#[cfg(test)]
mod r_gtownsend_icon_one_letter_identifier_change;
#[cfg(test)]
mod r_hroptatyr_dateutils_real_changes_to_an_r_script;
#[cfg(test)]
mod r_mtytel_helm_dummy_file;
#[cfg(test)]
mod r_oracle_dtrace_utils_i_have_no_idea_what_this_change_actually_does;
#[cfg(test)]
mod ruby_intridea_multi_json_remove_double_colon;
#[cfg(test)]
mod ruby_intridea_multi_json_remove_single_comma;
#[cfg(test)]
mod ruby_jmespath_jmespath_formatting_and_style_guide_fixes;
#[cfg(test)]
mod ruby_jmespath_jmespath_go_from_conditional_to_unless;
#[cfg(test)]
mod ruby_main_branch_process_executer_actual_small_change;
#[cfg(test)]
mod ruby_marcandre_backports_actual_small_change;
#[cfg(test)]
mod ruby_mikel_mail_whitespace_only_change;
#[cfg(test)]
mod ruby_moneta_rb_moneta_change_one_identifier;
#[cfg(test)]
mod ruby_moneta_rb_moneta_trivial_version_update;
#[cfg(test)]
mod ruby_rapid7_ruby_smb_add_import_and_one_expression;
#[cfg(test)]
mod rust_fornwall_rust_script_add_lifecycle_management;
#[cfg(test)]
mod rust_quietvoid_dovi_tool_change_to_templated_call;
#[cfg(test)]
mod rust_rbspy_rbspy_add_two_test_cases;
#[cfg(test)]
mod rust_refirmlabs_binwalk_whitespace_only;
#[cfg(test)]
mod rust_skim_rs_skim_format_string;
#[cfg(test)]
mod rust_tiffany352_rink_rs_real_change;
#[cfg(test)]
mod rust_tursodatabase_turso_unwrap_to_expect;
#[cfg(test)]
mod rust_weggli_rs_weggli_move_import_around_and_formatting_change;
#[cfg(test)]
mod rust_xou816_spot_add_some_around_existing_code;
#[cfg(test)]
mod rust_yannjor_krabby_actual_normal_change;
#[cfg(test)]
mod scala_com_lihaoyi_mill_add_a_function_call;
#[cfg(test)]
mod scala_com_lihaoyi_mill_add_a_member_to_expression_chains;
#[cfg(test)]
mod scala_com_lihaoyi_mill_add_one_argument;
#[cfg(test)]
mod scala_com_lihaoyi_mill_assert_format_string_change;
#[cfg(test)]
mod scala_com_lihaoyi_mill_change_from_one_function_to_other_and_delete_a_function;
#[cfg(test)]
mod scala_com_lihaoyi_mill_expand_import_path;
#[cfg(test)]
mod scala_com_lihaoyi_mill_new_import_used_to_remove_a_lot_of_code;
#[cfg(test)]
mod scala_com_lihaoyi_mill_only_change_failure_strings;
#[cfg(test)]
mod scala_com_lihaoyi_mill_real_small_change;
#[cfg(test)]
mod scala_com_lihaoyi_mill_small_change;
#[cfg(test)]
mod scala_com_lihaoyi_mill_small_refactoring;
#[cfg(test)]
mod scala_com_lihaoyi_mill_split_import;
#[cfg(test)]
mod scala_com_lihaoyi_mill_split_import_2;
#[cfg(test)]
mod scala_com_lihaoyi_mill_split_two_asserts_into_six_two_times;
#[cfg(test)]
mod scala_com_lihaoyi_mill_version_string_change;
#[cfg(test)]
mod scala_sirthias_parboiled_value_change;
#[cfg(test)]
mod scala_xerial_xerial_java_actual_code_change;
#[cfg(test)]
mod scala_ymnk_jzlib_add_a_test_case;
#[cfg(test)]
mod scala_ymnk_jzlib_add_one_test_case;
#[cfg(test)]
mod scala_ymnk_jzlib_interesting_probably_has_no_optimal_solution;
#[cfg(test)]
mod shellscript_docker_docker_bench_security_move_all_functions_by_one_and_add_one_to_the_end;
#[cfg(test)]
mod shellscript_fleetingheart_ksre_multiline_string_change;
#[cfg(test)]
mod shellscript_go_delve_delve_add_if;
#[cfg(test)]
mod shellscript_hgst_libzbc_add_variable;
#[cfg(test)]
mod shellscript_imapsync_imapsync_add_some_test_cases_and_a_few_other_changes;
#[cfg(test)]
mod shellscript_maxsatula_ocp_small_change;
#[cfg(test)]
mod shellscript_nicolargo_glances_add_shebang;
#[cfg(test)]
mod shellscript_nomad_software_vend_huge_multi_line_strings_updated;
#[cfg(test)]
mod shellscript_openlightingproject_ola_real_small_change;
#[cfg(test)]
mod shellscript_ropery_ffcast_comment_only_change;
#[cfg(test)]
mod swift_apple_swift_argument_parser_if_to_guard;
#[cfg(test)]
mod swift_apple_swift_argument_parser_refactor_and_improve_tests;
#[cfg(test)]
mod swift_apple_swift_argument_parser_remove_trimming_lines_function_call;
#[cfg(test)]
mod swift_apple_swift_argument_parser_simplify_code;
#[cfg(test)]
mod swift_apple_swift_argument_parser_small_change;
#[cfg(test)]
mod swift_logseq_logseq_add_real_feature_keypress_tracking;
#[cfg(test)]
mod swift_logseq_logseq_insertions_only;
#[cfg(test)]
mod swift_swift_emacs_swift_mode_seems_like_test_code;
#[cfg(test)]
mod swift_tree_sitter_tree_sitter_haskell_remove_a_list_item;
#[cfg(test)]
mod swift_zeroc_ice_ice_add_an_if_block_and_variable;
#[cfg(test)]
mod tsx_greenbone_gsa_add_import_and_use_it;
#[cfg(test)]
mod tsx_keybase_client_change_from_one_import_and_call_to_another;
#[cfg(test)]
mod tsx_keybase_client_emoji_to_native;
#[cfg(test)]
mod tsx_kong_insomnia_classname_strings_changed;
#[cfg(test)]
mod tsx_kong_insomnia_if_to_ternary_operator;
#[cfg(test)]
mod tsx_kong_insomnia_rewrite_if_using_ternary_twice;
#[cfg(test)]
mod tsx_mitmproxy_mitmproxy_array_to_object;
#[cfg(test)]
mod tsx_popcorn_official_popcorn_desktop_simple_property_rename;
#[cfg(test)]
mod tsx_rektdeckard_departure_mono_import_path;
#[cfg(test)]
mod tsx_troyeguo_koodo_reader_pure_insert;
#[cfg(test)]
mod typescript_apache_echarts_envelop_2_lines_with_an_if_block;
#[cfg(test)]
mod typescript_lxqt_lxqt_openssh_askpass_change_url;
#[cfg(test)]
mod typescript_lxqt_lxqt_panel_not_actually_ts_but_still;
#[cfg(test)]
mod typescript_th_ch_youtube_music_add_a_function_and_some_small_changes;
#[cfg(test)]
mod vimscript_chikamichi_mediawiki_add_one_autocmd;
#[cfg(test)]
mod vimscript_chikamichi_mediawiki_remove_3_lines;
#[cfg(test)]
mod vimscript_fedorenchik_qt_support_add_two_lines;
#[cfg(test)]
mod vimscript_fholgado_minibufexpl_massive_comment_reduction;
#[cfg(test)]
mod vimscript_idanarye_vim_merginal_add_one_call;
#[cfg(test)]
mod vimscript_jreybert_vimagit_move_one_line;
#[cfg(test)]
mod vimscript_m_pilia_vim_mediawiki_add_a_new_functon;
#[cfg(test)]
mod vimscript_preservim_tagbar_add_if_statements;
#[cfg(test)]
mod vimscript_protesilaos_tempus_themes_vim_add_terminal_color_scheme;
#[cfg(test)]
mod vimscript_protesilaos_tempus_themes_vim_change_two_values;
#[cfg(test)]
mod xml_adoptopenjdk_icedtea_web_update_version_string;
#[cfg(test)]
mod xml_antlr_antlr3_comment_out_part_of_code_interesting_case;
#[cfg(test)]
mod xml_eclipse_ee4j_jaxb_istack_commons_update_version_string;
#[cfg(test)]
mod xml_fasterxml_jackson_dataformat_xml_only_string_value_change;
#[cfg(test)]
mod xml_gap_packages_toric_remove_two_attributes;
#[cfg(test)]
mod xml_gpuopen_drivers_amdvlk_version_update;
#[cfg(test)]
mod xml_javacc_javacc_version_update;
#[cfg(test)]
mod xml_lincity_ng_lincity_ng_whitespace_only_change;
#[cfg(test)]
mod xml_megaglest_megaglest_data_update_url_path;
#[cfg(test)]
mod xml_veracrypt_veracrypt_version_string;
#[cfg(test)]
mod yaml_arkq_bluez_alsa_version_string;
#[cfg(test)]
mod yaml_containers_skopeo_remove_one_block_pair;
#[cfg(test)]
mod yaml_draios_sysdig_const_string_url_change;
#[cfg(test)]
mod yaml_draios_sysdig_string_url_change;
#[cfg(test)]
mod yaml_draios_sysdig_string_url_change_2;
#[cfg(test)]
mod yaml_draios_sysdig_string_url_change_3;
#[cfg(test)]
mod yaml_draios_sysdig_string_url_change_4;
#[cfg(test)]
mod yaml_kbudde_rabbitmq_exporter_string_url_change;
#[cfg(test)]
mod yaml_manugarg_pacparser_string_url_change;
#[cfg(test)]
mod yaml_python_xmp_toolkit_python_xmp_toolkit_insert_two_values_to_a_slice;