mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
fix(clv2): use -e instead of -d for .git check in detect-project.sh
In git worktrees, .git is a file (not a directory) containing a gitdir pointer. The -d test fails for worktree checkouts, causing project detection to fall through to the "global" fallback. Changing to -e (exists) handles both regular repos and worktrees correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ _clv2_detect_project() {
|
||||
# fall back to path hash (machine-specific but still useful)
|
||||
local remote_url=""
|
||||
if command -v git &>/dev/null; then
|
||||
if [ "$source_hint" = "git" ] || [ -d "${project_root}/.git" ]; then
|
||||
if [ "$source_hint" = "git" ] || [ -e "${project_root}/.git" ]; then
|
||||
remote_url=$(git -C "$project_root" remote get-url origin 2>/dev/null || true)
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user