util: add git__fromhex()
path: add git__percent_decode()
path: add git_path_fromurl()
transport: make local transport accept a file Uri containing percent-encoded characters

This makes libgit2 compliant with the following scenario

$ git ls-remote file:///d:/temp/dwm%20tinou
732d790b702db4b8985f5104fc44642654f6a6b6        HEAD
732d790b702db4b8985f5104fc44642654f6a6b6        refs/heads/master
732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/HEAD
732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/master

$ mv "/d/temp/dwm tinou" /d/temp/dwm+tinou

$ git ls-remote file:///d:/temp/dwm%20tinou
fatal: 'd:/temp/dwm tinou' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

$ git ls-remote file:///d:/temp/dwm+tinou
732d790b702db4b8985f5104fc44642654f6a6b6        HEAD
732d790b702db4b8985f5104fc44642654f6a6b6        refs/heads/master
732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/HEAD
732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/master
Fix MSVC compilation warnings
Fix Windows specific off-by-one error

The value returned by MultiByteToWideChar includes the NULL termination character.
Merge pull request #526 from nulltoken/fix/attr

Fix some "attributes" related issues
Merge remote-tracking branch 'nulltoken/topix/path_fromurl' into development

Conflicts:
	tests-clay/clay.h
	tests-clay/clay_main.c
reflog_write: don't access free()'d memory

We get the oid of a reference, free the reference, then
convert the oid to a string. We need to convert the oid
before freeing the memory.
Remove repo open immediately after init in test

Calling git_repository_open immediately after git_repository_init
results in memory leaks.
Throw first error in chain, not rethrow.

This is the first time this error is throw, so use git__throw instead
of git__rethrow.
Fix memory leak in git_index_remove.

Missed freeing the entry.
clay tests: free resources

Trees, indices and repos need to be freed
Merge pull request #528 from arrbee/valgrind-fixes-2

Valgrind fixes in smaller pieces
Restore portability to git_path_prettify.

It turns out that passing NULL for the second parameter of realpath(3)
is not as portable as one might like.  Notably, Mac OS 10.5 and earlier
does not support it.  So this moves us back to a large buffer to get
the realpath info.
Initial implementation of gitignore support

Adds support for .gitignore files to git_status_foreach() and
git_status_file().  This includes refactoring the gitattributes
code to share logic where possible.  The GIT_STATUS_IGNORED flag
will now be passed in for files that are ignored (provided they
are not already in the index or the head of repo).
Fix up status tests
Allow ignores (and attribs) for nonexistent files

This fixes issue 532 that attributes (and gitignores) could not
be checked for files that don't exist.  It should be possible to
query such things regardless of the existence of the file.
Fix bug in dir_for_path

The last checkin accidentally broke dir_for_path by propogating
the dirname return code even when there was no error.
Convert git_path_walk_up to regular function

This gets rid of the crazy macro version of git_path_walk_up
and makes it into a normal function that takes a callback
parameter.  This turned out not to be too messy.