ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Yuya Nishihara 9a5b001d58 templater: add SizeHint type to represent revset.count_estimate() value
We'll probably add binary comparison operators at some point, but this patch
also adds size_hint.zero() method. Otherwise, we'll have to write
"if(x.upper() && x.upper() == 0, ..)" to deal with None.

The resulting "branch list" template will look like:
```
separate(", ",
  if(!ref.tracking_ahead_count().zero(),
    if(ref.tracking_ahead_count().exact(),
      "ahead by " ++ ref.tracking_ahead_count().exact() ++ " commits",
      "ahead by at least " ++ ref.tracking_ahead_count().lower() ++ " commits")),
  if(!ref.tracking_behind_count().zero(),
    if(ref.tracking_behind_count().exact(),
      "behind by " ++ ref.tracking_behind_count().exact() ++ " commits",
      "behind by at least " ++ ref.tracking_behind_count().lower() ++ " commits")),
)
```
2024-05-09 08:51:34 +09:00
..
examples revset: support custom filter extensions 2024-05-06 10:42:01 -04:00
src templater: add SizeHint type to represent revset.count_estimate() value 2024-05-09 08:51:34 +09:00
testing revset: add support for file(kind:pattern) syntax 2024-04-07 19:43:29 +09:00
tests templater: add helper method that unwraps Option<T> property 2024-05-09 08:51:34 +09:00
build.rs
Cargo.toml cargo: explicitly indicate paths to publish 2024-04-15 20:37:00 -07:00
LICENSE