libgit2/libgit2 — pull request #961 by arrbee (2012-09-28 23:03:16+00:00)
Title: Win64 cleanups

Okay, so I figured out why I was seeing test failures on Windows that no one else seems to be seeing...

I was testing with the 64-bit build on Windows 7 64-bit, but I have a 32-bit version of msysgit installed. This meant that libgit2 was not finding the `c:\Program Files (x86)\Git\etc\gitconfig` file. That meant that the tests thought that symlinks are supported on the platform. That meant that in the `git_checkout` tests, when there was symlink in the index, the diff code converted the apparent type change into a REMOVE / ADD pair, but there is a latent bug in `git_checkout` that an ADD is unexpected and results in a failure.

I will open a separate PR to deal with the typechange issues in diff, status, and checkout, because it is actually a much larger issue if we are going to really match core git.

This PR fixes a bunch of Win64 build warnings, cherry picks one of @csware's commits from #952 (to find msysgit via the registry), and implements the rest of the msysgit environment variable expansions, but in a slightly different manner than #952 just because I don't trust that we won't have to change them again in the future.

If we merge this PR, then #952 can focus just on dealing with supporting the XDG paths, which will probably make it easier to talk about...