Fix compiler warning (git_off_t cast to size_t).

Use size_t for page size, instead of long. Check result of sysconf.
Use size_t for page offset so no cast to size_t (second arg to p_mmap).
Use mod instead div/mult pair, so no cast to size_t is necessary.
Allow to propagate checkout callbacks to git HARD reset

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Can read large file larger than 2GB on Windows
When updating FETCH_HEAD, do not treat it as error if the remote of current branch is from another remote
Add network::fetchlocal multi remotes test
Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON

The compiler was generating a bunch of warnings for
git_mutex_init and git_mutex_lock when GIT_THREADS
was not defined (i.e. when not using -DTHREADSAFE=ON).

Also remove an unused variable from tests/path/core.c.
Provide host name to certificate_check_cb

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Join typedef and struct definitions in single file.
remote: accept a repository and remote name for deletion

We don't need the remote loaded, and the function extracted both of
these from the git_remote in order to do its work, so let's remote a
step and not ask for the loaded remote at all.

This fixes #2390.
Add support for setting the SSL CA location

This allows users to specify self-signed certificates, or to provide their
own certificate stores on limited platforms such as mobile phones.
Provide option to embed libssh2
revwalk: clear the flags on reset

These store merge-base information which is only valid for a single run.
revwalk: keep a single list of user inputs

The old separation was due to the old merge-base finding, so it's no
longer necessary.
revwalk: mark uninteresting only up to the common ancestors

This introduces a phase at the start of preparing a walk which pre-marks
uninteresting commits, but only up to the common ancestors.

We do this in a similar way to git, by walking down the history and
marking (which is what we used to do), but we keep a time-sorted
priority queue of commits and stop marking as soon as there are only
uninteresting commits in this queue.

This is a similar rule to the one used to find the merge-base. As we
keep inserting commits regardless of the uninteresting bit, if there are
only uninteresting commits in the queue, it means we've run out of
interesting commits in our walk, so we can stop.

The old mark_unintesting() logic is still in place, but that stops
walking if it finds an already-uninteresting commit, so it will stop on
the ones we've pre-marked; but keeping it allows us to also hide those
that are hidden via the callback.
revwalk: catch no-push and no-hide cases

If there have been no pushes, we can immediately return ITEROVER. If
there have been no hides, we must not run the uninteresting pre-mark
phase, as we do not want to hide anything and this would simply cause us
to spend time loading objects.
revwalk: clear first-parent flag on reset

This should have been included when implementing the feature but was
missed.
Add tests for host names

Signed-off-by: Sven Strickroth <email@cs-ware.de>
New test files for the javascript diff driver.
Update the javascript diff driver's function pattern.
Treat an empty list of refspecs the same as a NULL value.