mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02: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:
parent
fec871e1cb
commit
04f8675624
2 changed files with 240 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue