Undef lseek first
_InterlockedExchange expects a volatile LONG
git_pool_mallocsz takes an unsigned long
indexer: use mmap for writing

Some OSs cannot keep their ideas about file content straight when mixing
standard IO with file mapping. As we use mmap for reading from the
packfile, let's make writing to the pack file use mmap.
indexer: mmap fixes for Windows

Windows has its own ftruncate() called _chsize_s().

p_mkstemp() is changed to use p_open() so we can make sure we open for
writing; the addition of exclusive create is a good thing to do
regardless, as we want a temporary path for ourselves.

Lastly, MSVC doesn't quite know how to add two numbers if one of them is a
void pointer, so let's alias it to unsigned char.C
Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into development
print_binary_hunk: Treat types with respect
Fix printf format string from previous commit
Fix a bug in the pack::packbuilder suite
message: don't assume the comment char

The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
Fix warning on uninitialized variable.
Merge pull request #2365 from kitbellew/fix-indexer-mmap

Fix warning on uninitialized variable.
Merge pull request #2303 from jacquesg/mingw-lseek

WIP: Windows fixes
Merge pull request #2364 from libgit2/cmn/comment-char

message: don't assume the comment char
clone: add failing test for a mirror-clone with clone_into

Show a failure to perform a mirror-clone from a repository, both local
and remote.
clone: duplicate the remote

Instead of changing the user-provided remote, duplicate it so we can add
the extra refspec without having to worry about unsetting it before
returning.
clone: don't error out if the branch already exists

We set up the current branch after we fetch from the remote. This means
that the user's refspec may have already created this reference. It is
therefore not an error if we cannot create the branch because it already
exists.

This allows for the user to replicate git-clone's --mirror option.
Merge pull request #2354 from libgit2/cmn/clone-into-mirror

Allow mirror-clone via `git_clone_into()`