fileops: fix invalid read
diff: fix warning
Merge pull request #1652 from yorah/fix/build-warnings

Fix/build warnings
util: git__memzero() tweaks

On Linux: fix a warning message related to the volatile qualifier (cast)
On Windows: use SecureZeroMemory()

On both, inline the call, so that no entry point can lead back to this "secure" memory zeroing.
cred: deploy git__memzero to clear memory holding a password
Merge pull request #1654 from yorah/memzero

Memzero stuffs
ref: free the last ref when cancelling git_branch_foreach()

Also fixed an assert typo on nulltoken's HEAD
Merge pull request #1655 from yorah/fix/ref-memleak

ref: free the last ref when cancelling git_branch_foreach()
branch: More obvious semantics in `foreach`
status access by index, providing more details to callers
handle renames in status computation
git__strcasesort_cmp: strcasecmp sorting rules but requires strict equality
Fix some warnings
Clarify some docs and minor reordering

This simplifies some documentation and hopefully makes a couple
of things easier to read.  Also, this rearrages the order in this
branch so that the overall diff against the trunk will hopefully
be a bit cleaner.
Fix broken status EXCLUDE_SUBMODULES logic

The exclude submodules flag was not doing the right thing, in
that a file with no diff between the head and the index and just
a delete in the workdir could be excluded if submodules were
excluded.
Be more careful about the path with diffs

This makes diff more careful about picking the canonical path
when generating a delta so that it won't accidentally pick up a
case-mismatched path on a case-insensitive file system.  This
should make sure we use the "most accurate" case correct version
of the path (i.e. from the tree if possible, or the index if
need be).
Improve case handling in git_diff__paired_foreach

This commit reinstates some changes to git_diff__paired_foreach
that were discarded during the rebase (because the diff_output.c
file had gone away), and also adjusts the case insensitively
logic slightly to hopefully deal with either mismatched icase
diffs and other case insensitivity scenarios.
some simple case-sensitive index tests
Make index_insert keep existing case

In a case insensitive index, if you attempt to add a file from
disk with a different case pattern, the old case pattern in the
index should be preserved.

This fixes that (and a couple of minor warnings).
Always do tree to index diffs case sensitively

Trees are always case sensitive.  The index is always case
preserving and will be case sensitive when it is turned into a
tree.  Therefore the tree and the index can and should always
be compared to one another case sensitively.

This will restore the index to case insensitive order after the
diff has been generated.

Consider this a short-term fix.  The long term fix is to have the
index always stored both case sensitively and case insensitively
(at least on platforms that sometimes require case insensitivity).