Let the tool enumerate its own refs #94

Merged
a73x merged 1 commit from worktree-agent-aeb2c1c864fe8890a into main 2026-08-13 14:54:14 +00:00
a73x commented 2026-08-13 14:52:17 +00:00 (Migrated from git.a73x.sh)

git for-each-ref 'refs/collab/*' prints nothing and exits 0 — its globs do not cross /, while git2's references_glob (which git-collab uses internally, and which the revision-ref design depends on) does. The wrong guess is silent.

Adds git-collab refs: every ref under refs/collab/, classified — issue, patch events, patch revision, and the two superseded shapes (bare <id>, numbered r/<n>) — with a summary line answering 'does this repo hold a legacy layout?' and --json carrying full ids, full OIDs, and legacy/total counts.

It is the one command excluded from the layout migration run performs on entry to every other one: a command that migrates before it looks answers its own question, always with 'none'. Tested over a repo holding both layouts at once, and asserted to leave the ref store byte-identical.

git-collab-server refs is the roster-scale version for the audit blocking e5096ffc: per-repository counts, legacy refs named in full under --json, no lock or writability probe, and a non-zero exit if any repository could not be read.

README's Storage section now documents which for-each-ref patterns work (refs/collab with no glob, or refs/collab/**).

TDD: tests/refs_test.rs written first, watched fail on 'unrecognized subcommand', then implemented. Full suite 1304 passed / 0 failed, cargo clippy --all-targets silent, tui_review_test run 5x with no variance (14 passed, 2.84s each).


Migrated from git-collab patche e55d15a264c00d613c740b41f8878d7b88300977.

Original author: a73x dev@a73x.sh.

Fixes #89

Revision 1: 9a13fc36a85adc6fc8bf9fcd05de2f842ca6e0cf; base 7a13f30a42c2d394b7a9f033b035a66e85842574

`git for-each-ref 'refs/collab/*'` prints nothing and exits 0 — its globs do not cross `/`, while git2's `references_glob` (which git-collab uses internally, and which the revision-ref design depends on) does. The wrong guess is silent. Adds `git-collab refs`: every ref under `refs/collab/`, classified — issue, patch events, patch revision, and the two superseded shapes (bare `<id>`, numbered `r/<n>`) — with a summary line answering 'does this repo hold a legacy layout?' and `--json` carrying full ids, full OIDs, and `legacy`/`total` counts. It is the one command excluded from the layout migration `run` performs on entry to every other one: a command that migrates before it looks answers its own question, always with 'none'. Tested over a repo holding both layouts at once, and asserted to leave the ref store byte-identical. `git-collab-server refs` is the roster-scale version for the audit blocking e5096ffc: per-repository counts, legacy refs named in full under `--json`, no lock or writability probe, and a non-zero exit if any repository could not be read. README's Storage section now documents which for-each-ref patterns work (`refs/collab` with no glob, or `refs/collab/**`). TDD: tests/refs_test.rs written first, watched fail on 'unrecognized subcommand', then implemented. Full suite 1304 passed / 0 failed, `cargo clippy --all-targets` silent, tui_review_test run 5x with no variance (14 passed, 2.84s each). --- Migrated from git-collab patche `e55d15a264c00d613c740b41f8878d7b88300977`. Original author: a73x <dev@a73x.sh>. Fixes #89 Revision 1: `9a13fc36a85adc6fc8bf9fcd05de2f842ca6e0cf`; base `7a13f30a42c2d394b7a9f033b035a66e85842574`
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/git-collab!94
No description provided.