diff --git a/.agents/skills/poteto-mode/scripts/worktree-audit.sh b/.agents/skills/poteto-mode/scripts/worktree-audit.sh index 11a410f..dc328a9 100755 --- a/.agents/skills/poteto-mode/scripts/worktree-audit.sh +++ b/.agents/skills/poteto-mode/scripts/worktree-audit.sh @@ -28,7 +28,9 @@ cd "$repo" || exit 1 git rev-parse --git-dir >/dev/null 2>&1 || { echo "error: not a git repo: $repo" >&2; exit 1; } # Main worktree is the first entry; everything else is a candidate. -main_wt=$(git worktree list --porcelain | awk '/^worktree /{print $2; exit}') +main_wt=$(git worktree list --porcelain -z | while IFS= read -r -d '' field; do + case "$field" in "worktree "*) printf '%s' "${field#worktree }"; break ;; esac +done) if [ -z "$base" ]; then for cand in "$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null)" origin/main origin/master; do @@ -76,7 +78,8 @@ now=$(date +%s) echo "# base: $base" printf "SIZE\tAGE\tMERGED\tDIRTY\tREMOTE\tPR\tLAST_CHAT\tBUCKET\tWORKTREE\n" -git worktree list --porcelain | awk '/^worktree /{print $2}' | while read -r wt; do +git worktree list --porcelain -z | while IFS= read -r -d '' field; do + case "$field" in "worktree "*) wt=${field#worktree } ;; *) continue ;; esac [ "$wt" = "$main_wt" ] && continue size=$(du -sh "$wt" 2>/dev/null | awk '{print $1}') diff --git a/UPSTREAM.md b/UPSTREAM.md index cb23224..e242849 100644 --- a/UPSTREAM.md +++ b/UPSTREAM.md @@ -11,4 +11,6 @@ The port moves skills to `.agents/skills/`, replaces the manifests with `.codex- Future upstream syncs must skip the Benny automation pack (`pstack/automations/benny/`). +`.agents/skills/poteto-mode/scripts/worktree-audit.sh` carries a patch over the pin. The patch reads worktree paths with `git worktree list --porcelain -z` and passes each full path to git. The pinned script splits those paths on whitespace. Keep the patch until cursor/plugins ships its own fix for that split. On that sync, take upstream's script verbatim and remove the patch and this note. + This repository targets Codex only. It does not register Cursor or Claude Code compatibility layouts. External Slack/tracker integrations, event runners, and repository-specific verification tools remain prerequisites for the workflows that use them.