Fix branch-off worktree upstream tracking (#1002)

This commit is contained in:
Mohamed Boudra
2026-05-13 17:06:51 +00:00
committed by GitHub
parent 5c7a6397da
commit 05c12a9c5c
3 changed files with 50 additions and 1 deletions
@@ -1269,6 +1269,14 @@ const x = 1;
await pushCurrentBranch(repoDir);
execFileSync("git", ["--git-dir", remoteDir, "show-ref", "--verify", "refs/heads/feature"]);
const upstream = execFileSync(
"git",
["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"],
{ cwd: repoDir },
)
.toString()
.trim();
expect(upstream).toBe("origin/feature");
});
it("lists merged local and remote branch suggestions with provenance", async () => {
+1 -1
View File
@@ -1277,7 +1277,7 @@ async function resolveWorktreeSourcePlan({
return {
branchName: newBranchName,
metadataBaseRefName: normalizedBaseBranch,
addArguments: ["-b", newBranchName, base],
addArguments: ["-b", newBranchName, "--no-track", base],
};
}
case "checkout-branch": {