Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lua/gitsigns/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,13 @@ function M.cygpath(path, mode)

async.schedule()

return assert(vim.split(stdout, '\n')[1])
local result = vim.split(stdout, '\n')[1]
-- Strip trailing newline/carriage return that may be present in cygpath output on MSYS2
if result then
result = result:match('^(.-)[\r\n]*$')
end

return assert(result)
end

--- Flattens a nested table structure into a flat array of strings. Only
Expand Down
Loading