Skip to content

fix(vscode): use current remote default for diffs - #13263

Merged
marius-kilocode merged 2 commits into
mainfrom
investigate-chat-diff-count-mismatch
Aug 20, 2026
Merged

fix(vscode): use current remote default for diffs#13263
marius-kilocode merged 2 commits into
mainfrom
investigate-chat-diff-count-mismatch

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Kilo can use stale local origin/HEAD metadata when calculating branch diffs. Repositories that migrated from master to main can therefore show repository-scale totals even when the branch has only a small change.

Resolve the remote default branch with a read-only, bounded git ls-remote --symref query and cache the result. Keep local remote HEAD as the offline fallback, and use the shared resolver for new worktree defaults. Existing persisted worktree bases and explicit upstreams remain unchanged.

The reported case reproduced as +350043/-180697 against stale origin/master; the corrected comparison against origin/main is +110/-96 across 7 files.

Includes regression coverage for migrated trunks, legitimate master defaults, remote-unavailable fallback, resolver caching, and matching local diff targets.

@marius-kilocode
marius-kilocode merged commit 0ed0c65 into main Aug 20, 2026
23 of 24 checks passed
@marius-kilocode
marius-kilocode deleted the investigate-chat-diff-count-mismatch branch August 20, 2026 09:54
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