Monorepo for Tangled tangled.org

make default branch required for repositories #600

Closed boltless.me
Closed opened by boltless.me

Repositories can currently be created without a default branch, causing the repository index page to appear empty. Enforce a default branch for all repositories to ensure repository content is accessible and the index page functions correctly.

For Knot, this means it will fallback to some branch when no configured default branch is not found.

For XRPC lexicon, this means defaultBranch will be a required field in output schema.

For AppView/KnotMirror, no changes yet. Wait until most repos to have a default branch for backwards compatibility.

Yes, that's current behavior and I'd like to change that since it's unpredictable and could end up in broken state.

Say you create an empty repo (default branch set to main as default knot settings) and push tangled.org/core to it (using master). Now the repo has no default branch.

Ohh right I see what you mean now.

That clears things up, thanks 😄

default branch is owned by required on lexicon. org.tangled.git.refs requires it, so every repository has a default branch. It might pointing to non-existing ref though.

Sign up or Sign in to add to the discussion.