| ... | ... | @@ -1170,13 +1170,19 @@ it.layer(TestLayer)("git integration", (it) => { |
| 1170 | 1170 | yield* git(remote, ["init", "--bare"]); |
| 1171 | 1171 | |
| 1172 | 1172 | yield* initRepoWithCommit(source); |
| 1173 | const initialBranch = (yield* listGitBranches({ cwd: source })).branches.find( |
| 1174 | (branch) => branch.current, |
| 1175 | )!.name; |
| 1173 | 1176 | yield* git(source, ["remote", "add", "origin", remote]); |
| 1174 | | yield* git(source, ["push", "-u", "origin", "main"]); |
| 1177 | yield* git(source, ["push", "-u", "origin", initialBranch]); |
| 1175 | 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 | ); |
| 1177 | 1183 | yield* git(source, ["add", "feature.txt"]); |
| 1178 | 1184 | yield* git(source, ["commit", "-m", "feature commit"]); |
| 1179 | | yield* git(source, ["branch", "-D", "main"]); |
| 1185 | yield* git(source, ["branch", "-D", initialBranch]); |
| 1180 | 1186 | |
| 1181 | 1187 | const core = yield* GitCore; |
| 1182 | 1188 | const details = yield* core.statusDetails(source); |