Join typedef and struct definitions in single file.
remote: accept a repository and remote name for deletion

We don't need the remote loaded, and the function extracted both of
these from the git_remote in order to do its work, so let's remote a
step and not ask for the loaded remote at all.

This fixes #2390.
Merge pull request #2575 from cirosantilli/factor-struct-typedef

[factor] Join typedef and struct definitions in single file.
Merge pull request #2593 from libgit2/cmn/remote-delete-name

remote: accept a repository and remote name for deletion
tree-cache: extract the allocation
tree-cache: move to use a pool allocator

This simplifies freeing the entries quite a bit; though there aren't
that many failure paths right now, introducing filling the cache from a
tree will introduce more. This makes sure not to leak memory on errors.
index: fill the tree cache when reading from a tree

When reading from a tree, we know what every tree is going to look like,
so we can fill in the tree cache completely, making use of the index for
modification of trees a lot quicker.
index: add tests for the tree cache

These test that we invalidate at the right levels and that we remove the
tree cache when clearing the index.
tree-cache: remove the parent pointer

This wasn't used. We invalidate based on the full path, so we always go
down the tree, never up.
index: write out the tree cache extension

Keeping the cache around after read-tree is only one part of the
optimisation opportunities. In order to share the cache between program
instances, we need to write the TREE extension to the index.

Do so, taking the opportunity to rename 'entries' to 'entry_count' to
match the name given in the format description. The included test is
rather trivial, but works as a sanity check.
index: make sure to write cached subtrees if parent is invalidated

If e.g. the root tree is invalidated, we still want to write out
its children, since those may still have valid cache entries.
index: fill the tree cache on write-tree

An obvious place to fill the tree cache is on write-tree, as we're
guaranteed to be able to fill in the whole tree cache.

The way this commit does this is not the most efficient, as we read the
root tree from the odb instead of filling in the cache as we go along,
but it fills the cache such that successive operations (and persisting
the index to disk) will be able to take advantage of the cache, and it
reuses the code we already have for filling the cache.

Filling in the cache as we create the trees would require some
reallocation of the children vector, which is currently not possible
with out pool implementation. A different data structure would likely
allow us to perform this operation at a later date.
Update CHANGELOG and PROJECTS with the tree cache changes
Merge pull request #2470 from libgit2/cmn/read-tree-cache

Fill the tree cache when reading in a tree into an index
Move un-namespaced constant to internal header

FLAG_BITS only seems to be used internally
Don't use cl_git_pass for POSIX functions

If there is a failure then cl_git_pass tries to get the libgit2
error, but p_... functions don't set that.

Also - trailing whitespace cleanup.
Merge pull request #2613 from libgit2/rb/minor-cleanups

Minor cleanups for master
There is no "z" size specifier on MSVC

See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx and https://stackoverflow.com/questions/6655410/why-doesnt-zd-printf-format-work-in-vs2010

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #2618 from csware/msvc-no-z-prefix

There is no "z" size specifier on MSVC
Introduce failing test for conflict filtering in index