ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Yuya Nishihara d0168199f0 templater: add general-purpose template engine for value types
This serves the role of the formatter in Mercurial, but the provided features
are rather restricted compared to mercurial.formatter. That's because both
implementation language "Rust" and jj's template language are statically typed.

The current implementation works well for simple commands like "config list -T",
but it might be not okay for "branch list -T". If we implement branch templating
by using the generic mechanism, the commit summary part would have to be
evaluated as a separate template:

  -T 'branch_name ++ target_commit_summary' (target_commit_summary: Template)

instead of

  -T 'branch_name ++ commit_summary(target_commit)' (target_commit: Commit)

where the branch template language is a superset of the commit template
language.
2024-03-06 11:38:57 +09:00
..
examples cli: extract CommandError and helper functions to new module 2024-03-03 01:11:46 +09:00
src templater: add general-purpose template engine for value types 2024-03-06 11:38:57 +09:00
testing revset: ad-hoc optimization for range queries containing unwanted wanted heads 2024-02-22 23:26:29 +09:00
tests tests: fix some failures on windows due to a missing TEMP environment variable 2024-03-05 15:16:38 +08:00
build.rs build: update rerun-if conditions to watch .git/HEAD in colocated repo 2023-08-06 12:16:11 +09:00
Cargo.toml templater: add similarity hint to no such method/keyword errors 2024-02-28 09:03:04 +09:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00