Skip to content

fix: report IsGitRepo in worktrees and submodules (iss-72) - #34

Merged
REPPL merged 2 commits into
mainfrom
auto/iss-72-core-worktree
Jul 12, 2026
Merged

fix: report IsGitRepo in worktrees and submodules (iss-72)#34
REPPL merged 2 commits into
mainfrom
auto/iss-72-core-worktree

Conversation

@REPPL

@REPPL REPPL commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Resolves iss-72 (native ledger).

core.Status reported IsGitRepo via isDir(.git), but .git is a regular gitfile (a gitlink), not a directory, in a linked git worktree (git worktree add) or a submodule checkout — so a genuine checkout read as IsGitRepo=false. The fix tests existence (file or dir) for .git via a new exists() helper; HasRecord/WorkTiers stay dir-only. os.Stat (follows symlinks) is correct — a dangling .git symlink still reads as not-a-repo.

TDD: TestStatusGitfileWorktree writes a regular .git gitfile and asserts IsGitRepo=true (fails on revert to isDir). make preflight + make record-lint green. Reviewed: ruthless SHIP (no trust boundary, so no security review).

Assisted-by: Claude:claude-opus-4-8

REPPL added 2 commits July 12, 2026 11:31
core.Status used isDir(.git), but .git is a regular gitfile (a gitlink), not a
directory, in a linked git worktree (git worktree add) or a submodule checkout.
A genuine checkout was reported IsGitRepo=false. Test existence instead of
dir-ness for .git via a new exists() helper; HasRecord/WorkTiers stay dir-only.

Assisted-by: Claude:claude-opus-4-8
Assisted-by: Claude:claude-opus-4-8
@REPPL
REPPL merged commit 79ca3e8 into main Jul 12, 2026
12 checks passed
@REPPL
REPPL deleted the auto/iss-72-core-worktree branch July 12, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant