You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(jujutsu)!: expose the bookmark distance as a template method
BREAKING CHANGE: the fetch_ahead_counter and ahead_icon options are
gone, finishing the fetch-option removal for jujutsu. ClosestBookmarks
now returns only the undecorated bookmark names, memoized so repeated
template references cost a single jj call. The distance to the closest
bookmark moves to a new lazy AheadCount template method - referencing
it is the fetch trigger, following git's StashCount pattern: the extra
jj log call runs on first use, memoized per render through unexported
fields gob snapshots never carry, reuses ClosestBookmarks' memoized
query for the bookmark it measures from, and returns 0 on error or
when no bookmark exists.
Configs with fetch_ahead_counter: true lose the inline decoration
inside .ClosestBookmarks and compose it in the template instead, e.g.
{{ if gt .AheadCount 0 }}{{ .AheadCount }}{{ end }} with an icon of
choice - ahead_icon existed only for that decoration. The dead keys
keep parsing silently. Docs, schema and the studio's recorded segment
data follow.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M4RA9ZrP7vuqVSR7nddNiQ
|`change_id_min_len`|`int`|`0`|`ChangeID` will be at least this many characters, even if a shorter one would be unique |
42
40
|`ignore_working_copy`|`boolean`|`true`| don't snapshot/update the working copy |
43
-
|`fetch_ahead_counter`|`boolean`|`false`| fetch a counter for number of changes between working copy and closest bookmark |
44
-
|`ahead_icon`|`string`|`\u21e1`| icon/character between bookmark and ahead counter |
45
41
|`native_fallback`|`boolean`|`false`| when set to `true` and `jj.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `jj` executable to fetch data. Not all information can be displayed in this case |
46
42
|`status_formats`|`map[string]string`|| a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides |
47
43
@@ -64,6 +60,7 @@ ignored silently in existing configs.
64
60
|`.ChangeIDPrefix`|`string`| The shortest unique prefix of the working copy change ID |
65
61
|`.ChangeIDRest`|`string`| The additional portion displayed after `.ChangeIDPrefix` to satisfy `change_id_min_len`; empty when the unique prefix already meets or exceeds that minimum |
66
62
|`.ClosestBookmarks`|`string`| Closest bookmark(s) on ancestors |
63
+
|`.AheadCount`|`int`| Number of changes between the working copy and the closest bookmark; fetched lazily when referenced, e.g. `{{ if gt .AheadCount 0 }}\u21e1{{ .AheadCount }}{{ end }}`|
67
64
68
65
`.ChangeIDRest` is not the remainder of the full canonical change ID and isn't independently usable as an identifier.
0 commit comments