Repository navigation
fix(writ): writ repo set uses the clone an earlier run left, gives the branch asked for, and says what it did - #1126
Merged
David-Noble-at-work merged 6 commits intoOct 22, 2026
Conversation
… the branch asked for, and says what it did (#983)
…e branch asked for by either form, and says what it found and did (#983)
… is handed over (#983)
… their own, and plannedRoot takes no branch, for the linters; the plan's gate box, ticked in error, is unticked (#983)
…s PR script is handed over (#983)
…/983-writ-repo-set-refuses-a-url
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.
Summary
Lane 45 of #949.
writ repo set <layer> <url>refused any existing destination, so a clone that landed and whose registration then failed made the same command fail on the rerun, against the idempotency ruling ("running the same command again is the recovery"). A destination that is a git working tree whose remote is the URL given (D1: compared as written) is now registered without cloning again; anything else there is refused, saying what it holds: not a git working tree, or a clone of another remote, named.--branchapplies to a path as well as a URL. For a tree already on disk (D2):git fetch origin;git switch <branch>, which creates it from origin's when only origin has it, and is refused, registering nothing, when the branch is nowhere or uncommitted changes would be overwritten; thengit merge --ff-only origin/<branch>when it is behind, a branch with commits origin lacks being left as it is. Without--branchthe tree is left on what it has checked out. A fresh clone takesgit clone --branch, as before.--branchdoes.TestRepo_Set_Errors' branch case, fail againstrepo_cmd.gobefore the fix and pass with it.docs/plans/fix/983-writ-repo-set-refuses-a-url.md.Resolves #983
Test plan
repo_cmd.goand pass with the fix;make testmake check-allWritten with AI assistance.
Signed-off-by: David Noble [email protected]
Assisted-by: Claude Code
Time
Computed by the algorithm of noblefactor-ops#188 at merge.