Archived
refactor(workspaces): drop the unused locked worktree flag
Nothing consumed GitWorktreeInfo.locked: a locked worktree is a real checkout and stays a usable workspace, so no caller needs to distinguish it. Unknown porcelain keys are already ignored, so parsing it was speculative. The parser test still feeds a real `locked` line and asserts it is ignored, and the service test still pins that a present, non-prunable worktree is kept, so the policy stays covered without the field.
This commit is contained in:
@@ -11,8 +11,6 @@ export interface GitWorktreeInfo {
|
||||
detached?: boolean;
|
||||
/** Git reports a linked worktree as prunable when its checkout directory no longer exists. */
|
||||
prunable?: boolean;
|
||||
/** Git reports a locked worktree with a bare `locked` line, optionally followed by a reason. */
|
||||
locked?: boolean;
|
||||
}
|
||||
|
||||
export async function isGitRepository(path: string): Promise<boolean> {
|
||||
@@ -46,7 +44,6 @@ export function parseGitWorktreeList(stdout: string): GitWorktreeInfo[] {
|
||||
if (key === "bare") info.bare = true;
|
||||
if (key === "detached") info.detached = true;
|
||||
if (key === "prunable") info.prunable = true;
|
||||
if (key === "locked") info.locked = true;
|
||||
}
|
||||
return info;
|
||||
}).filter((w) => w.path);
|
||||
|
||||
Reference in New Issue
Block a user