libgit2/libgit2 — pull request #1140 by jamill (2012-12-13 18:45:29+00:00)
Title: Transport resolution on Win32 should handle absolute local paths

Current libgit2 logic to detect URLs without an explicit transport does not work for absolute paths on Win32. There are (at least) the following issues:
1. The check on git_paths_exists return value seems incorrect
2. absolute paths in windows will have an ":" character in them, so we cannot always treat these as SSH paths.

Having libgit2 consumers always qualify local paths with "file://" does not seem to be a great workaround, as these URLs can be stored in the `git_remote` structure. For instance, I can clone using msysgit using an absolute path, and the URL stored for the remote will be the absolute path. Now, if I want to perform fetch / push operations from LibGit2Sharp, it seems akward that I would have to load the remote, check the URL, determine if it is a local path, and if so, prefix the URL path in memory to have "file://"

While I did not modify the check for the SSH path, it does not seem correct to me either. As is, URLs of the form "my_bogus_transport://" would be treated as an SSH transport, which I don't think is the intent. Also, just because a path has a ":" character, does that rule it out from being a local path on other platforms?

/cc @carlosmn, @ben, @ethomson