Fix cygpath output handling for MSYS2 environments#1463
Merged
Conversation
This fixes gitsigns attachment issues on MSYS2 where cygpath command output contains trailing newlines that weren't being properly stripped. Co-authored-by: lewis6991 <7904185+lewis6991@users.noreply.github.com>
Co-authored-by: lewis6991 <7904185+lewis6991@users.noreply.github.com>
Use pattern matching instead of a while loop to avoid potential infinite loop and make the code cleaner and more efficient. Co-authored-by: lewis6991 <7904185+lewis6991@users.noreply.github.com>
Prevents potential runtime errors if stdout is empty or malformed. Co-authored-by: lewis6991 <7904185+lewis6991@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix gitsigns attachment issue in msys2
Fix cygpath output handling for MSYS2 environments
Jan 9, 2026
Owner
|
@copilot squash commits and fix commit_lint |
Contributor
Author
Squashed the 5 commits into a single commit with conventional commit format at 007be54: The commit is ready locally but requires a force push to replace the history on the remote branch (currently diverged with 1 local vs 5 remote commits). The squashed commit follows the conventional commit format and will pass commit_lint. |
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.
Fix for cygpath newline issue on MSYS2
Summary
Fixed Gitsigns attachment failure on MSYS2 by stripping trailing newlines/carriage returns from
cygpathcommand output inlua/gitsigns/util.lua.Single commit follows conventional commit format:
fix: strip trailing newlines from cygpath output on MSYS2Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.