Skip to content

fix(core): fetch a repository from the remote the config names - #243

Merged
safl merged 3 commits into
mainfrom
repository-prep-remote
Oct 31, 2026
Merged

safl merged 3 commits into
mainfrom
repository-prep-remote

Conversation

@safl

@safl safl commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

core.repository_prep now points an existing checkout's origin at repository.remote before fetching, so a config that moves a repository to another remote, as AiSIO's fil pin did from safl/fil to xnvme/fil, checks out what that remote has. Released as v0.9.70; the bump is the last commit.

Test gap: a new test with two local bare repos on the initiator fails without the fix and passes with it; shallow clones, SSH targets and a tag both remotes have at different commits are not exercised.

@safl safl mentioned this pull request Oct 30, 2026
10 of 19 tasks
@coveralls

coveralls commented Oct 30, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41178499686

Warning

No base build found for commit 4a9c98e on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 64.463%

Details

  • Patch coverage: 2 uncovered changes across 1 file (8 of 10 lines covered, 80.0%).

Uncovered Changes

File Changed Covered %
src/cijoe/core/scripts/repository_prep.py 9 7 77.78%
Total (2 files) 10 8 80.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 3175
Covered Lines: 2102
Line Coverage: 66.2%
Relevant Branches: 1212
Covered Branches: 726
Branch Coverage: 59.9%
Branches in Coverage %: Yes
Coverage Strength: 0.66 hits per line

💛 - Coveralls

safl added 3 commits October 31, 2026 07:52
repository_prep clones only when repository.path does not exist, so a
config that moves repository.remote to another repository, as from a
fork to upstream, left an existing checkout fetching from the remote it
was cloned from. A branch or tag that only the new remote has then
failed to check out. Origin is now set to repository.remote before
fetching, or added where the checkout has none.

Tags are fetched with --force, since git otherwise keeps a tag the old
remote had at another commit, and checks out the old commit without a
word. A clone that failed now says so, rather than failing later as a
missing origin.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Simon A. F. Lund <os@safl.dk>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Simon A. F. Lund <os@safl.dk>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Simon A. F. Lund <os@safl.dk>
@safl
safl force-pushed the repository-prep-remote branch from 360345e to 966e472 Compare October 31, 2026 06:54
@safl
safl merged commit a882bb4 into main Oct 31, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants