Skip to content

Conversation

@rutu1717
Copy link

@rutu1717 rutu1717 commented Nov 3, 2025

This PR fixes issue #1621 where local Windows paths (e.g., C:/... or C:...) were incorrectly parsed as SCP/SSH endpoints, causing go-git to attempt SSH connections for local repositories.

Changes
Added a platform-specific guard to prevent Windows drive-letter paths from being treated as SCP-like.
Ensured that such paths are parsed as file endpoints.
Added a Windows-only regression test (transport_windows_test.go) to verify that [NewEndpoint("C:/...")] and [NewEndpoint("C:\...")] return protocol "file".

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.

1 participant