Repository navigation
fix: resolve local excludes through Git in linked worktrees (#446) - #455
Open
kiki830621 wants to merge 1 commit into
Open
kiki830621 wants to merge 1 commit into
kiki830621 wants to merge 1 commit into
Conversation
Use --git-path info/exclude in both third-party setup callers while preserving patterns and helper behavior. Execute the actual skill blocks in isolated ordinary, linked-worktree, and separate-git-dir fixtures. Refs #446
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linked worktree 中的
idd-issue與idd-config原本將本機排除規則寫進 worktree 專用管理目錄,helper 雖回傳成功,Git 卻不讀取該檔案。本次將兩處 target 改為git rev-parse --git-path info/exclude,使.claude/.idd/與既有 legacy 設定檔確實被忽略。Refs #446
修改範圍
main(da47674a8bd25cdbb0d8fec5872a0ac0792cea56)為基礎;實際路徑為plugins/issue-driven-dev/skills/{idd-issue,idd-config}/SKILL.md。.gitignore行為。scripts/tests/git-exclude-callers/,由現有run-all-tests.sh自動收錄。測試直接擷取並執行兩份 SKILL.md 中的 third-party exclude Bash 區塊,不複製呼叫指令。Helper 評估與其他 PR
main的 helper 目前僅檢查 basename;#431 的較嚴格路徑驗證仍在 PR #448。已讀取該實作:它確認<git-dir>/info/exclude屬於真實 Git 管理目錄,但仍接受 linked worktree 中 Git 不會讀取的專用 exclude 路徑。本次採最小呼叫端修正,不新增 helper 拒絕條件。修正後的 common-directory 路徑可通過 main 與 PR #448 兩種 helper;已將 #448 helper 放入隔離副本實際執行全部六組新回歸案例,全部通過。若另行收緊 helper,舊呼叫端會由成功變成 exit 2,這屬額外契約變更,解決本 issue 並不需要。直接傳入舊的錯誤路徑仍不受 helper 防護,本 PR 不宣稱已封堵所有外部錯誤呼叫。
既有
idd-edit-helper.py::_ensure_ignored已採用相同的--git-path解析,無須修改。PR #402 調整兩處相鄰的$CLAUDE_PLUGIN_ROOT寫法;本 PR 保留該行,整合時應保留兩邊各自修改。驗證
git check-ignoreexit 1;其他配置通過。git check-ignore、git status、三種設定檔、未忽略的對照檔、既有使用者規則、重複執行位元組不變與單一 marker 區塊;linked worktree 額外檢查 common exclude 對主工作樹生效,且未建立無效的 worktree 專用 exclude。GIT_*與 shell 啟動注入設定,隔離 HOME/Git 設定/templates。另以帶有GIT_DIR、GIT_WORK_TREE、GIT_COMMON_DIR、GIT_INDEX_FILE和 indexed config 的外部測試 repository 驗證:測試通過,外部 repository 的檔案位元組不變,未建立外部 index。bash plugins/issue-driven-dev/scripts/run-all-tests.sh→ 64 suites, 0 failed(隔離 Git 環境並安裝專案固定版本的 Python 相依套件)。git diff --check通過。測試只使用空白的暫存設定檔,診斷不輸出設定檔內容。本機重跑:
等待專案既有 review/驗證與結案流程;未合併,未關閉 issue。