Skip to content

Fixes --find-root for git worktrees#53

Open
nhojb wants to merge 1 commit into
boyter:masterfrom
nhojb:fix-find-root
Open

Fixes --find-root for git worktrees#53
nhojb wants to merge 1 commit into
boyter:masterfrom
nhojb:fix-find-root

Conversation

@nhojb
Copy link
Copy Markdown

@nhojb nhojb commented Jun 3, 2026

Fixes --find-root for git worktrees #52

Unlike gocodewalker.FindRepositoryRoot, the fix recognizes git worktrees, where .git is a regular file (containing "gitdir: …") rather than a directory — so a nested worktree resolves to its own root instead of the enclosing repo.

@pr-insights pr-insights Bot added L/complexity Low complexity S/size Small change labels Jun 3, 2026
@pr-insights pr-insights Bot added M/complexity Normal or medium complexity M/size Normal or medium sized change and removed S/size Small change L/complexity Low complexity labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M/complexity Normal or medium complexity M/size Normal or medium sized change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant