Skip to content

feat(topic): a root with no commits of its own takes its state from its joined checkouts - #8

Merged
antonzherdev merged 1 commit into
mainfrom
anton/topic-state-from-joined
Oct 23, 2026
Merged

antonzherdev merged 1 commit into
mainfrom
anton/topic-state-from-joined

Conversation

@antonzherdev

@antonzherdev antonzherdev commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

A workspace repository that only declares the others has nothing of its own to merge: a task in it changes the repositories it joins. Today git topic list never calls such a task merged, a squash-merged checkout whose branch the host deleted shows as N not pushed, and finish waits for a release on a checkout that follows a branch.

Now list, status and finish share one test for each joined checkout, per checkout branch (feat and feat@v1 apart):

  1. Pin follows a branch (named, or no revision): merged once that branch holds the change by content. finish takes it back to its pin; status says merged into BRANCH.
  2. Pin is a release or commit: merged only by git upgrade, as before.
  3. Nothing lost: commits the followed branch (for a release, the default branch) holds by content count as pushed.

The root is merged when its own commits are merged, as before, or when it has none and every joined checkout is merged or unchanged, one with a change. finish fetches each branch-following store first; a failed fetch is a warning.

Tests: tests/it/topic_state.rs (6).

Lazy dependencies are in #5; each PR stands alone. Every open PR regenerates docs/test-catalog.md, so whichever merges later needs GITSCALE_UPDATE_CATALOG=1 cargo test --test it catalog:: after rebasing.

https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH

…ts joined checkouts

A workspace repository that only declares the others has nothing of its
own to merge, so `topic list` and `topic status` call it merged once every
joined checkout is merged into the branch its pin follows, by content, or
has no change. A checkout pinned to a release still waits for `git
upgrade`.

`list`, `status` and `finish` share one test for a joined checkout. A
checkout whose pin follows a branch that holds its change no longer blocks
`finish`, its commits count as held by that branch rather than by the
default branch, and a squash-merged checkout whose remote branch is gone
no longer counts as unpushed.

Claude-Session: https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH
@antonzherdev
antonzherdev force-pushed the anton/topic-state-from-joined branch from 72d0029 to b1d9c14 Compare October 23, 2026 07:58
@antonzherdev
antonzherdev merged commit 75ba7a7 into main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant