Skip to content

feat(git): add git worktree list --porcelain parser - #338

Merged
dlyongemallo merged 1 commit into
mainfrom
add_git_worktree_parser
Oct 8, 2026
Merged

dlyongemallo merged 1 commit into
mainfrom
add_git_worktree_parser

Conversation

@dlyongemallo

Copy link
Copy Markdown
Owner

Foundation for #334.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The isolated parser has broad test coverage, with only a nonblocking documentation correction remaining.

1 open finding
What changed in this PR

Adds a Git worktree porcelain parser as groundwork for the worktree overview requested in #334.

Changes:

  • Parses worktree paths, revisions, branches, flags, and reasons into typed entries.
  • Adds tests for supported formats, whitespace handling, and unknown attributes.
File Description
lua/​diffview/​vcs/​adapters/​git/​worktree.lua Introduces the worktree list parser.
lua/​diffview/​tests/​functional/​git_worktree_parser_spec.lua Tests parsing behavior and edge cases.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread lua/diffview/vcs/adapters/git/worktree.lua Outdated
@dlyongemallo
dlyongemallo force-pushed the add_git_worktree_parser branch from 59854e7 to 696b927 Compare October 8, 2026 11:37
@dlyongemallo
dlyongemallo merged commit d6f5718 into main Oct 8, 2026
8 checks passed
@dlyongemallo
dlyongemallo deleted the add_git_worktree_parser branch October 8, 2026 11:52
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.

2 participants