jj/lib
Ilya Grigoriev 19d341d32a Templater: naive implementation of shortest prefix highlight for ids
This creates a templater function `short_underscore_prefix` for commit and
change ids. It is similar to `short` function, but shows one fewer hexadecimal
digit and inserts an underscore after the shortest unique prefix.

Highlighting with an underline and perhaps color/bold will be in a follow-up
PR.

The implementation is quadratic, a simple comparison of each id with every
other id. It is replaced in a subsequent commit. The problem with it is that,
while it works fine for a `jj`-sized repo, it becomes is painfully slow with a
repo the size of git/git. 

Still, this naive implemenation is included here since it's simple, and could
be used as a reference implementation. 

The `shortest_unique_prefix_length` function goes into `repo.rs` since that's
convenient for follow-up commits in this PR to have nicer diffs.
2023-01-17 22:01:09 -08:00
..
gen-protos cargo: bump prost-build from 0.11.5 to 0.11.6 2023-01-13 21:24:02 +00:00
src Templater: naive implementation of shortest prefix highlight for ids 2023-01-17 22:01:09 -08:00
tests let branches and remote_branches revset functions take needles as arguments 2023-01-16 12:15:30 +05:30
testutils Fix random seed in all tests that use testutils::user_settings 2023-01-15 10:15:44 -08:00
build.rs
Cargo.toml cargo: drop dependency on "uuid" 2023-01-14 23:48:02 +09:00