Squashed 'deps/libgit2/' changes from 71ba28e..bcc6229

bcc6229 Merge pull request #2259 from libgit2/vmg/state-cleanup
c3dcbe8 Rewrite `git_repository__cleanup_files`
361e919 Merge pull request #2257 from libgit2/rb/fix-submodules-with-tracked-content
3ed8d00 Merge pull request #2258 from libgit2/jk/userdiff-cc
9ce60fa userdiff: update ada patterns
76b4e3d userdiff: update C/C++ patterns
eb7e17c Update submodules with parent-tracked content
ce2e826 graph: handle not finding a merge base gracefully
2795fb4 Merge pull request #2256 from jacquesg/graph-descendant
8a8e312 Added a no path test for git_graph_descendant_of
56f8e06 Correct grouping of parentheses
5f74c47 Merge pull request #2255 from libgit2/rb/fix-multiple-nfd-iconv-bug
7167fd7 vmg is always right
c813b34 Fix bug with multiple iconv conversions in one dir
c031129 git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ and BISECT_LOG
6720eef Merge pull request #2249 from libgit2/rb/starstar-fnmatch
c7d9606 Fix fnmatch comment to be clearer
c8c9143 More ** tests for pattern rules
52056db Merge pull request #2250 from jacquesg/vector-leak
4998009 Don't lose our elements when calling git_vector_set()
2b6b85f Add support for ** matches in ignores
923c840 Merge pull request #2215 from libgit2/rb/submodule-cache-fixes
f34408a Merge pull request #2211 from Yogu/retry-renaming-config
eedeeb9 Test (and fix) the git_submodule_sync changes
18cc7d2 Minor code cleanup
f2fb4ba git_submodule_resolve_url supports relative urls
12d4ed4 Test git_submodule_add_setup with relative url
4c219cf Merge pull request #2244 from jacquesg/const-correctness
3b4ba27 Const correctness!
fd61f05 Merge pull request #2238 from libgit2/cmn/upstream-for-unborn
9edc527 Merge pull request #2239 from libgit2/vmg/clar-skip-test
67d4997 remote: mark branch for-merge even if we're unborn
6f6be8f remote: write tests for cloning from an empty repo
0f65733 Clar: skip tests
64a862c Merge pull request #2237 from mekishizufu/fix_return_value
4965366 checkout: Fix submodule_is_config_only's return value
fe23860 Merge pull request #2230 from anuraggup/revwalk-merge-base
ada157b Add warning when skipping blame test
bb63bae Merge pull request #2231 from libgit2/fix-memory-index-doc-comment
ddc66e2 Give the correct name for the function in the doc.
5b9eac3 Merge pull request #2233 from libgit2/rb/fix-untracked-repo-status
d1a0900 Skip blame libgit2 test if not in libgit2 repo
a574d58 New tests of status for repo inside repo
ea1ca3c Fix skipping content of contained repos
8f4e527 More tests and fix submodule index refresh
bb439de Correct a stale reference to GIT_EBAREINDEX
8061d51 Remove most submodule reloads from tests
4ece3e2 Fix submodule accounting for name and path changes
f28e4c9 refspec: git_refspec_parse() does not exist
aa78c9b Minor submodule cache locking improvements
eeeb965 Reinstate efficient submodule reloading
a4ccd2b Use enums instead of bools for submodule options
db0e787 Make submodule refresh a bit smarter
69b6ffc Make a real submodule cache object
d543d59 Add some funny options for debugging status
e402d2f Submodule sync refactoring
8286300 Fix git_submodule_sync and add new config helper
18234b1 Add efficient git_buf join3 API
2450d4c Merge pull request #2208 from libgit2/vmg/mempack
d67397d Merge pull request #2226 from libgit2/rb/submodule-sorting-fix
82e1c1a Merge pull request #2229 from linquize/Wdeclaration-after-statement
9e1ed9f Add CFLAGS -Wdeclaration-after-statement
a2d18a0 Merge pull request #2228 from mekishizufu/example_short_id
9325460 Merge pull request #2206 from libgit2/cmn/inmemory-swap-order
fd536d2 remote: rename inmemory to anonymous and swap url and fetch order
6ad59ef examples: Use git_object_short_id
3ab5781 Merge pull request #2178 from libgit2/rb/fix-short-id
3bc3d79 No need to find merge base.
b76b5d3 Improve test of submodule name sorting
7dcd42a Cleanups
c856f8c Fix submodule sorting in workdir iterator
945c92a Add faster git_submodule__is_submodule check
fad0412 Merge pull request #2224 from ethomson/merge_file_const
7f930de Const up members of git_merge_file_result
336e895 Merge pull request #2222 from ethomson/merge_head_id
976634c Introduce git_merge_head_id
0883342 Merge pull request #2219 from tiennou/reset-need-pack
31143b3 Don't reset need_pack
7b445c2 Merge pull request #2216 from ethomson/clar
ed38bff Update clar to 4b75388
2873a86 Retry renaming files on Access Denied errors
6105d59 In-memory packing backend
eb46fb2 Add failing test for git_object_short_id
8949907 Fix a number of git_odb_exists_prefix bugs

git-subtree-dir: deps/libgit2
git-subtree-split: bcc622934a90307390f058c7ef4203f8bbcfe0d6
Remote.xs: Rename create_inmemory to create_anonymous
MakeMaker.pm: Add -Wdeclaration-after-statement to CFLAGS
Changes: update
Changes: update
v0.33

 - Fix segfaults caused by invalid object creation (GH#66) (thanks, @pipcet!)
 - Add Config -> default() method (GH#67) (thanks, @magnolia-k!)
 - Do not fail when a lightweight tag is found in the Tag->foreach() callback
   (GH#68) (thanks, @pipcet!)
 - Add Tree::Entry -> file_mode() method (GH#69) (thanks, @pipcet!)
 - Repository -> merge() now takes %merge_opts and %checkout_opts as 2
   separate parameters. (incompatible change) (GH#70)
 - Merge options parameter member 'automerge' has been renamed to 'favor',
   inline with libgit2 API changes. (incompatible changes) (GH#70)
   It has also learned about a 'union' merge.
 - Checkout options has learned new options: 'target_directory', 'ancestor_label',
   'our_label' and 'their_label'. (GH#70)
 - Checkout strategy has additional options: (GH#70)
   'use_ours', 'use_theirs', 'skip_locked_directories', 'dont_overwrite_ignored',
   'conflict_style_merge', 'conflict_style_diff3' and 'disable_pathspec_match'.
 - Added new Repository methods (#GH70):
    + Repository -> merge_analysis()
    + Repository -> merge_base()
 - Added new Index methods (#GH70):
    + Index -> write_tree_to()
    + Index -> checkout()
    + Index -> entries()
    + Index -> add_conflict()
    + Index -> remove_conflict()
 - Added new Commit method (#GH70):
    + Commit -> merge()
 - Added new Tree method (#GH70):
    + Tree -> merge()
 - Index -> add() now either takes a path or a Index::Entry (GH#70)
 - Remote->create_inmemory() has been replaced by Remote->create_anonymous()
   (incompatible change) (GH#71).
   The order of 'url' and 'fetchspec' has also been reversed to bring it
   inline with the upstream changes.
 - Update libgit2 to bcc6229