You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changes totals silently compare against master when origin/HEAD is missing #30058
The desktop sidebar showed millions of added lines for a branch containing only a few thousand additions relative to its intended integration branch, develop.
Diagnosis
In version 0.1.5, resolveBaseBranchForNoUpstream in apps/server/src/vcs/GitVcsDriverCore.ts checks branch-specific comparison settings, then the remote's default branch, then falls back to main and master.
In the affected repository, origin/HEAD was missing and no branch-specific comparison override existed. T3 selected origin/master, although the intended base was origin/develop.
The displayed total exactly matched Git's additions against origin/master. Setting origin/HEAD to origin/develop and refreshing corrected it.
Please make the selected comparison base visible alongside the total, and consider exposing a repository-wide comparison-base setting.
Steps to reproduce
Use a repository with divergent master and develop branches and corresponding remote-tracking refs.
Check out a feature branch based on develop.
Ensure origin/HEAD is absent and the feature branch has no T3 comparison-base override.
Open the checkout in T3 Code and inspect the sidebar Changes total.
Observe that it reflects comparison against master, rather than develop.
These conditions were confirmed in an existing repository; a standalone reproduction repository has not been created.
Version
0.1.5, confirmed for both desktop client and local server.
Environment
Linux x64; desktop app connected to a local server.
Evidence
Read-only Git comparisons reproduced the displayed inflated total against origin/master and the expected smaller total against origin/develop. Before the workaround, resolving refs/remotes/origin/HEAD failed because the symbolic ref was absent.
Related issues
#25578: inflated changes resolved by selecting Uncommitted; different cause. #17807: missing origin/HEAD affected worktree cleanup. #27657: configurable base for creating new worktrees; different operation.
Fix applied or workaround
git remote set-head origin develop
The user ran this command and confirmed that refreshing corrected the count. This changes the local remote-default reference shared by linked worktrees.
Activity