Skip to content

Fetch checkpoint refs by URL to avoid polluting origin config#934

Merged
Soph merged 5 commits intomainfrom
soph/fix-remote
Apr 13, 2026
Merged

Fetch checkpoint refs by URL to avoid polluting origin config#934
Soph merged 5 commits intomainfrom
soph/fix-remote

Conversation

@Soph
Copy link
Copy Markdown
Collaborator

@Soph Soph commented Apr 13, 2026

This does three things:

  • adding a setting to enable fetch filtering for entire/checkpoints/v1 branches
  • use the direct remote url instead of the remote name so a .git/config setting is only created for the url not the remote in general impacting all branches
  • add an integration test guard that checks if operations touch .git/config and only allow expected changes.

Note:

Running 0.5.4 introduced fetches which will cause a change in the .git/config like:

[remote "origin"]
    promisor = true
    partialclonefilter = blob:none

This was an unintentional result of the changes when fetching

git fetch --filter=blob:none <remote-name> persists
remote.<name>.promisor=true and remote.<name>.partialclonefilter=blob:none
into .git/config. Since #712, the four fetch helpers in git_operations.go
passed "origin" as a named remote, which turned users' origin into a
promisor remote repo-wide — affecting future `git fetch origin` / `git pull`
and not just checkpoint reads.

Resolve origin's URL first and pass the URL as both CheckpointGitCommand
target and the remote argument. Anonymous URL fetches do not touch
remote.*.promisor / remote.*.partialclonefilter in local config.

Adds a regression test that fails against the pre-fix code and passes
after. Does not yet unstick the config on users who already ran the
affected CLI — that cleanup is a follow-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 4e0f55d5b407
@Soph Soph requested a review from a team as a code owner April 13, 2026 08:57
Copilot AI review requested due to automatic review settings April 13, 2026 08:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the metadata/v2 fetch helpers to fetch checkpoint-related refs by explicit origin URL (instead of the origin remote name) to prevent git fetch --filter=... from persisting partial-clone settings into remote.origin.* in .git/config.

Changes:

  • Add strategy.OriginURL() helper to resolve the configured origin fetch URL.
  • Update multiple git fetch --filter=blob:none code paths to fetch by URL rather than remote name.
  • Add a regression test asserting these fetch helpers do not set remote.origin.promisor / remote.origin.partialclonefilter.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
cmd/entire/cli/strategy/checkpoint_remote.go Exposes OriginURL() to retrieve the origin remote URL for URL-based fetches.
cmd/entire/cli/git_operations.go Switches several partial-clone fetch commands to use origin URL to avoid config pollution.
cmd/entire/cli/fetch_no_config_pollution_test.go Adds regression coverage to ensure origin config is not modified by these fetches.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d958ed4. Configure here.

@Soph Soph merged commit 462843b into main Apr 13, 2026
9 checks passed
@Soph Soph deleted the soph/fix-remote branch April 13, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants