Fix some memory leaks
Create directory for symlink before creating symlink
CMake: allow appending a string to the library filename

This helps us install multiple versions of the library side-by-side.
Merge pull request #1581 from nulltoken/fix/leaks

Fix some memory leaks
Merge pull request #1582 from dmgctrl/checkout_symlink_fix

Create directory for symlink before creating symlink
Merge pull request #1580 from carlosmn/cmake-describe

CMake: vendor strings
Extend valgrind suppressions on Mac
Unify whitespaces to tabs
Merge pull request #1583 from linquize/whitespace

Unify whitespaces to tabs
signature: Lenient when dupping, strict when creating
Fix trailing whitespaces
Fix diff crash when last item is untracked dir

When the last item in a diff was an untracked directory that only
contained ignored items, the loop to scan the contents would run
off the end of the iterator and dereference a NULL pointer.  This
includes a test that reproduces the problem and a fix.
Remove old symlinks before updating

Unlike blob updates, symlink updates cannot be done "in place"
writing over an old symlink.  This means that in checkout when we
realize that we can safely update a symlink, we still need to
remove the old one before writing the new.
Fix checkout of submodules with no .gitmodules

It is possible for there to be a submodule in a repository with
no .gitmodules file (for example, if the user forgot to commit
the .gitmodules file).  In this case, core Git will just create
an empty directory as a placeholder for the submodule but
otherwise ignore it.  We were generating an error and stopping
the checkout.  This makes our behavior match that of core git.
Improve robustness of diff rename detection

Under some strange circumstances, diffs can end up listing files
that we can't actually open successfully.  Instead of aborting
the git_diff_find_similar, this makes it so that those files just
won't be considered as valid rename/copy targets instead.
Use GIT_IDXENTRY_STAGE macro

Since I added the GIT_IDXENTRY_STAGE macro to extract the stage
from a git_index_entry, we probably don't need an internal inline
function to do the same thing.
Merge pull request #1578 from nulltoken/fix/whitespaces

Fix trailing whitespaces
Merge pull request #1588 from arrbee/fixes-for-checkout-and-diff

Bug fixes for checkout and diff
Improve docs for git_index_entry flag masks

The constants for extracting data from git_index_entry flags and
flags_extended are not named in a way that makes it easy to know
where to use each one.  This improves the docs for the flags (and
slightly reorganizes them), so it should be more obvious.
Add APIs to dup and free git_index_entrys

This adds git_index_entry_dup to make a copy of an existing entry
and git_index_entry_free to release the memory of the copy.  It
also updates the documentation for git_index_get_bypath and
git_index_get_byindex to make it clear that the returned structure
should *not* be modified.