From d6ab7ca2d9fde0ff6a80fe89add2bdeaaa83e18f Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Tue, 17 Mar 2026 11:46:24 +0000 Subject: [PATCH] Use partial fetch (blob:none) for metadata session sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip downloading blobs when fetching the remote metadata branch during push recovery. The merge only needs the tree structure to combine entries — blobs are already local or fetched on demand by git. Co-Authored-By: Claude Opus 4.6 (1M context) Entire-Checkpoint: 56094f38982e --- cmd/entire/cli/strategy/push_common.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/entire/cli/strategy/push_common.go b/cmd/entire/cli/strategy/push_common.go index b6fbea2dd..159c847e7 100644 --- a/cmd/entire/cli/strategy/push_common.go +++ b/cmd/entire/cli/strategy/push_common.go @@ -158,8 +158,11 @@ func fetchAndMergeSessionsCommon(ctx context.Context, target, branchName string) fetchedRefName = plumbing.NewRemoteReferenceName(target, branchName) } - // Use git CLI for fetch (go-git's fetch can be tricky with auth) - fetchCmd := exec.CommandContext(ctx, "git", "fetch", target, refSpec) + // Use git CLI for fetch (go-git's fetch can be tricky with auth). + // Use --filter=blob:none for a partial fetch that downloads only commits + // and trees, skipping blobs. The merge only needs the tree structure to + // combine entries; blobs are already local or fetched on demand. + fetchCmd := exec.CommandContext(ctx, "git", "fetch", "--filter=blob:none", target, refSpec) fetchCmd.Stdin = nil if output, err := fetchCmd.CombinedOutput(); err != nil { return fmt.Errorf("fetch failed: %s", output)