Skip to content

fix: guard against nil current worktree in porcelain parser#5373

Open
mango766 wants to merge 1 commit intojesseduffield:masterfrom
mango766:fix/worktree-parser-nil-guard
Open

fix: guard against nil current worktree in porcelain parser#5373
mango766 wants to merge 1 commit intojesseduffield:masterfrom
mango766:fix/worktree-parser-nil-guard

Conversation

@mango766
Copy link

Adds nil checks for current before accessing current.Head and current.Branch in the worktree porcelain output parser. This prevents a nil pointer panic when git produces unexpected output without a preceding "worktree" line.

Related: #5266
Closes #5372

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
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.

Potential nil dereference in worktree porcelain parser

1 participant