Skip to content
zit Tech-note 00cd7e37bf
Login

Tech-note 00cd7e37bf

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.