Squashed 'deps/libgit2/' changes from 89e9c16..530594c

530594c odb: clear backend errors on successful read
9331f98 smart: initialize the error variable
4c4408c Plug leaks and fix a C99-ism
a598264 Merge pull request #2376 from libgit2/cmn/remote-symref
7ee233a Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform
ff9fb44 Merge pull request #2379 from ethomson/status_win32
ead9c59 Include windows.h on win32 for Sleep
2bc36fa Merge pull request #2372 from libgit2/cmn/fetch-terminate
2a59711 clone: get rid of head_info
cdb8a60 clone: make use of the remote's default branch guessing
d22db24 remote: add api to guess the remote's default branch
04865aa local transport: expose the symref data
306475e remote: expose the remote's symref mappings
8156835 smart: store reported symrefs
58532ed Merge pull request #2373 from kitbellew/fix-clone-into-mirror
60cdf49 Minor fix for cmn/clone-into-mirror.
430866d Fix a leak in the tests
ac11219 smart: send a flush when we disconnect
c094197 Just don't CRLF filter if there are no CRs
16798d0 Make core.safecrlf work on LF-ending platforms
588a43a Merge pull request #2371 from martinwoodward/attrib_fnmatch
213a269 Restore attributions for fnmatch
124a45e Merge pull request #2354 from libgit2/cmn/clone-into-mirror
32332fc clone: don't error out if the branch already exists
3c60768 clone: duplicate the remote
b206724 clone: add failing test for a mirror-clone with clone_into
52b597b Merge pull request #2364 from libgit2/cmn/comment-char
138af33 Merge pull request #2303 from jacquesg/mingw-lseek
b2a4be1 Merge pull request #2365 from kitbellew/fix-indexer-mmap
9c4feef Fix warning on uninitialized variable.
49e369b message: don't assume the comment char
d7a2946 Fix a bug in the pack::packbuilder suite
4c9ffdf Fix printf format string from previous commit
c6320be print_binary_hunk: Treat types with respect
bf6a5b6 Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into development
191ff93 Merge pull request #2362 from libgit2/rb/update-4k-to-8k
0731a5b indexer: mmap fixes for Windows
f731054 indexer: use mmap for writing
8af4966 Git binary check compat tests
d0f00de Increase binary detection len to 8k
adebcb1 Merge pull request #2360 from phkelley/noinherit
f0b820d Win32: Supply _O_NOINHERIT when calling _wopen
228272e Merge pull request #2313 from libgit2/cmn/remote-delete
ec8a949 remote: remove remote-tracking branches on delete
8e1b5a8 Merge pull request #2357 from libgit2/cmn/pack-cache-init
88b1b36 Merge pull request #2356 from libgit2/rb/restore-search-paths
649214b pack: init the cache on packfile alloc
8487e23 Better search path sandboxing
4af0ef9 Fix mutex init/free in config_file.c
7851e59 Merge pull request #2351 from linquize/init-var
2bcc1af Merge pull request #2349 from libgit2/rb/coverity-fixes
a8af3e0 Merge pull request #2348 from stewid/add-link-R-bindings
2b52a0b Increase use of config snapshots
a37aa82 Some coverity inspired cleanups
562516e Add R bindings to the README
b3f27c4 Initialize local variable
03fcef1 Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be
bcf9792 Merge pull request #2330 from libgit2/cmn/pack-unpack-loop
e161962 Merge pull request #2346 from kitbellew/fix2300
7c57cd9 Win32 fix for #2300.
c968ce2 pack: don't forget to cache the base object
15bcced pack: use stack allocation for smaller delta chains
a3ffbf2 pack: expose a cached delta base directly
df34192 Merge pull request #2336 from libgit2/rb/unicode-branch-names
af567e8 Merge pull request #2334 from libgit2/rb/fix-2333
ce3b71d Don't scale diff stat when not needed
b1914c3 Minor fixes for warnings and error propagation
7bcced4 Merge pull request #2300 from libgit2/cmn/match-host-tests
d2c4d1c Merge pull request #2188 from libgit2/cmn/config-snapshot
9dbd150 pack: simplify delta chain code
b2559f4 pack: preallocate a 64-element chain
e6d10c5 pack: make sure not to leak the dep chain
a332e91 pack: use a cache for delta bases when unpacking
2acdf4b pack: unpack using a loop
ae08173 pack: do not repeat the same error message four times
86d5810 pack: remove misleading comment
e18d5e5 Merge pull request #2331 from libgit2/rb/dont-stop-diff-on-safecrlf
bb45e39 Disable threads::refdb::edit_while_iterate test
8a2ef21 Don't always test composed-insensitive lookups
be20ac5 Allow cl_repo_get_bool to work with missing key
4df53a6 Merge pull request #2335 from libgit2/cmn/indexer-vector-handling
43a0413 Pass unconverted data when iconv doesn't like it
2dde1e0 indexer: avoid memory moves
5ebe18b Merge pull request #2332 from libgit2/peff/iconv
56ec225 examples: add a basic for-each-ref example
6bcb098 cmake: s/ICONV/Iconv/ in FIND_PACKAGE
45c53eb Use unsigned type for APIs with opt flag mask
1e4976c Be more careful with user-supplied buffers
ac99d86 repository: introduce a convenience config snapshot method
ed476c2 Merge pull request #2329 from anuraggup/fix_git_shutdown
5269008 Add filter options and ALLOW_UNSAFE
1051100 Merge pull request #2324 from libgit2/cmn/file-in-objects-dir
0bf5430 Fix the issues in git_shutdown
f554611 Improve checks for ignore containment
6e9afb9 object: fix a brace
001befc Fix the issues in git__on_shutdown
ee31190 odb: ignore files in the objects dir
d2c16e9 Doc fixes
272b462 Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache
9862ef8 Merge pull request #2310 from libgit2/cmn/commit-create-safe
99dfa47 Some further sandboxing cleanups to tests
0f60313 Improve handling of fake home directory
bc91347 Fix remaining init_options inconsistencies
702efc8 Make init_options fns use unsigned ints and macro
9c8ed49 Remove trace / add git_diff_perfdata struct + api
7a2e56a Get rid of redundant git_diff_options_init fn
b23b112 Add payloads, bitmaps to trace API
225aab5 Don't use trace if GIT_TRACE not defined
cd424ad Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API
94fb4aa Add diff option to update index stat cache
0fc8e1f Lay groundwork for updating stat cache in diff
8ef4e11 Skip diff oid calc when size definitely changed
240f4af Add build option for diff internal statistics
6a1ca96 Temporary fix for Travis CI builds
f5dd2a2 git_pool_mallocsz takes an unsigned long
6e94a1e _InterlockedExchange expects a volatile LONG
1017f81 Undef lseek first
5cdac19 remote: move branch upstream deletion to use an iterator
40e48ea remote: Introduce git_remote_delete()
48ebea6 tests: Introduce count_config_entries_match() helper
217c029 commit: safer commit creation with reference update
783555d netops: catch the server not sending a certificate
51d3f6f netops: provide more specific error for cert failure
1f0d4f3 netops: unit-test the cert host-name pattern matching
2280b38 config: share the strmap on snapshot
4b99b8f config: refcount the values map
8c1f4ab config: refresh on delete
c20d71e config: document the how long the pointers are valid for
523032c config: refresh before reading a value
eaf3703 config: refresh the values on write
0500a1e config: use a snapshot for the iterator
bd95f83 config: split out the refresh step
c047317 config: make refresh atomic
29c4cb0 Use config snapshotting
55ebd7d config: implement config snapshotting
36913b8 config: document current write behaviour in a test

git-subtree-dir: deps/libgit2
git-subtree-split: 530594c0aa04df31e3cef331f6dad8083f66f15d
Merge commit 'deff66667d5d905666e46d0b44190a8fb77d947a' into jacquesg/libgit2-update
01-repo.t: Refresh is no longer needed
15-merge.t: Removing commit squash test case. It's no longer valid to
update a ref when creating a commit in a non-fastforward way.
Changes: update