Add helpful buffer shorten function
Make refspec_transform paranoid about arguments
Fix segfault in git_status_foreach_ext()

Add tests for the `GIT_STATUS_SHOW_XXX` flags.
Be more thread aware with some index updates

The index isn't really thread safe for the most part, but we can
easily be more careful and avoid double frees and the like, which
are serious problems (as opposed to a lookup which might return
the incorrect value but if the index in being updated, that is
much harder to avoid).
Merge pull request #1701 from yorah/fix/gh-1698

Fix segfault in git_status_foreach_ext()
Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option

This option serves no benefit now that the git_status_list API
is available.  It was of questionable value before and now it
would just be a bad idea to use it rather than the indexed API.
Fix a crash if git_remote_set_cred_acquire_cb wasn't called before connecting.

Fixes #1700.
Fix a probable leak.
Merge pull request #1692 from arrbee/fix-1692

Segmentation fault on git_clone
Diff hunk context off by one on long lines

The diff hunk context string that is returned to xdiff need not
be NUL terminated because the xdiff code just copies the number of
bytes that you report directly into the output.  There was an off
by one in the diff driver code when the header context was longer
than the output buffer size, the output buffer length included
the NUL byte which was copied into the hunk header.

Fixes #1710
Make the git_signature const in the stash API.
Merge pull request #1715 from tiennou/const-signature

Make the git_signature `const` in the stash API.
Make SSH APIs present even without SSH support

The SSH APIs will just return an error code and state that the
library was built without SSH support if they are called in
that case.
Lots of SSH credential stuff can be left on

Much of the SSH credential creation API can be left enabled even
on platforms with no SSH support.  We really just have to give an
error when you attempt to open the SSH connection.
Merge pull request #1710 from arrbee/fix-1710

Null byte in hunk header
Indent with tabs
Make credential clearing consistent

This makes all of the credential objects use the same pattern to
clear the contents and call git__memzero when done.  Much of this
information is probably not sensitive, but it also seems better
to just clear consistently.
Add GIT_CAP_SSH if library was built with SSH

This also adds a test that actually calls git_libgit2_capabilities
and git_libgit2_version.
Fix return value in git_config_get_multivar

If there is not an error, the return value was always the return value
of the last call to file->get_multivar

With this commit GIT_ENOTFOUND is only returned if all the calls to
filge-get_multivar return GIT_ENOTFOUND.
Add more tests for git_config_get_multivar

The old tests didn't try failing lookups or lookups across
multiple config files with some having the pattern and some
not having it.