mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-19 00:33:20 +00:00
plan: add archive tag before delete
This commit is contained in:
@@ -336,6 +336,10 @@ export async function closeMultiModel(options: CloseSessionOptions): Promise<Clo
|
|||||||
await runCommand(["git", "worktree", "remove", "-f", worktree.path]);
|
await runCommand(["git", "worktree", "remove", "-f", worktree.path]);
|
||||||
worktreesRemoved.push(worktree.path);
|
worktreesRemoved.push(worktree.path);
|
||||||
|
|
||||||
|
// Create an archive tag before deleting the branch for safe recovery
|
||||||
|
const archiveTag = `archive/${worktree.branch}`;
|
||||||
|
await runCommand(["git", "tag", archiveTag, worktree.branch]);
|
||||||
|
|
||||||
await runCommand(["git", "branch", "-D", worktree.branch]);
|
await runCommand(["git", "branch", "-D", worktree.branch]);
|
||||||
branchesDeleted.push(worktree.branch);
|
branchesDeleted.push(worktree.branch);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user