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>
Refactored: Move msysgit registry detection to it's own function

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Detect msysgit installation of users without admin rights

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Added Sven Strickroth to AUTHORS

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Stick to coding style: Move up braces

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Add test case for clone head detached repo

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Merge pull request #1286 from lznuaa/master

Fix clone fail if repo head detached
Try harder to find global config file
Win32: Make sure error messages are consistently UTF-8 encoded

W/o this a libgit2 error message could have a mixed encoding:
e.g. a filename in UTF-8 combined with a native Windows error message
encoded with the local code page.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Get utf8_size from WideCharToMultiByte instead of guessing it

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1302 from jamill/global_config_lookup

Try harder to find global config file
Merge pull request #1299 from csware/support_local_msysgit_install

Support local msysgit installations
Improved error handling

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Deduplicate FormatMessage UTF-16 to UTF-8 conversion code

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1303 from csware/win32_consistent_error_encoding

Win32: Make sure error messages are consistently UTF-8 encoded