oidmap: Enhance the khash wrapper
tests: Add "describe" test repository

Built with the following script:

	#!/bin/sh

	test_tick () {
		sleep 10
	}

	test_tick &&
	echo one >file && git add file && git commit -m initial &&
	one=$(git rev-parse HEAD) &&

	git describe --always HEAD &&

	test_tick &&
	echo two >file && git add file && git commit -m second &&
	two=$(git rev-parse HEAD) &&

	test_tick &&
	echo three >file && git add file && git commit -m third &&

	test_tick &&
	echo A >file && git add file && git commit -m A &&
	test_tick &&
	git tag -a -m A A &&

	test_tick &&
	echo c >file && git add file && git commit -m c &&
	test_tick &&
	git tag c &&

	git reset --hard $two &&
	test_tick &&
	echo B >side && git add side && git commit -m B &&
	test_tick &&
	git tag -a -m B B &&

	test_tick &&
	git merge -m Merged c &&
	merged=$(git rev-parse HEAD) &&

	git reset --hard $two &&
	test_tick &&
	echo D >another && git add another && git commit -m D &&
	test_tick &&
	git tag -a -m D D &&
	test_tick &&
	git tag -a -m R R &&

	test_tick &&
	echo DD >another && git commit -a -m another &&

	test_tick &&
	git tag e &&

	test_tick &&
	echo DDD >another && git commit -a -m "yet another" &&

	test_tick &&
	git merge -m Merged $merged &&

	test_tick &&
	echo X >file && echo X >side && git add file side &&
	git commit -m x
object: introduce git_describe_object()
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
remote: restrict default branch to branches namespace
travis: no need to clean out the test repository

This was added to avoid the remote's default branch to be considered to
the be notes one which the first network test leaves behind.
remote: assert what we want to happen when ther is no default branch

Assert what we already do, so as to notice changes.
remote: short-circuit the default branch check if there is none

If we do not have a HEAD ref in the heads, we already know there is no
default branch. Return immedately.
clone: support remotes with references but no branches

A repository can have any number of references which we're not
interested in such as notes or tags. For the default branch calculation
we only care about branches. Make the decision about the number of
branches rather than the number of refs in general.
remote: add tests for remote-branch edge cases

Add tests for the case when there are no branches on the remote and when
HEAD is detached but has the id of a non-branch. In both of these cases,
we should return ENOTFOUND.
remote: add test for single-branch clone

When cloning, we may be asking for a particular branch or subset of
branches. Make sure we test for that.
clone: correct handling of an unborn HEAD

If the remote does not advertise HEAD, then it is unborn and we cannot
checkout that branch. Handle it the same way as an empty repo.
clone: handle overly restrictive refspecs

When the fetch refspec does not include the remote's default branch, it
indicates an error in user expectations or programmer error. Error out
in that case.

This lets us get rid of the dummy refspec which can never work as its
zeroed out. In the cases where we did not find a default branch, we set
HEAD detached immediately, which lets us refactor the "normal" path,
removing `found_branch`.
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
When auto follow tags, FETCH_HEAD should list only newly followed tags
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.
Merge pull request #2511 from libgit2/cmn/remote-default-restrict

Restrict which refs can be the default branch
signature: don't allow empty emails

A signature is made up of a non-empty name and a non-empty email so
let's validate that. This also brings us more in line with git, which
also rejects ident with an empty email.