Support for core.ignorecase
Minor fixes for ignorecase support
ODB: re-load packfiles on failed lookup

The old method was avoiding re-loading of packfiles by watching the mtime of the
pack directory. This causes the ODB to become stale if the directory and packfile
are written within the same clock millisecond, as when cloning a fairly small
repo.

This method tries to find the object in the cached packs, and forces a refresh when
that fails. This will cause extra stat'ing on a miss, but speeds up the success
case and avoids this race condition.
Remove mtime checks from ODB packfile backend

Now forcing refresh on a foreach, and on missed full-oid
or short-oid lookups.
ODB pack: snapshot last_found to avoid race

Also removed unnecessary refresh call and fixed
some indentation.
Make giterr_set_str public

There has been discussion for a while about making some set of
the `giterr_set` type functions part of the public API for code
that is implementing new backends to libgit2.  This makes the
`giterr_set_str()` and `giterr_set_oom()` functions public.
Tags: teach git_tag_list not to include the 'refs/tags/' prefix

Since quite a while now, git_branch_foreach has learnt to list branches
without the 'refs/heads/' or 'refs/remotes' prefixes.
This patch teaches git_tag_list to do the same for listing tags.
Tests::Object::Tag: move listing tags tests to an own file
Tests::Object::Tag: Add a mechanism to test which tags were returned

This patch changes the tag listing test helper to use a struct as input
parameter, which tells what we exactly expect.

As I don't think, we can rely on the fact that every os and every
filesystem will report the tags in the same order, I made this code
independent of the order that the tags are retrieved.
Tests: Add 3 tags to resources/testrepo.

Adjusts refs::list test (including the comments)
Adjusts objects::tags::list test
Tests::object::tag: also test for a 'foo/*/bar'.
Tests: reindent object/tag/list.c to use tabs
Tests: Add test for git_tag_list to check for 'git tag -l "*bar"'
Honor %HOME% on windows

Use %HOME% before trying to figure out the windows user directory.
Users might set this as they are used on *nix systems.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Calculate the Windows user profile directory the same way as msysgit

On most systems %USERPROFILE% is the same as %HOMEDRIVE%\%HOMEPATH%,
however, for windows machines in an AD or domain environment this
might be different and %HOMEDRIVE%\%HOMEPATH% seems to be better.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Automatically detect msysgit installation path

Do not hardcode the installation path of msysgit, but read installation path from registry.
Also "%PROGRAMFILES%\Git\etc" won't work on x64 systems with 64-bit libgit2, because
msysgit is x86 only and located in "%ProgramFiles(x86)%\Git\etc".

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Correctly read xdr compatible %HOME%/.config/git/config config file

This file is not just read if the global config file (%HOME%/.gitconfig)
is not found, however, it is used everytime but with lower priority.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Fixed typo: xdr config needs to have a lower priority than the global one

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Fixed missing method

Signed-off-by: Sven Strickroth <email@cs-ware.de>
git_config_open_default: Honour xdr config

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