Fix fail clone local repo which head detatched

Set head detach if can't found branch after download

Signed-off-by: Frank Li <lznuaa@gmail.com>
Vector improvements and their fallout
Fix 2 bugs in online::push tests.

- Fix stack corruption introduced in 9bccf33c due to passing pointer to
local variable _cred_acquire_called.
- Fix strcmp in do_verify_push_status when expected or actual push_status
  is NULL
Added git_treebuilder_entrycount

Conflicts:
	src/tree.c
Merge pull request #1289 from jwiegley/development

Added git_treebuilder_entrycount
Fix p_realpath on OpenBSD

OpenBSD's realpath(3) doesn't require the last part of the path to
exist. Override p_realpath in this OS to bring it in line with the
library's assumptions.
Test buf join with NULL behavior explicitly
Implement config key validation rules

This is a new implementation of core git's config key checking
rules that prevents non-alphanumeric characters (and '-') for
the top-level section and key names inside of config files.

This also validates the target section name when renaming
sections.
Test config name validation

This is @nulltoken's work to test various invalid config section
and key names and make sure we are validating properly.
Now with no multiply
Merge pull request #1285 from phkelley/vector

Vector improvements and their fallout
Merge pull request #1295 from carlosmn/obsd

Fix p_realpath on OpenBSD
Merge pull request #1296 from arrbee/stricter-config-name-checks

Stricter config entry name validation
Add helper for diff line stats

This adds a `git_diff_patch_line_stats()` API that gets the total
number of adds, deletes, and context lines in a patch.  This will
make it a little easier to emulate `git diff --stat` and the like.

Right now, this relies on generating the `git_diff_patch` object,
which is a pretty heavyweight way to get stat information.  At
some future point, it would probably be nice to be able to get
this information without allocating the entire `git_diff_patch`,
but that's a much larger project.
Free buffer at end of test
Let people know that the ML is deprecated
Merge pull request #1297 from arrbee/diff-patch-line-totals

Add helper API for diff line stats from patch
Skip "user@" when finding hostname in url
Stash username from url (but don't use it yet)
Add user-from-url param to auth callback