fj has no git tag commands and branch support is read-only (list-only), forcing fj api/raw git for ref mutation #121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
fjhas no git tag commands at all, and its branch support is read-only. A team scripting releases or branch cleanup againstfjmust drop tofj apior raw git for every mutation, which is the raw-API fallback the tool exists to remove.fj repo(src/cli/repo.rs:256-277) exposesbranchesand nothing else for refs:branchesis list-only (src/cli/repo.rs:571, handler just renders a table); there is no branch create, delete, or rename. The API layer confirms the ceiling: the only ref helper insrc/api/islist_branches(src/api/repo_core.rs:246). There is nocreate_branch,delete_branch,list_tags,create_tag, ordelete_taganywhere:Note
fj repo topicsis unrelated: in Forgejo "topics" are the discovery keywords on a repo, not git tags.Forgejo serves all of this already:
GET/POST/DELETE /repos/{owner}/{repo}/branches, andGET /repos/{owner}/{repo}/tags,GET .../tags/{tag},POST .../tags,DELETE .../tags/{tag}. So the gap is entirely at the CLI/api-helper layer.The read-but-not-write shape mirrors the PR-label gap tracked in
rasterstate/fj#110:fj repo brancheslists refs the CLI then gives you no way to mutate.Why it matters
Branch and tag mutation is routine scripted-forge work, and it is the one class of forge operation where
fjcurrently has zero coverage:POST .../tagswith a target SHA) has to either shell out togit tag && git push(needs a writable checkout and push credentials) or callfj apiby hand.fj release createcreates an annotated release but a lightweightfj tag create v1.2.3 <sha>has no equivalent.feature/*branch" is a common post-merge cleanup. Today it isfj repo branches --json | jq ... | xargs -I{} fj api -X DELETE /repos/o/r/branches/{}, defeating the point of having a CLI.fj tag listto feedgit log <prev>..<this>is a basic building block that simply isn't there; you mustfj api /repos/o/r/tags.fjalready covers the heavier, less-frequent ref operations (branch protection viafj protect, releases viafj release), which makes the absence of the lightweight, high-frequency tag/branch verbs more surprising, not less.Possible directions (sketches)
fj tag list/fj tag view <tag>/fj tag create <tag> [--target <sha>] [-m <msg>]/fj tag delete <tag> -y, backed by new thinsrc/api/helpers over the/repos/{o}/{r}/tagsendpoints. Mirror the existingfj milestone/fj labelCRUD shape (list/view/create/delete with--jsonand a typed-confirmation delete).fj repowithbranch-create <name> [--from <ref>]andbranch-delete <name> -y(or afj branchgroup), backed bycreate_branch/delete_branchhelpers over/repos/{o}/{r}/branches. The existinglist_branches(src/api/repo_core.rs:246) is the read half already.tag list/branchlist--jsonfrom the start so they compose into changelog and cleanup pipelines without re-scraping tables (consistent with the--jsondirection inrasterstate/fj#109).Converted to backlog item rasterstate/fj#132 (p2, size L).