This adds `git_diff_buffers` and `git_patch_from_buffers`. This
also includes a bunch of internal refactoring to increase the
shared code between these functions and the blob-to-blob and
blob-to-buffer APIs, as well as some higher level assert helpers
in the tests to also remove redundancy.
- added MSVC cmake definitions to disable warnings
- general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows
- some MSVC reported warning fixes
* Make GIT_INLINE an internal definition so it cannot be used in
public headers
* Fix language in CONTRIBUTING
* Make index caps API use signed instead of unsigned values
On some systems, notably HP PA-RISC systems running Linux or HP-UX,
EWOULDBLOCK and EAGAIN are not the same value. POSIX (and these OSes) allow
EWOULDBLOCK to occur on write(2) (and send(2), etc.), so check explicitly
for this case as well as EAGAIN by defining and using a macro GIT_ISBLOCKED
that considers both.
The macro is necessary because MSYS does not provide EWOULDBLOCK and
compilation fails if an attempt is made to use it unconditionally. On most
systems, where the two values are the same, the compiler will simply
optimize this check out and it will have no effect.
* tag 'upstream/0.20.0': (664 commits)
libgit2 0.20.0 "anmeldung"
Formatting fix for cred_acquire_cb
util: NetBSD doesn't have qsort_r either
tests: Drop unrelated comment
index: Free the index on git_index_open() failure
tree-cache: Fix error message typo
tree-cache: Don't segfault upon corruption
tree-cache: Zero out the allocated tree children array
tree-cache: Free the tree upon the detection of a corrupted child
cleaning code, removing unused variables
Add content offset to git_diff_line
netops: fix leak
Fix warnings
Introduce git_cred_default for NTLM/SPNEGO auth
Propagate auth error codes as GIT_EUSER in winhttp
Add missing mappings to .mailmap file
Update files that reference tests-clar
Rename tests-clar to tests
Fix warnings
tests: make a few globals statics
...