Repository navigation
Conversation
Signed-off-by: RudyCelekli <[email protected]>
morluto
approved these changes
Oct 6, 2026
morluto
left a comment
Owner
There was a problem hiding this comment.
Approve: linked-worktree HEAD resolution via gitfile pointer + commondir fallback matches gitrepository-layout, preserving detached-HEAD/packed-refs and abort/dirty semantics. Real git init/worktree/pack-refs/detach + CRLF + abort test coverage. Checks green.
Owner
|
Thanks, @rudycelekli, for your work on “fix(reference): read linked worktree commit provenance.” I appreciate your contribution to REA. |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
Signed-off-by: RudyCelekli <[email protected]>
2 tasks done
3 tasks
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.
Problem
Reference-source import reports
vcs.kind: unknownfor a normal linked Git worktree on a branch, losing its commit provenance. Its HEAD is local to the worktree while the branch ref lives in Git's common directory.Change
Read gitfile and commondir metadata without executing Git. Resolve the worktree's own HEAD against shared loose/packed refs; preserve detached HEAD and Git's private per-worktree ref namespaces. Do not infer dirty state.
The routing follows Git's repository layout.
Verification
Native Git creates an owned repository and a linked branch with a genuinely different commit:
npm run test:focused -- tests/boundary/filesystem/referenceSourceVcs.test.ts: passed. Also checks primary checkout, packed refs, detached linked HEAD, relative gitfile with CRLF and cancellation. The repository and worktree are temporary and cleaned through the repository fixture.npm run check: all five tasks passed.AI-assisted reproduction, implementation and independent source review.