Skip to content
zit Artifact [4c71fd1164]
Login

Artifact [4c71fd1164]

Artifact 4c71fd1164eca03a8b14e81cc027cf1f3d9733975713ea98ad1dcbcb7c0d1e00:

Instance of technote [00cd7e37bf] - Line counts are opt-in; merge-tree records a clean merge by dmestas on 2026-10-08 22:35:00.
C Line\scounts\sare\sopt-in;\smerge-tree\srecords\sa\sclean\smerge
D 2026-10-08T22:32:46.002
E 2026-10-08T22:35:00 00cd7e37bf743c399ac81f6c02b0873cba6a8c89
N text/x-markdown
U dmestas
W 1537
0.3.40 put line counts in the `zit crosslink` stream: a `lines ADDED REMOVED`
line under each `file` line. It counted them for every caller, and the first
run over a long history paid for one diff per changed file, many times
longer than the run had taken before.

From 0.3.41 the counts are opt-in. **A forge that reads `lines` lines must
call `zit crosslink --lines`.** Without the flag the stream is what 0.3.39
printed, and costs what it cost. A consumer that never read `lines` lines
needs no change.

With `--lines` nothing else changed: the counts match
`zit diff --numstat --checkin`, binary files are `- -`, and a cache written by
0.3.40 is reused. Each check-in is still counted once, ever. A shun no longer
throws those counts away. It recounts only the check-ins that touch a path
the shunned content was written to, and they drop the `lines` line for that
file.

0.3.41 also lets `zit merge-tree --commit` record a clean merge. Until now it
recorded a merge only when there were conflicts to settle, and refused a
clean one, the common case, so a forge had no way to merge from the web
without opening a checkout. Now

```
zit merge-tree feat --into trunk --commit -m "merge feat" --user NAME \
  --expect-current TRUNK_TIP --expect-other FEAT_TIP
```

records on trunk the check-in `zit merge feat` and `zit commit` would make in
a checkout of trunk. The `--expect-*` guards still apply, and a `--resolved`
file or `--delete` path is refused, since nothing conflicts. The source may
be any check-in, not only a branch tip.

Z 4bd39601aed66ade226abcb09d8421a3