mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Git - expose random name generation for branches (#298938)
This commit is contained in:
@@ -867,10 +867,12 @@ export function getStashDescription(stash: Stash): string | undefined {
|
||||
return descriptionSegments.join(' \u2022 ');
|
||||
}
|
||||
|
||||
export const CopilotWorktreeBranchPrefix = 'copilot-worktree-';
|
||||
|
||||
export function isCopilotWorktree(path: string): boolean {
|
||||
const lastSepIndex = path.lastIndexOf(sep);
|
||||
|
||||
return lastSepIndex !== -1
|
||||
? path.substring(lastSepIndex + 1).startsWith('copilot-worktree-')
|
||||
: path.startsWith('copilot-worktree-');
|
||||
? path.substring(lastSepIndex + 1).startsWith(CopilotWorktreeBranchPrefix)
|
||||
: path.startsWith(CopilotWorktreeBranchPrefix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user