ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Yuya Nishihara 62f0cb8c3f cli: change default log revset to not include all tagged heads
The default immutable_heads() includes tags(), which makes sense, but computing
heads(tags()) can be expensive because the tags() set is usually sparse. For
example, "jj bench revset 'heads(tags())'" took 157ms in my linux stable
mirror. We can of course optimize the heads evaluation by using bit set or
segmented index, but the query includes many historical heads if the repository
has per-release branches, which are uninteresting anyway. So, this patch
replaces heads(immutable_heads()) with trunk().

The reason we include heads(immutable_heads()) is to mitigate the following
problem. Suppose trunk() is the branch to be based off, I think using trunk()
here is pretty good.

```
A   B
*---*----* trunk() ⊆ immutable_heads()
     \
      * C
```
https://github.com/martinvonz/jj/pull/2247#discussion_r1335078879
2024-02-23 00:25:58 +09:00
..
examples Switch to ignore crate for gitignore handling. 2024-02-20 09:12:46 -08:00
src cli: change default log revset to not include all tagged heads 2024-02-23 00:25:58 +09:00
testing revset: ad-hoc optimization for range queries containing unwanted wanted heads 2024-02-22 23:26:29 +09:00
tests cli: change default log revset to not include all tagged heads 2024-02-23 00:25:58 +09: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 completion: Add support for Nushell completions 2024-02-18 19:08:38 +01:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00