Skip to content

Fix macOS hypa_read sed slicing and git worktree project-root detection - #91

Merged
matt-gribben merged 1 commit into
mainfrom
fix/89-macos-sed-worktree-root
Aug 6, 2026
Merged

Fix macOS hypa_read sed slicing and git worktree project-root detection#91
matt-gribben merged 1 commit into
mainfrom
fix/89-macos-sed-worktree-root

Conversation

@matt-gribben

Copy link
Copy Markdown
Collaborator

Summary

Fixes two independent macOS bugs reported in #89:

  1. hypa_read offset/limit on BSD sedbuildReadCommand() no longer passes -- to sed (BSD sed treats it as a filename). Relative paths starting with - get a ./ prefix so sed does not parse them as options. cat -- is unchanged.
  2. Git worktree project rootGitProjectRootDetector now treats a .git file (worktrees/submodules) as a root marker, not only a .git directory.

Bare-name spawn resolving non-executable cwd files is intentionally out of scope (follow-up).

Test plan

  • dotnet test tests/Hypa.UnitTests --filter FullyQualifiedName~GitProjectRootDetector (9 passed)
  • cd packages/pi-hypa && npm test (78 passed)
  • Implement skill review loop (general + tests) → 0 open issues
  • Final Codex xhigh pre-PR review → NO_BLOCKING_ISSUES

Closes #89

BSD sed rejects -- as end-of-options, so hypa_read offset/limit polluted
stderr and failed nonzero on macOS. Drop -- on the sed branch and prefix
leading-dash paths with ./ so sed does not parse them as options.

Git worktrees (and submodules) use a .git file rather than a directory;
treat either form as a project-root marker so hypa read resolves against
the worktree instead of walking past it.

Closes #89
Copilot AI review requested due to automatic review settings August 6, 2026 08:40
@matt-gribben matt-gribben added the bug Something isn't working label Aug 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@matt-gribben
matt-gribben merged commit f392592 into main Aug 6, 2026
9 checks passed
@matt-gribben
matt-gribben deleted the fix/89-macos-sed-worktree-root branch August 6, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: BSD sed breaks hypa_read offset/limit; git worktree breaks hypa read project-root detection

2 participants