Skip to content

bug(git): a failing git worktree list (not a timeout) reads as 'not a repository' #1462

Description

@Juliusolsson05

Found while verifying #1450. Make a repo with a linked worktree, then make its .git/worktrees/<name> folder unreadable. git worktree list fails outright rather than timing out, and the runner in src/main/ipc/git.ts turns every git failure into '', so the list is {worktrees: [], timedOut: false}. That is the same as 'not a repository', and resolveRepoRootAfterGit returns the worktree folder as the repository. This is the q126 false-repository result through a non-timeout path. Failures other than 'not a repository' should be reported as unknown, never as empty.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions