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()
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.
ssh: detect authentication methods

Before calling the credentials callback, ask the sever which
authentication methods it supports and report that to the user, instead
of simply reporting everything that the transport supports.

In case of an error, we do fall back to listing all of them.
ssh: propagate the error code from the auth callback

We need to be able to get a GIT_EUSER back through the outermost call.
Introduce GIT_EAUTH

Introduce this error code to signal an authentication failure.
ssh: request credentials again on authentication failure

Instead of completely giving up on the first failure, ask for
credentials as long as we fail to authenticate.
cred: introduce username-only cred

This exists as ssh needs to know about the username to use before it can
query for the supported authentication methods.
cred: add convenience function to get the username

Since each cred defines the username on their own, introduce
git_cred__username to retrieve the username pointer from them.
ssh: make sure to ask for a username and use the same one

In order to know which authentication methods are supported/allowed by
the ssh server, we need to send a NONE auth request, which needs a
username associated with it.

Most ssh server implementations do not allow switching the username
between authentication attempts, which means we cannot use a dummy
username and then switch. There are two ways around this.

The first is to use a different connection, which an earlier commit
implements, but this increases how long it takes to get set up, and
without knowing the right username, we cannot guarantee that the
list we get in response is the right one.

The second is what's implemented here: if there is no username specified
in the url, ask for it first. We can then ask for the list of auth
methods and use the user's credentials in the same connection.
ssh: adjust clone and push test credentials to the split user+pass method

For urls where we do not specify a username, we must handle the case
where the ssh transport asks us for the username.

Test also that switching username fails.
travis: enable password authentication on OSX

Our ssh tests assume that the server supports password authentication
in a few places. This is convenient as we're not testing authentication
methods, but what happens around them.

Tell sshd on OSX to accept this form of authentication.
merge: expose multiple merge bases

We always calculate multiple merge bases, but up to now we had only
exposed the "best" merge base.

Introduce git_oidarray which analogously to git_strarray lets us return
multiple ids.
Allow to propagate checkout callbacks to git HARD reset

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Fix rejection of parent dir of negated ignores

While scanning through a directory hierarchy, this prevents a
positive ignore match on a parent directory from blocking the scan
of a directory when a negative match rule exists for files inside
the directory.
status: failing test with slash-star

When writing 'bin/*' in the rules, this means we ignore very file inside
bin/ individually, but do not ignore the directory itself. Thus the
status listing should list both files under bin/, one untracked and one
ignored.
For negative matches, always use leading dir match
Demonstrate a trailing slash failure.

`git help ignore` has this to say about trailing slashes:

> If the pattern ends with a slash, it is removed for the purpose of
> the following description, but it would only find a match with a
> directory. In other words, foo/ will match a directory foo and
> paths underneath it, but will not match a regular file or a
> symbolic link foo (this is consistent with the way how pathspec
> works in general in Git).

Sure enough, having manually performed the same steps as this test,
`git status` tells us the following:

	# On branch master
	#
	# Initial commit
	#
	# Changes to be committed:
	#   (use "git rm --cached <file>..." to unstage)
	#
	#	new file:   force.txt
	#
	# Untracked files:
	#   (use "git add <file>..." to include in what will be committed)
	#
	#	../.gitignore
	#	child1/
	#	child2/

i.e. neither child1 nor child2 is ignored.
Can read large file larger than 2GB on Windows