Skip to content

Delete worktree: name a locked worktree and ignored nested repositories before confirming #233

Closed

Description

@yansfil

The task you are doing when you want this

Deleting a linked worktree from its sidebar row menu.

What hide does today

Since #224 the Delete worktree… dialog warns about uncommitted changes, nested worktrees, unmerged or unpushed commits and running agents, and asks for Discard before a destructive removal.
A locked worktree (git worktree lock) is not named: the removal reaches Git, Git refuses, and the dialog shows Git's raw refusal after the panes are already closed.
A Git repository inside an ignored folder (for example a clone under target/ or node_modules/) is deleted with the worktree once Discard is ticked, but the Discard line does not mention it.

What it should do instead

A locked worktree shows its own warning before the operator confirms, with Git's lock reason when there is one and the action that unlocks it.
The Discard line names each ignored nested repository it will delete.

Where the authority for it lives

The worktree facts in hide-host/src/worktrees.rs, the deletion gate in herdr-core/src/worktrees.rs, and the dialog in web/src/workspaceManage.ts and web/src/WorkspaceDialogs.tsx.
Follow-up of #224 and #228.

Activity

  1. added
    enhancement
    on Sep 28, 2026
  2. yansfil commented on Oct 5, 2026

    @yansfil
    ContributorAuthor

    #367(ed0992ee, 2026-10-04)로 main에 들어갔습니다.
    삭제 확인은 이제 pane을 닫기 전에 이루어지고, 잠긴 worktree는 Git의 lock 이유와 unlock 방법을 확인 전에 보여줍니다.
    Discard 줄은 함께 지워질 ignored 저장소를 하나씩 적고, 그 조사를 못 하면 삭제를 막고 복구 방법을 보여줍니다.
    #367이 이 이슈를 Related:로만 걸어서 자동으로 닫히지 않았습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions