Repository navigation
Conversation
Git stores branches as paths, so a plain `godspeed` branch blocks every `godspeed/<name>` branch and worktree chats failed to start in that repo. Such names now flatten to a sibling (`godspeed-<name>`), and a branch nested under a candidate name counts as taken, for both creation and the title rename. Inspired by: pingdotgg/t3code@1917c8a33a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What T3 added (pingdotgg/t3code@1917c8a33a): worktree threads still get their generated branch when the repo has a plain branch named
t3. Git stores branches as paths, sorefs/heads/t3blocks everyt3/...branch. T3 flattens such names to a sibling (t3-fix) and treats a branch nested under a candidate name as taken.Godspeed had the same bug. If a repo has a local branch named
godspeed(or whatever the branch prefix is minus its slash),git worktree add -b godspeed/<name>fails with "cannot lock ref", so no worktree chat can start in that repo.How Godspeed does it now (
crates/engine/src/repos.rs):free_branch_name(desired, locals)returns the name to create: flattened (godspeed-quiet-fox) when a parent path is a local branch, orNonewhen the name or a branch nested under it is taken, so the name loop tries another.create_worktree_with_branchreads the local branches once (for-each-ref refs/heads) and picks the name and branch together. It still checks remote-stripped names as before.rename_worktree_branch(title rename) uses the same check. A flattened branch renames togodspeed-<title-slug>because the prefix comes from the branch minus the folder name.Also updates the T3-WATCH ledger (reviewed through t3code@8760d063e9) and T3-GAPS.
Tests
branches_blocked_by_a_parent_or_nested_ref_get_a_free_name(unit test) anda_branch_named_like_the_prefix_does_not_block_worktrees(real git: creates a worktree with agodspeedbranch present, then renames it after a title).cargo build -p godspeed✅,cargo check --workspace --tests✅,cargo test -p zeron-enginelib: 788 passed ✅.mainwithout this change:git_actions_gh pull_requests_and_publishing_go_through_gh(an extraapi graphqlgh call) andlocal_first local_runtime_checks_public_releases_without_starting_edge_links/online_runtime_shutdown_...(loopback/network).device_routingfailed once under load and passed when rerun alone.What to check by eye: in a repo, run
git branch godspeed, then start a chat with a new worktree. It should start ongodspeed-<adjective>-<noun>, and after the first title it should be renamed togodspeed-<title>. Screenshots not available (engine-only change).🤖 Generated with Claude Code