Skip to content

Commit 1b6b241

Browse files
fix(server): remote status keeps a local upstream named without a slash
statusDetailsRemote passed the upstream from readCurrentUpstreamRef (already stripped of refs/heads/ or refs/remotes/) through a remote/branch parser, so a local upstream such as main came back null and the status dropped the upstream and its divergence. Use the ref as read. Fixes #35752 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 810cc3b commit 1b6b241

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎apps/server/src/vcs/GitVcsDriverCore.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,10 +2098,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
20982098
branch = branchNameFromHeadRef(branchResult.stdout);
20992099
}
21002100
const currentUpstreamRef = yield* readCurrentUpstreamRef(cwd);
2101-
let upstreamRef =
2102-
currentUpstreamRef === null
2103-
? null
2104-
: (parseUpstreamRefByFirstSeparator(currentUpstreamRef)?.upstreamRef ?? null);
2101+
let upstreamRef = currentUpstreamRef;
21052102
// Trimming a remote that starts with Unicode whitespace can leave a leading slash.
21062103
if (currentUpstreamRef?.startsWith("/")) {
21072104
upstreamRef = (yield* resolveCurrentUpstream(cwd, currentUpstreamRef))?.upstreamRef ?? null;

0 commit comments

Comments
 (0)