PR https://github.com/entireio/cli/pull/712 introduced "blob:none" fetching for the entire/checkpoints/v1 branch and we got this report: :wave: It looks like this change changes settings across the whole repo, not just the checkpoints branch. Was that the intention?
Assistant· claude-opus-4-6
Confirmed — the reviewer's concern is legitimate. Here's what's happening:
When git fetch --filter=blob:none origin ... runs against a named remote (not a URL), git persists two settings to .git/config:
code
User
sounds good, but the bigger issue: we need to fix this now for customers, right?
Assistant· claude-opus-4-6
Right — the code fix alone isn't enough. Every user who has run the CLI since #712 merged already has this in their local .git/config:
Those entries don't go away when they update the CLI. So we need two things:
Code fix — stop writing the config in the first place (approach 1: fetch by URL).
Cleanup / migration — on an appropriate entrypoint (e.g., next hook run or entire enable / startup), detect and unset these on if entire put them there. Something like:
Idempotent, cheap, safe to run on every invocation.
User
yeah let's ship the code fix
Assistant· claude-opus-4-6
Pausing before I start editing to answer your question:
Yes — mostly fine if checkpoint_remote points to a separate URL.
Reason: all the callsites that go through strategy/checkpoint_remote.go (FetchMetadataBranch(ctx, remoteURL), FetchV2MainFromURL, etc.) pass a URL string as the remote argument, not a remote name. When git fetch --filter=blob:none <URL> <refspec> runs with an anonymous URL, git does not write remote.<name>.promisor / remote.<name>.partialclonefilter into .git/config — there's no named remote to attach those to. The filter is applied to the transient fetch; git stores the resulting pack with a sidecar, but none of your named remotes (including ) get their config mutated.
User
yes
Assistant· claude-opus-4-6
Now update the four fetch callsites in git_operations.go:
Assistant· claude-opus-4-6
Now FetchMetadataTreeOnly:
Assistant· claude-opus-4-6
Build passes. Now format, lint, and test.
Assistant· claude-opus-4-6
All tests pass. Let me also run integration tests since this touches git fetch behavior.
Assistant· claude-opus-4-6
Integration tests pass. Let me also look at the FetchV2MainTreeOnly unused err — wait, it's used in the if err != nil check. Let me re-check there's no unused variable warning.
Assistant· claude-opus-4-6
Good — lint already passed so no issues. Let me write a regression test that verifies partial-clone config doesn't leak to origin:
Assistant· claude-opus-4-6
Test passes. Let me also verify by temporarily reverting my fix and confirming the test fails (catching the bug):
FetchMetadataBranch, FetchMetadataTreeOnly, FetchV2MainTreeOnly, FetchV2MainRef: resolve origin's URL first and pass the URL (not ) as both the target and the remote argument in the fetch command. Git does not persist / for anonymous URL-based fetches, so origin's config stays untouched.
User
can you do a commit first
Assistant· claude-opus-4-6
Committed as d958ed408 on soph/fix-remote. Want me to proceed with the cleanup migration for existing users' polluted configs?
cli/git_operations.go:489FetchV2MainRef — "origin" ← newly changed in this PR to add --filter=blob:none
The FetchV2MainRef change in particular flips a previously full fetch on origin into a filtered one, which is what would have triggered the report.
Mitigations (any of these works):
Fetch by resolved URL instead of the remote name (mirrors what the strategy/ callsites do). This is the cleanest.
Run the filtered fetch under a different, entire-owned remote (e.g. configure remote.entire-checkpoints.url = <origin url> and fetch from that), so remote.origin.* is untouched.
Pass -c remote.origin.promisor= / unset partialclonefilter immediately after — fragile, not recommended.
Want me to push a fix that resolves origin's URL once and switches the git_operations.go fetches over to URL-based fetches (approach 1)?
One subtlety for the cleanup: we can't perfectly tell whether we set those or whether the user intentionally has a partial clone. A reasonable heuristic: only unset if both values match exactly what we used to write (promisor=true + partialclonefilter=blob:none) and the repo doesn't otherwise look like a partial clone (e.g., no core.repositoryformatversion=1 with extensions.partialclone set to origin). If we want to be safer, we can gate behind a one-time migration flag stored in .git/entire-sessions/ so we only attempt cleanup once per repo.
Before I start: do you want me to
(a) ship a minimal fix now — approach 1 + unconditional unset on origin at hook startup, behind a one-time migration marker, or
(b) be more conservative and only unset when we detect the exact pair we wrote, no marker?
I'd lean (a) for speed — the blast radius of removing those two keys on origin is small (users rarely run partial clones against origin on purpose in the repos entire is used in), and a migration marker makes it a one-shot.
.promisor
origin
The polluting callers are all in cli/git_operations.go, which fetch from "origin" (named remote) with the filter. Those write the sticky remote.origin.* config and affect the whole repo.
No checkpoint_remote (default — entire uses origin for checkpoints too) → origin config polluted. ❌ This is what the user reported.
One small caveat worth calling out: even with URL-based fetches, the resulting .promisor packs in .git/objects/pack/ mean git gc treats the repo as having promisor packs. That's benign under normal use (git handles it), but it is a tiny footprint we leave behind. Not a behavior change from the user's perspective.
Want me to proceed with just fixing the origin-name callsites in git_operations.go (the only ones that cause the reported behavior), or also scrub the .promisor pack footprint?
"origin"
CheckpointGitCommand
remote.*.promisor
remote.*.partialclonefilter
Updated the FetchMetadataBranch doc comment to call out the rationale.
Regression test that sets up a bare remote + clone, invokes FetchMetadataBranch and FetchMetadataTreeOnly, and asserts remote.origin.promisor / remote.origin.partialclonefilter are still unset afterward.
Verified the test fails against the pre-fix code (both subtests fail with the expected messages) and passes with the fix.
Still outstanding (not done in this patch — flag if you want it now):
Cleanup/migration for existing users. Anyone who ran the CLI between #712 and this fix has remote.origin.promisor=true and remote.origin.partialclonefilter=blob:none stuck in their local .git/config. The code fix alone doesn't unstick those; we'd need to unset them on next hook run (idempotent, safe if we gate on the exact pair we wrote). Happy to do that as a follow-up commit — it's a small, focused change.
FetchBlobsByHash still passes "origin" as remote name, but it doesn't use --filter, so it's not a config-pollution vector. Left as-is.
Token-injection tests in strategy/checkpoint_token_test.go still exercise the URL path, which remains unchanged.
Want me to follow up with the cleanup migration for existing .git/config pollution?