Skip to content

Commit 32db114

Browse files
Copilotalexr00
andauthored
Use <folder-name>.worktrees/pr-<number> as default worktree path
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/280f22ec-34a1-44b7-a2e9-4d3e5f750748 Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent fb47cd9 commit 32db114

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/github/worktree.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export async function checkoutPRInWorktree(
4444
// Prepare for operations
4545
const repoRootPath = repositoryToUse.rootUri.fsPath;
4646
const parentDir = path.dirname(repoRootPath);
47-
const defaultWorktreePath = path.join(parentDir, `pr-${pullRequestModel.number}`);
47+
const repoFolderName = path.basename(repoRootPath);
48+
const defaultWorktreePath = path.join(parentDir, `${repoFolderName}.worktrees`, `pr-${pullRequestModel.number}`);
4849
const branchName = prHead.ref;
4950
const remoteName = pullRequestModel.remote.remoteName;
5051

0 commit comments

Comments
 (0)