ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli/tests
Martin von Zweigbergk fefe07b3c3 diff: consider uncommon words to match only if they have the same count
Patience diff starts by lining up unique elements (e.g. lines) to find
matching segments of the inputs. After that, it refines the
non-matching segments by repeating the process. Histogram expands on
that by not just considering unique elements but by continuing with
elements of count 2, then 3, etc.

Before this commit, when diffing "a b a b b" against "a b a b a b", we
would match the two "a"s in the first input against the first two "a"s
in the second input. After this patch, we ignore the "a"s because
their counts differ, so we try to align the "b"s instead.

I have had this commit lying around since I wrote the histogram diff
implementation in 1e657c5331. I vaguely remember thinking that the
way I had implemented it (without this commit) was a bit weird, but I
wasn't sure if this commit would be an improvement or not. The bug
report from @chooglen today of a case where we behave differently from
Git is enough to make me think that we make this change after all.

#761
2024-07-09 20:35:36 +09:00
..
common
cli-reference@.md.snap cli: recursively create clone destination path 2024-07-07 23:02:41 +02:00
runner.rs backout: add initial tests 2024-07-05 17:11:37 +08:00
test_abandon_command.rs
test_acls.rs cli: rename jj file print (formerly jj cat) to jj file show 2024-06-26 17:11:16 -07:00
test_advance_branches.rs
test_alias.rs cli: create jj file list and deprecate jj files 2024-06-17 14:13:36 -04:00
test_backout_command.rs backout: accept multiple revisions to back out 2024-07-07 17:58:10 +08:00
test_branch_command.rs cli: show commit summary at end of "branch set" 2024-07-06 10:12:43 +09:00
test_builtin_aliases.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_checkout.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_commit_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_commit_template.rs cli_util: short-prefixes for commit summary in transaction 2024-07-08 08:23:39 -05:00
test_concurrent_operations.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_config_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_copy_detection.rs copy-tracking: add a command line driver with a simple test 2024-07-03 20:26:30 -04:00
test_debug_command.rs
test_describe_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_diff_command.rs diff: highlight word-level changes in git diffs 2024-07-05 16:07:12 +09:00
test_diffedit_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_duplicate_command.rs
test_edit_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_file_chmod_command.rs cli: rename jj file print (formerly jj cat) to jj file show 2024-06-26 17:11:16 -07:00
test_file_print_command.rs cli: rename jj file print (formerly jj cat) to jj file show 2024-06-26 17:11:16 -07:00
test_fix_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_generate_md_cli_help.rs
test_git_clone.rs cli: recursively create clone destination path 2024-07-07 23:02:41 +02:00
test_git_colocated.rs cli: show commit summary at end of "branch create" 2024-07-06 10:12:43 +09:00
test_git_fetch.rs cli: branch: drop support for deprecated --glob option 2024-06-21 09:43:23 +09:00
test_git_import_export.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_git_init.rs git init: add revset alias for trunk() when intializing with existing git repository 2024-07-04 23:04:19 +08:00
test_git_push.rs cli: show commit summary at end of "branch set" 2024-07-06 10:12:43 +09:00
test_git_remotes.rs cli: git: add jj git remote set-url command 2024-06-23 12:31:43 +10:00
test_git_submodule.rs
test_gitignores.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_global_opts.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_immutable_commits.rs cli: show commit summary at end of "branch set" 2024-07-06 10:12:43 +09:00
test_init_command.rs
test_interdiff_command.rs
test_log_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_move_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_new_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_next_prev_commands.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_obslog_command.rs diff: consider uncommon words to match only if they have the same count 2024-07-09 20:35:36 +09:00
test_operations.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_parallelize_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_rebase_command.rs feat(rebase): Rename --skip-empty to --skip-emptied. 2024-07-04 12:13:02 +10:00
test_repo_change_report.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_resolve_command.rs
test_restore_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_revset_output.rs cli: show commit summary at end of "branch create" 2024-07-06 10:12:43 +09:00
test_root.rs
test_shell_completion.rs
test_show_command.rs
test_sparse_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_split_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_squash_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_status_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_tag_command.rs
test_templater.rs
test_undo.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_unsquash_command.rs windows: avoid UNC paths in run_ui_editor 2024-07-04 11:30:20 +10:00
test_untrack_command.rs cli: create jj file list and deprecate jj files 2024-06-17 14:13:36 -04:00
test_util_command.rs commit_builder: reset author timestamp on discardable commits 2024-06-29 08:35:53 -05:00
test_working_copy.rs cli: create jj file list and deprecate jj files 2024-06-17 14:13:36 -04:00
test_workspaces.rs workspace: abandon discardable working copy on forget 2024-07-04 19:37:56 -05:00