MidnightBSD may also not have strnlen
Merge pull request #2309 from jacquesg/midnightbsd

MidnightBSD may also not have strnlen
Unquiet CMake output

The point of this phase is to know what we have and not. Show the user a
clear indication of what we have.
Workaround missing .pc files on FreeBSD

This fixes #2118
Don't exclude libssh2 from MinGW

It reportedly works. It does not however work when cross-compiling on
Travis, so let's disable it there.

This fixes #2311.
refs: document _next_name()

If it's not documented, it doesn't show up in the docs (and we really
should document, anyway).
ciscript: don't use an empty string as a number

An empty string is not a valid number, and some shells complain.

Check instead if $COVERITY is non-empty, which is a common convention
and what we're doing anyway.
cygwin also doesn't have qsort_r
Merge pull request #2315 from jacquesg/qsort-cygwin

cygwin also doesn't have qsort_r
Merge pull request #2314 from libgit2/cmn/known-libs

Assorted CMake fixups
Build regex.c for Solaris. Added required defines for Solaris
strcasecmp is in <strings.h>
Check for NULL before passing it to vsnprintf
Merge pull request #2304 from jacquesg/solaris

Solaris!
Add build option for diff internal statistics
Skip diff oid calc when size definitely changed

When we think the stat cache in the index seems valid and the size
or mode of a file has definitely changed, then don't bother trying
to recalculate the OID of the workdir bits to confirm that it is
modified - just accept that it is modified.

This can result in files that show as modified with no actual diff,
but the behavior actually appears to match Git on the command line.

This also includes a minor optimization to not perform a submodule
lookup on the ".git" directory itself.
Lay groundwork for updating stat cache in diff

This reorganized the diff OID calculation to make it easier to
correctly update the stat cache during a diff once the flags to
do so are enabled.

This includes marking the path of a git_index_entry as const so
we can make a "fake" git_index_entry with a "const char *" path
and not get warnings.  I was a little surprised at how unobtrusive
this change was, but I think it's probably a good thing.
Add diff option to update index stat cache

When diff is scanning the working directory, if it finds a file
where it is not sure if the index entry matches the working dir,
it will recalculate the OID (which is pretty expensive).  This
adds a new flag to diff so that if the OID calculation finds that
the file actually has not changed (i.e. just the modified time was
altered or such), then it will refresh the stat cache in the index
so that future calls to diff will not have to check the oid again.
Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API

This adds an option to refresh the stat cache while generating
status.  It also rips out the GIT_PERF stuff I had an makes use
of the trace API to keep statistics about what happens during diff.
Don't use trace if GIT_TRACE not defined