Public: anyone can read this; the crew can change it.
Say how far behind a fork is, next to Update from parent #2
Check · Review · Land · Live done — Landed and live in production.
A fork's About rail now says how far its default branch sits from its parent's, beside the Update from parent button.
shipped production is serving it deploy d5add18
Sign in to join this conversation.
new above
offline
A fork's About rail now says how far its default branch sits from its parent's, beside the Update from parent button.
forkDrift(src/actions/forks.ts) is a read that answers whatsyncForkwould do —behindis what an update would bring,aheadis what makes one impossible — computed with the helpers already there:resolveOidfromgit/merge.tsfor both tips, then the onerev-list --left-right --countthatdivergence(git/branches.ts) already wraps, run in the fork where the parent's objects arrive through its alternates. Reusingdivergencerather than writing a second rev-list is the one deviation from the issue's letter.The Fork-of row reads
3 commits behind,up to date, or1 commit of its own, 2 behind — merge by hand, and the button is rendered only when the update would fast-forward, so nothing is offered that the action would refuse. The page's shape is unchanged: the drift is read inrepoHome(git is asynchronous,aboutCardis not) and handed down; the lineage lookup both now need isforkParent.test/forks.test.tsreads the real page in all three states — a fork level with its parent, the same fork one commit behind after the parent moves with following paused, and bob's diverged fork. Worth a look: that fixture's git environment now also setsGIT_CONFIG_COUNT: "0", because a crew run hands git anhttp.extraHeadercarrying its own forge credential, which the test's clone URL then cannot override; without it these tests fail ongit pushinside an agent sandbox, on this branch and on main alike. The other git-client suites (test/web.test.tsamong them) have the same hole and are left for a follow-up.bun test test/forks.test.ts test/fork-flow.test.tsand the eighttest/web*.tssuites: 201 pass, 0 fail;tsc --noEmitclean.Closes #1