fix: add support for intent-to-add ([ A]) git status code#141
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for the git status porcelain XY code [ A] (intent-to-add via git add -N) by introducing a new ChangeType and wiring it through parsing + rendering tests, along with updated parsing documentation.
Changes:
- Add
ChangeUnstagedNewFileand map it to display metadata (message/state/group). - Extend porcelain v1 decoding to recognize
y == 'A'as an unstaged “new file” (intent-to-add), plus regression fixtures/tests. - Add renderer golden tests/fixtures and update git status XY documentation references.
Reviewed changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/gitstatus/gitstatus.go | Adds new ChangeType variant and display metadata. |
| internal/gitstatus/porcelainv1/process.go | Updates embedded XY documentation and adds .A/[ A] decoding path. |
| internal/gitstatus/porcelainv1/process_test.go | Adds unit coverage for extracting change types from " A". |
| internal/gitstatus/porcelainv1/golden_test.go | Adds regression test case using issue #86 fixture; refactors fixture root selection. |
| internal/gitstatus/testdata/issue86.* | Adds user-submitted regression fixtures (v1/v2, text and -z forms). |
| internal/gitstatus/porcelainv1/testdata/*.porcelain-v1z.bin | Adds binary -z fixtures used by golden tests. |
| internal/cmd/status/render_test.go | Adds rendering test case for the new unstaged “new file” change type. |
| internal/cmd/status/testdata/statuslist-intent_to_add.*.golden | Adds golden outputs for the new render test case. |
| docs/git-status-parsing.md | Updates ChangeType count/table to include the new variant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
323653d to
e142b3e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mroth
added a commit
that referenced
this pull request
Feb 21, 2026
These were the last two currently known unhandled XY codes from the git status short format. ` R` and ` C` caused a fatal parse error; compound codes like `MR` or `CR` silently dropped the unstaged rename/copy. Follows the same pattern established in #141 for intent-to-add [.A]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mroth
added a commit
that referenced
this pull request
Feb 21, 2026
These were the last two currently known unhandled XY codes from the git status short format. ` R` and ` C` caused a fatal parse error; compound codes like `MR` or `CR` silently dropped the unstaged rename/copy. Follows the same pattern established in #141 for intent-to-add [.A]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mroth
added a commit
that referenced
this pull request
Feb 21, 2026
…des (#142) These were the last two currently known unhandled XY codes from the git status short format. ` R` and ` C` caused a fatal parse error; compound codes like `MR` or `CR` silently dropped the unstaged rename/copy. Follows the same pattern established in #141 for intent-to-add [.A]. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
ChangeUnstagedNewFilevariant to handle the[ A]porcelain status code produced bygit add -N(intent-to-add) and Jujutsu colocated reposCloses #86, closes #53