fix(worktrees): detect external merges, clean up empty dirs, prune in owning repo

- ContentInMain: HEAD ancestor of the default branch or squash-merged
  (merge-tree == target tree), against local origin/<default> without fetch;
  list_worktrees mergedIntoMain and the overview modal ("merged (external)")
  use it, "Cleanup finished" takes clean Active rows that are in main
- cleanup_task_worktree skips the dirty check for a non-git directory
- prune / worktree remove / branch -D run in the repo owning the worktree
  (git-common-dir), not the list's working dir; branch already gone reports
  branchDeleted=true
This commit is contained in:
mika kuns
2026-10-02 09:07:43 +02:00
parent 9c015f34cc
commit 0c0bb7f24c
12 changed files with 333 additions and 22 deletions
@@ -555,6 +555,8 @@
"resolve": "Lösen",
"phantom": "Phantom",
"phantomTooltip": "Verzeichnis fehlt auf der Festplatte",
"mergedExternal": "gemergt (extern)",
"mergedExternalTooltip": "Die Commits sind schon im Default-Branch (lokaler origin-Stand, ohne Fetch), z.B. per Squash-PR. \"Abgeschlossene aufräumen\" entfernt ihn.",
"ctxShowDiff": "Diff anzeigen",
"ctxOpenInExplorer": "Im Explorer öffnen",
"ctxJumpToTask": "Zur Aufgabe springen",