Consolidate close action logs into a single summary message
This commit is contained in:
parent
8b276036bf
commit
3bcea58729
|
|
@ -217,20 +217,19 @@ const closeAction = async (branch: string) => {
|
|||
const worktreeAbs = session?.worktree ?? join(homedir(), '.sandlot', basename(root), branch)
|
||||
|
||||
await git.removeWorktree(worktreeAbs, root)
|
||||
.then(() => console.log(`Removed worktree ${worktreeAbs}/`))
|
||||
.catch((e) => console.warn(`Failed to remove worktree ${worktreeAbs}: ${e.message}`))
|
||||
.catch((e) => console.warn(`Failed to remove worktree: ${e.message}`))
|
||||
|
||||
await unlink(join(root, '.sandlot', branch))
|
||||
.then(() => console.log(`Removed symlink .sandlot/${branch}`))
|
||||
.catch(() => {}) // symlink may not exist
|
||||
|
||||
await git.deleteLocalBranch(branch, root)
|
||||
.then(() => console.log(`Deleted local branch ${branch}`))
|
||||
.catch((e) => console.warn(`Failed to delete local branch ${branch}: ${e.message}`))
|
||||
.catch((e) => console.warn(`Failed to delete branch ${branch}: ${e.message}`))
|
||||
|
||||
if (session) {
|
||||
await state.removeSession(root, branch)
|
||||
}
|
||||
|
||||
console.log(`Closed session ${branch}`)
|
||||
}
|
||||
|
||||
// ── sandlot merge <branch> ──────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export async function removeWorktree(worktreePath: string, cwd: string): Promise
|
|||
|
||||
/** Delete a local branch. */
|
||||
export async function deleteLocalBranch(branch: string, cwd: string): Promise<void> {
|
||||
await $`git branch -D ${branch}`.cwd(cwd).nothrow()
|
||||
await $`git branch -D ${branch}`.cwd(cwd).nothrow().quiet()
|
||||
}
|
||||
|
||||
/** Checkout a branch. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user