Skip to content

fix(file): match index buffer fileformat to working tree line endings#35

Merged
dlyongemallo merged 1 commit intomainfrom
fix_line_ending
Mar 12, 2026
Merged

fix(file): match index buffer fileformat to working tree line endings#35
dlyongemallo merged 1 commit intomainfrom
fix_line_ending

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Diffview’s staged (index) file buffers to better preserve line endings when users edit and write them back to the index.

Changes:

  • Detect CRLF in the working tree file for stage=0 (index) buffers.
  • Set the staged buffer’s fileformat to dos when CRLF is detected to avoid unintended newline conversion on write.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/vcs/file.lua
Comment thread lua/diffview/vcs/file.lua Outdated
Comment thread lua/diffview/vcs/file.lua
@dlyongemallo dlyongemallo merged commit 85e1a96 into main Mar 12, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the fix_line_ending branch March 12, 2026 09:10
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