libgit2/libgit2 — pull request #767 by tenderlove (2012-06-14 23:07:11+00:00)
Title: add errno to the git_error struct.

If an error occurs due to a problem on the OS, set errno on the error
struct so that users of libgit2 can programatically deal with OS errors.

I'm not 100% sure this pull request is correct. It looks like there is another function that calls `set_error` and doesn't have an errno. I'm also not sure what to do about windows. Maybe conditionally add the windows errno to the struct with a macro?

Anyway, I want to get access to errno in Ruby so that we can raise an Errno::ENOENT (or EPERM, etc) rather than raising a generic Rugged::OSError.