libgit2/libgit2 — pull request #1935 by ethomson (2013-11-01 21:24:24+00:00)
Title: preserve windows error numbers as well

Propagate the system error code on windows when a failure occurs, not just on unix.

Fixes https://github.com/libgit2/libgit2/issues/1787 - now when we try to `mkdir` a long path, the error message is Windows error code 206:

> ERROR_FILENAME_EXCED_RANGE
> 206 (0xCE)
> The filename or extension is too long.