@devries-cameron20 / t3code Mirror · read-only / commits / 8cd92150b1
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 16:00 UTC

test: use dynamic default branch in remote-base-ahead case

Co-authored-by: codex <codex@users.noreply.github.com>

Julius Marminge committed Mar 1, 2026 at 15:53 UTC 8cd92150b13a9b129b8d5cb26f91444d60ea6f55
1 file changed +9 -3
apps/server/src/git/Layers/GitCore.test.ts
+9 -3
@@ -1170,13 +1170,19 @@ it.layer(TestLayer)("git integration", (it) => {
1170 yield* git(remote, ["init", "--bare"]);
1171
1172 yield* initRepoWithCommit(source);
1173 + const initialBranch = (yield* listGitBranches({ cwd: source })).branches.find(
1174 + (branch) => branch.current,
1175 + )!.name;
1176 yield* git(source, ["remote", "add", "origin", remote]);
1174 - yield* git(source, ["push", "-u", "origin", "main"]);
1177 + yield* git(source, ["push", "-u", "origin", initialBranch]);
1178 yield* git(source, ["checkout", "-b", "feature/remote-base-only"]);
1176 - yield* writeTextFile(path.join(source, "feature.txt"), "ahead of origin/main\n");
1179 + yield* writeTextFile(
1180 + path.join(source, "feature.txt"),
1181 + `ahead of origin/${initialBranch}\n`,
1182 + );
1183 yield* git(source, ["add", "feature.txt"]);
1184 yield* git(source, ["commit", "-m", "feature commit"]);
1179 - yield* git(source, ["branch", "-D", "main"]);
1185 + yield* git(source, ["branch", "-D", initialBranch]);
1186
1187 const core = yield* GitCore;
1188 const details = yield* core.statusDetails(source);