Skip to content

Conversation

kapral18
Copy link

@kapral18 kapral18 commented Sep 13, 2025

Fixes: #4890

  • Fix file status parsing to handle Git copy operations when status.renames=copies is configured
  • Extend status parser to recognize both "R" (rename) and "C" (copy) prefixes
  • Add comprehensive test coverage for copy status codes

The same issue from #4890
now is fixed

image

Fixes jesseduffield#4890

When Git is configured with status.renames=copies, it can produce
status codes starting with "C" (copy) in addition to "R" (rename).
The file loader was only checking for "R" prefixes, causing copy
operations to be parsed incorrectly and breaking file staging.

This fix extends the status parser to handle both "R" and "C"
prefixes, ensuring proper support for Git's copy detection feature.

Fixes file staging issues when using status.renames=copies configuration.
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.

git config status.renames=copies messes up staging
1 participant