rugged 1.1.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/README.md +1 -1
- data/ext/rugged/extconf.rb +2 -2
- data/ext/rugged/rugged.c +7 -4
- data/ext/rugged/rugged_config.c +7 -2
- data/ext/rugged/rugged_object.c +1 -1
- data/ext/rugged/rugged_remote.c +17 -0
- data/ext/rugged/rugged_repo.c +3 -3
- data/lib/rugged/repository.rb +2 -2
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +103 -271
- data/vendor/libgit2/COPYING +149 -24
- data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
- data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
- data/vendor/libgit2/cmake/FindCoreFoundation.cmake +13 -13
- data/vendor/libgit2/cmake/FindGSSAPI.cmake +171 -287
- data/vendor/libgit2/cmake/FindGSSFramework.cmake +13 -13
- data/vendor/libgit2/cmake/{FindHTTP_Parser.cmake → FindHTTPParser.cmake} +17 -17
- data/vendor/libgit2/cmake/FindIconv.cmake +27 -27
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
- data/vendor/libgit2/cmake/FindPCRE.cmake +13 -13
- data/vendor/libgit2/cmake/FindPCRE2.cmake +12 -12
- data/vendor/libgit2/cmake/FindPkgLibraries.cmake +19 -19
- data/vendor/libgit2/cmake/FindSecurity.cmake +14 -14
- data/vendor/libgit2/cmake/FindStatNsec.cmake +12 -18
- data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
- data/vendor/libgit2/cmake/FindmbedTLS.cmake +63 -70
- data/vendor/libgit2/cmake/IdeSplitSources.cmake +18 -18
- data/vendor/libgit2/cmake/PkgBuildConfig.cmake +60 -60
- data/vendor/libgit2/cmake/SanitizeBool.cmake +20 -20
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +37 -37
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +19 -0
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +100 -96
- data/vendor/libgit2/cmake/SelectHashes.cmake +39 -48
- data/vendor/libgit2/cmake/SelectRegex.cmake +51 -0
- data/vendor/libgit2/cmake/SelectSSH.cmake +41 -0
- data/vendor/libgit2/cmake/SelectWinHTTP.cmake +17 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +34 -0
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +32 -20
- data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +154 -122
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +17 -13
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +17 -4
- data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +88 -88
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
- data/vendor/libgit2/include/git2/apply.h +16 -2
- data/vendor/libgit2/include/git2/attr.h +106 -2
- data/vendor/libgit2/include/git2/blame.h +97 -43
- data/vendor/libgit2/include/git2/blob.h +33 -2
- data/vendor/libgit2/include/git2/branch.h +27 -0
- data/vendor/libgit2/include/git2/buffer.h +18 -78
- data/vendor/libgit2/include/git2/cert.h +43 -6
- data/vendor/libgit2/include/git2/checkout.h +32 -13
- data/vendor/libgit2/include/git2/clone.h +4 -4
- data/vendor/libgit2/include/git2/commit.h +37 -19
- data/vendor/libgit2/include/git2/common.h +46 -5
- data/vendor/libgit2/include/git2/config.h +19 -3
- data/vendor/libgit2/include/git2/credential.h +2 -1
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +326 -6
- data/vendor/libgit2/include/git2/describe.h +7 -2
- data/vendor/libgit2/include/git2/diff.h +50 -121
- data/vendor/libgit2/include/git2/email.h +127 -0
- data/vendor/libgit2/include/git2/errors.h +7 -6
- data/vendor/libgit2/include/git2/filter.h +69 -18
- data/vendor/libgit2/include/git2/graph.h +21 -2
- data/vendor/libgit2/include/git2/ignore.h +1 -1
- data/vendor/libgit2/include/git2/index.h +13 -7
- data/vendor/libgit2/include/git2/indexer.h +19 -0
- data/vendor/libgit2/include/git2/merge.h +23 -3
- data/vendor/libgit2/include/git2/message.h +2 -0
- data/vendor/libgit2/include/git2/notes.h +2 -2
- data/vendor/libgit2/include/git2/object.h +23 -0
- data/vendor/libgit2/include/git2/odb.h +65 -6
- data/vendor/libgit2/include/git2/odb_backend.h +1 -1
- data/vendor/libgit2/include/git2/oidarray.h +5 -8
- data/vendor/libgit2/include/git2/pack.h +24 -8
- data/vendor/libgit2/include/git2/patch.h +16 -0
- data/vendor/libgit2/include/git2/pathspec.h +1 -1
- data/vendor/libgit2/include/git2/proxy.h +1 -1
- data/vendor/libgit2/include/git2/rebase.h +34 -2
- data/vendor/libgit2/include/git2/refdb.h +3 -0
- data/vendor/libgit2/include/git2/reflog.h +1 -1
- data/vendor/libgit2/include/git2/refs.h +8 -4
- data/vendor/libgit2/include/git2/remote.h +246 -46
- data/vendor/libgit2/include/git2/repository.h +25 -18
- data/vendor/libgit2/include/git2/reset.h +2 -2
- data/vendor/libgit2/include/git2/revparse.h +5 -5
- data/vendor/libgit2/include/git2/revwalk.h +4 -1
- data/vendor/libgit2/include/git2/signature.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +4 -4
- data/vendor/libgit2/include/git2/status.h +124 -62
- data/vendor/libgit2/include/git2/stdint.h +3 -3
- data/vendor/libgit2/include/git2/submodule.h +16 -2
- data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
- data/vendor/libgit2/include/git2/sys/email.h +45 -0
- data/vendor/libgit2/include/git2/sys/filter.h +49 -28
- data/vendor/libgit2/include/git2/sys/midx.h +74 -0
- data/vendor/libgit2/include/git2/sys/odb_backend.h +9 -5
- data/vendor/libgit2/include/git2/sys/remote.h +31 -0
- data/vendor/libgit2/include/git2/sys/stream.h +1 -1
- data/vendor/libgit2/include/git2/sys/transport.h +26 -34
- data/vendor/libgit2/include/git2/tag.h +13 -0
- data/vendor/libgit2/include/git2/tree.h +4 -17
- data/vendor/libgit2/include/git2/types.h +16 -7
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +13 -2
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +192 -290
- data/vendor/libgit2/src/alloc.c +21 -8
- data/vendor/libgit2/src/allocators/failalloc.c +92 -0
- data/vendor/libgit2/src/allocators/failalloc.h +23 -0
- data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
- data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
- data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
- data/vendor/libgit2/src/annotated_commit.c +21 -9
- data/vendor/libgit2/src/annotated_commit.h +1 -1
- data/vendor/libgit2/src/apply.c +34 -25
- data/vendor/libgit2/src/apply.h +2 -2
- data/vendor/libgit2/src/array.h +11 -11
- data/vendor/libgit2/src/attr.c +204 -82
- data/vendor/libgit2/src/attr_file.c +105 -52
- data/vendor/libgit2/src/attr_file.h +36 -15
- data/vendor/libgit2/src/attrcache.c +55 -45
- data/vendor/libgit2/src/attrcache.h +4 -5
- data/vendor/libgit2/src/blame.c +15 -9
- data/vendor/libgit2/src/blame_git.c +2 -2
- data/vendor/libgit2/src/blob.c +76 -52
- data/vendor/libgit2/src/blob.h +1 -1
- data/vendor/libgit2/src/branch.c +203 -110
- data/vendor/libgit2/src/branch.h +15 -3
- data/vendor/libgit2/src/buf.c +126 -0
- data/vendor/libgit2/src/buf.h +50 -0
- data/vendor/libgit2/src/cache.c +2 -2
- data/vendor/libgit2/src/cache.h +7 -7
- data/vendor/libgit2/src/cc-compat.h +11 -9
- data/vendor/libgit2/src/checkout.c +118 -91
- data/vendor/libgit2/src/cherrypick.c +16 -12
- data/vendor/libgit2/src/clone.c +97 -103
- data/vendor/libgit2/src/commit.c +167 -84
- data/vendor/libgit2/src/commit.h +24 -1
- data/vendor/libgit2/src/commit_graph.c +1224 -0
- data/vendor/libgit2/src/commit_graph.h +169 -0
- data/vendor/libgit2/src/commit_list.c +48 -3
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +35 -5
- data/vendor/libgit2/src/config.c +119 -64
- data/vendor/libgit2/src/config.h +15 -2
- data/vendor/libgit2/src/config_cache.c +5 -3
- data/vendor/libgit2/src/config_file.c +120 -100
- data/vendor/libgit2/src/config_mem.c +9 -9
- data/vendor/libgit2/src/config_parse.c +29 -27
- data/vendor/libgit2/src/crlf.c +36 -23
- data/vendor/libgit2/src/date.c +13 -19
- data/vendor/libgit2/src/date.h +33 -0
- data/vendor/libgit2/src/delta.c +1 -1
- data/vendor/libgit2/src/describe.c +32 -21
- data/vendor/libgit2/src/diff.c +71 -183
- data/vendor/libgit2/src/diff.h +2 -4
- data/vendor/libgit2/src/diff_driver.c +53 -51
- data/vendor/libgit2/src/diff_driver.h +3 -3
- data/vendor/libgit2/src/diff_file.c +31 -26
- data/vendor/libgit2/src/diff_generate.c +76 -23
- data/vendor/libgit2/src/diff_generate.h +5 -3
- data/vendor/libgit2/src/diff_print.c +120 -95
- data/vendor/libgit2/src/diff_stats.c +47 -34
- data/vendor/libgit2/src/{message.h → diff_stats.h} +7 -6
- data/vendor/libgit2/src/diff_tform.c +18 -16
- data/vendor/libgit2/src/diff_xdiff.c +7 -10
- data/vendor/libgit2/src/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/email.c +315 -0
- data/vendor/libgit2/src/email.h +25 -0
- data/vendor/libgit2/src/errors.c +37 -32
- data/vendor/libgit2/src/features.h.in +11 -2
- data/vendor/libgit2/src/fetch.c +77 -26
- data/vendor/libgit2/src/fetch.h +1 -1
- data/vendor/libgit2/src/fetchhead.c +27 -23
- data/vendor/libgit2/src/filebuf.c +36 -34
- data/vendor/libgit2/src/filebuf.h +1 -1
- data/vendor/libgit2/src/filter.c +278 -132
- data/vendor/libgit2/src/filter.h +46 -6
- data/vendor/libgit2/src/fs_path.c +2071 -0
- data/vendor/libgit2/src/fs_path.h +772 -0
- data/vendor/libgit2/src/futils.c +96 -90
- data/vendor/libgit2/src/futils.h +27 -15
- data/vendor/libgit2/src/graph.c +64 -9
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +5 -5
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +5 -5
- data/vendor/libgit2/src/hash/sha1/generic.c +2 -2
- data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +13 -13
- data/vendor/libgit2/src/hash/sha1/openssl.c +5 -5
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +9 -11
- data/vendor/libgit2/src/hash/sha1/win32.c +21 -17
- data/vendor/libgit2/src/hash/sha1.h +3 -1
- data/vendor/libgit2/src/hash.c +71 -36
- data/vendor/libgit2/src/hash.h +13 -13
- data/vendor/libgit2/src/hashsig.c +23 -10
- data/vendor/libgit2/src/ident.c +30 -20
- data/vendor/libgit2/src/ignore.c +63 -46
- data/vendor/libgit2/src/ignore.h +2 -2
- data/vendor/libgit2/src/index.c +184 -149
- data/vendor/libgit2/src/index.h +7 -4
- data/vendor/libgit2/src/indexer.c +143 -89
- data/vendor/libgit2/src/integer.h +64 -2
- data/vendor/libgit2/src/iterator.c +93 -73
- data/vendor/libgit2/src/iterator.h +6 -6
- data/vendor/libgit2/src/khash.h +3 -12
- data/vendor/libgit2/src/{settings.c → libgit2.c} +165 -56
- data/vendor/libgit2/src/libgit2.h +15 -0
- data/vendor/libgit2/src/mailmap.c +60 -45
- data/vendor/libgit2/src/map.h +3 -3
- data/vendor/libgit2/src/merge.c +104 -61
- data/vendor/libgit2/src/merge.h +3 -15
- data/vendor/libgit2/src/merge_driver.c +21 -15
- data/vendor/libgit2/src/merge_file.c +24 -6
- data/vendor/libgit2/src/message.c +21 -8
- data/vendor/libgit2/src/midx.c +501 -18
- data/vendor/libgit2/src/midx.h +29 -2
- data/vendor/libgit2/src/mwindow.c +103 -59
- data/vendor/libgit2/src/mwindow.h +3 -3
- data/vendor/libgit2/src/net.c +405 -71
- data/vendor/libgit2/src/net.h +26 -5
- data/vendor/libgit2/src/netops.c +7 -5
- data/vendor/libgit2/src/netops.h +3 -3
- data/vendor/libgit2/src/notes.c +40 -49
- data/vendor/libgit2/src/object.c +68 -20
- data/vendor/libgit2/src/object.h +1 -1
- data/vendor/libgit2/src/odb.c +320 -80
- data/vendor/libgit2/src/odb.h +17 -3
- data/vendor/libgit2/src/odb_loose.c +96 -86
- data/vendor/libgit2/src/odb_mempack.c +19 -6
- data/vendor/libgit2/src/odb_pack.c +402 -125
- data/vendor/libgit2/src/oid.c +16 -8
- data/vendor/libgit2/src/oid.h +15 -0
- data/vendor/libgit2/src/oidarray.c +10 -1
- data/vendor/libgit2/src/pack-objects.c +90 -69
- data/vendor/libgit2/src/pack-objects.h +11 -6
- data/vendor/libgit2/src/pack.c +337 -127
- data/vendor/libgit2/src/pack.h +25 -7
- data/vendor/libgit2/src/patch.c +17 -10
- data/vendor/libgit2/src/patch.h +1 -0
- data/vendor/libgit2/src/patch_generate.c +29 -13
- data/vendor/libgit2/src/patch_generate.h +5 -5
- data/vendor/libgit2/src/patch_parse.c +26 -25
- data/vendor/libgit2/src/path.c +86 -1768
- data/vendor/libgit2/src/path.h +39 -635
- data/vendor/libgit2/src/pathspec.c +12 -12
- data/vendor/libgit2/src/pathspec.h +2 -2
- data/vendor/libgit2/src/pool.c +13 -7
- data/vendor/libgit2/src/posix.c +14 -6
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/pqueue.h +1 -1
- data/vendor/libgit2/src/proxy.c +4 -1
- data/vendor/libgit2/src/proxy.h +1 -1
- data/vendor/libgit2/src/push.c +30 -35
- data/vendor/libgit2/src/push.h +4 -16
- data/vendor/libgit2/src/rand.c +226 -0
- data/vendor/libgit2/src/rand.h +37 -0
- data/vendor/libgit2/src/reader.c +18 -14
- data/vendor/libgit2/src/reader.h +2 -2
- data/vendor/libgit2/src/rebase.c +177 -132
- data/vendor/libgit2/src/refdb.c +30 -13
- data/vendor/libgit2/src/refdb_fs.c +548 -222
- data/vendor/libgit2/src/reflog.c +19 -14
- data/vendor/libgit2/src/refs.c +107 -72
- data/vendor/libgit2/src/refs.h +2 -2
- data/vendor/libgit2/src/refspec.c +53 -38
- data/vendor/libgit2/src/refspec.h +5 -2
- data/vendor/libgit2/src/regexp.c +1 -1
- data/vendor/libgit2/src/remote.c +960 -486
- data/vendor/libgit2/src/remote.h +16 -10
- data/vendor/libgit2/src/repository.c +702 -422
- data/vendor/libgit2/src/repository.h +26 -8
- data/vendor/libgit2/src/reset.c +16 -12
- data/vendor/libgit2/src/revert.c +16 -12
- data/vendor/libgit2/src/revparse.c +66 -48
- data/vendor/libgit2/src/revwalk.c +39 -22
- data/vendor/libgit2/src/runtime.c +162 -0
- data/vendor/libgit2/src/runtime.h +62 -0
- data/vendor/libgit2/src/settings.h +11 -0
- data/vendor/libgit2/src/signature.c +18 -11
- data/vendor/libgit2/src/signature.h +1 -1
- data/vendor/libgit2/src/sortedcache.c +1 -1
- data/vendor/libgit2/src/sortedcache.h +10 -8
- data/vendor/libgit2/src/stash.c +39 -38
- data/vendor/libgit2/src/status.c +11 -5
- data/vendor/libgit2/src/{buffer.c → str.c} +459 -136
- data/vendor/libgit2/src/str.h +357 -0
- data/vendor/libgit2/src/strarray.c +2 -1
- data/vendor/libgit2/src/streams/mbedtls.c +22 -23
- data/vendor/libgit2/src/streams/mbedtls.h +1 -1
- data/vendor/libgit2/src/streams/openssl.c +101 -201
- data/vendor/libgit2/src/streams/openssl.h +9 -1
- data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
- data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
- data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
- data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
- data/vendor/libgit2/src/streams/registry.c +5 -6
- data/vendor/libgit2/src/streams/socket.c +6 -2
- data/vendor/libgit2/src/streams/stransport.c +6 -3
- data/vendor/libgit2/src/streams/tls.c +5 -3
- data/vendor/libgit2/src/submodule.c +290 -212
- data/vendor/libgit2/src/submodule.h +10 -10
- data/vendor/libgit2/src/sysdir.c +70 -56
- data/vendor/libgit2/src/sysdir.h +15 -10
- data/vendor/libgit2/src/tag.c +72 -34
- data/vendor/libgit2/src/thread.c +140 -0
- data/vendor/libgit2/src/thread.h +479 -0
- data/vendor/libgit2/src/threadstate.c +84 -0
- data/vendor/libgit2/src/threadstate.h +24 -0
- data/vendor/libgit2/src/trace.c +3 -16
- data/vendor/libgit2/src/trace.h +17 -30
- data/vendor/libgit2/src/trailer.c +2 -2
- data/vendor/libgit2/src/transaction.c +20 -9
- data/vendor/libgit2/src/transport.c +13 -13
- data/vendor/libgit2/src/transports/auth.c +8 -10
- data/vendor/libgit2/src/transports/auth.h +2 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +23 -17
- data/vendor/libgit2/src/transports/auth_ntlm.c +20 -16
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -1
- data/vendor/libgit2/src/transports/credential.c +15 -7
- data/vendor/libgit2/src/transports/git.c +10 -14
- data/vendor/libgit2/src/transports/http.c +56 -34
- data/vendor/libgit2/src/transports/http.h +3 -3
- data/vendor/libgit2/src/transports/httpclient.c +106 -79
- data/vendor/libgit2/src/transports/httpclient.h +1 -1
- data/vendor/libgit2/src/transports/local.c +127 -119
- data/vendor/libgit2/src/transports/smart.c +61 -144
- data/vendor/libgit2/src/transports/smart.h +26 -32
- data/vendor/libgit2/src/transports/smart_pkt.c +33 -33
- data/vendor/libgit2/src/transports/smart_protocol.c +68 -44
- data/vendor/libgit2/src/transports/ssh.c +100 -131
- data/vendor/libgit2/src/transports/winhttp.c +86 -82
- data/vendor/libgit2/src/tree-cache.c +5 -5
- data/vendor/libgit2/src/tree-cache.h +2 -2
- data/vendor/libgit2/src/tree.c +150 -116
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/tsort.c +0 -2
- data/vendor/libgit2/src/unix/map.c +3 -3
- data/vendor/libgit2/src/unix/posix.h +1 -4
- data/vendor/libgit2/src/unix/pthread.h +2 -1
- data/vendor/libgit2/src/unix/realpath.c +0 -2
- data/vendor/libgit2/src/utf8.c +150 -0
- data/vendor/libgit2/src/utf8.h +52 -0
- data/vendor/libgit2/src/util.c +68 -144
- data/vendor/libgit2/src/util.h +36 -68
- data/vendor/libgit2/src/vector.c +23 -19
- data/vendor/libgit2/src/vector.h +5 -3
- data/vendor/libgit2/src/win32/findfile.c +172 -114
- data/vendor/libgit2/src/win32/findfile.h +7 -4
- data/vendor/libgit2/src/win32/map.c +1 -1
- data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
- data/vendor/libgit2/src/win32/path_w32.c +162 -33
- data/vendor/libgit2/src/win32/path_w32.h +2 -1
- data/vendor/libgit2/src/win32/posix.h +6 -7
- data/vendor/libgit2/src/win32/posix_w32.c +26 -33
- data/vendor/libgit2/src/win32/precompiled.h +0 -1
- data/vendor/libgit2/src/win32/reparse.h +4 -4
- data/vendor/libgit2/src/win32/thread.c +24 -15
- data/vendor/libgit2/src/win32/thread.h +1 -1
- data/vendor/libgit2/src/win32/w32_buffer.c +5 -6
- data/vendor/libgit2/src/win32/w32_buffer.h +2 -3
- data/vendor/libgit2/src/win32/w32_common.h +18 -9
- data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
- data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
- data/vendor/libgit2/src/win32/w32_util.h +6 -6
- data/vendor/libgit2/src/worktree.c +138 -105
- data/vendor/libgit2/src/worktree.h +1 -1
- data/vendor/libgit2/src/xdiff/git-xdiff.h +53 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +15 -15
- data/vendor/libgit2/src/xdiff/xdiffi.c +134 -108
- data/vendor/libgit2/src/xdiff/xemit.c +23 -7
- data/vendor/libgit2/src/xdiff/xhistogram.c +87 -78
- data/vendor/libgit2/src/xdiff/xinclude.h +1 -12
- data/vendor/libgit2/src/xdiff/xmerge.c +104 -117
- data/vendor/libgit2/src/xdiff/xpatience.c +6 -17
- data/vendor/libgit2/src/xdiff/xprepare.c +15 -20
- data/vendor/libgit2/src/xdiff/xutils.c +18 -7
- data/vendor/libgit2/src/zstream.c +6 -6
- data/vendor/libgit2/src/zstream.h +4 -4
- metadata +60 -24
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/buf_text.c +0 -316
- data/vendor/libgit2/src/buf_text.h +0 -122
- data/vendor/libgit2/src/buffer.h +0 -222
- data/vendor/libgit2/src/global.c +0 -363
- data/vendor/libgit2/src/global.h +0 -41
- data/vendor/libgit2/src/thread-utils.c +0 -58
- data/vendor/libgit2/src/thread-utils.h +0 -369
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
- data/vendor/libgit2/src/win32/w32_stack.c +0 -188
- data/vendor/libgit2/src/win32/w32_stack.h +0 -140
@@ -117,6 +117,26 @@ static bool diff_pathspec_match(
|
|
117
117
|
matched_pathspec, NULL);
|
118
118
|
}
|
119
119
|
|
120
|
+
static void diff_delta__flag_known_size(git_diff_file *file)
|
121
|
+
{
|
122
|
+
/*
|
123
|
+
* If we don't know the ID, that can only come from the workdir
|
124
|
+
* iterator, which means we *do* know the file size. This is a
|
125
|
+
* leaky abstraction, but alas. Otherwise, we test against the
|
126
|
+
* empty blob id.
|
127
|
+
*/
|
128
|
+
if (file->size ||
|
129
|
+
!(file->flags & GIT_DIFF_FLAG_VALID_ID) ||
|
130
|
+
git_oid_equal(&file->id, &git_oid__empty_blob_sha1))
|
131
|
+
file->flags |= GIT_DIFF_FLAG_VALID_SIZE;
|
132
|
+
}
|
133
|
+
|
134
|
+
static void diff_delta__flag_known_sizes(git_diff_delta *delta)
|
135
|
+
{
|
136
|
+
diff_delta__flag_known_size(&delta->old_file);
|
137
|
+
diff_delta__flag_known_size(&delta->new_file);
|
138
|
+
}
|
139
|
+
|
120
140
|
static int diff_delta__from_one(
|
121
141
|
git_diff_generated *diff,
|
122
142
|
git_delta_t status,
|
@@ -128,7 +148,7 @@ static int diff_delta__from_one(
|
|
128
148
|
git_diff_delta *delta;
|
129
149
|
const char *matched_pathspec;
|
130
150
|
|
131
|
-
|
151
|
+
GIT_ASSERT_ARG((oitem != NULL) ^ (nitem != NULL));
|
132
152
|
|
133
153
|
if (oitem) {
|
134
154
|
entry = oitem;
|
@@ -160,7 +180,7 @@ static int diff_delta__from_one(
|
|
160
180
|
GIT_ERROR_CHECK_ALLOC(delta);
|
161
181
|
|
162
182
|
/* This fn is just for single-sided diffs */
|
163
|
-
|
183
|
+
GIT_ASSERT(status != GIT_DELTA_MODIFIED);
|
164
184
|
delta->nfiles = 1;
|
165
185
|
|
166
186
|
if (has_old) {
|
@@ -182,6 +202,8 @@ static int diff_delta__from_one(
|
|
182
202
|
if (has_old || !git_oid_is_zero(&delta->new_file.id))
|
183
203
|
delta->new_file.flags |= GIT_DIFF_FLAG_VALID_ID;
|
184
204
|
|
205
|
+
diff_delta__flag_known_sizes(delta);
|
206
|
+
|
185
207
|
return diff_insert_delta(diff, delta, matched_pathspec);
|
186
208
|
}
|
187
209
|
|
@@ -244,6 +266,8 @@ static int diff_delta__from_two(
|
|
244
266
|
delta->new_file.flags |= GIT_DIFF_FLAG_VALID_ID;
|
245
267
|
}
|
246
268
|
|
269
|
+
diff_delta__flag_known_sizes(delta);
|
270
|
+
|
247
271
|
return diff_insert_delta(diff, delta, matched_pathspec);
|
248
272
|
}
|
249
273
|
|
@@ -408,7 +432,9 @@ static git_diff_generated *diff_generated_alloc(
|
|
408
432
|
git_diff_generated *diff;
|
409
433
|
git_diff_options dflt = GIT_DIFF_OPTIONS_INIT;
|
410
434
|
|
411
|
-
|
435
|
+
GIT_ASSERT_ARG_WITH_RETVAL(repo, NULL);
|
436
|
+
GIT_ASSERT_ARG_WITH_RETVAL(old_iter, NULL);
|
437
|
+
GIT_ASSERT_ARG_WITH_RETVAL(new_iter, NULL);
|
412
438
|
|
413
439
|
if ((diff = git__calloc(1, sizeof(git_diff_generated))) == NULL)
|
414
440
|
return NULL;
|
@@ -584,18 +610,17 @@ int git_diff__oid_for_entry(
|
|
584
610
|
const git_oid *update_match)
|
585
611
|
{
|
586
612
|
git_diff_generated *diff;
|
587
|
-
|
613
|
+
git_str full_path = GIT_STR_INIT;
|
588
614
|
git_index_entry entry = *src;
|
589
615
|
git_filter_list *fl = NULL;
|
590
616
|
int error = 0;
|
591
617
|
|
592
|
-
|
618
|
+
GIT_ASSERT(d->type == GIT_DIFF_TYPE_GENERATED);
|
593
619
|
diff = (git_diff_generated *)d;
|
594
620
|
|
595
621
|
memset(out, 0, sizeof(*out));
|
596
622
|
|
597
|
-
if (
|
598
|
-
git_repository_workdir(diff->base.repo), entry.path) < 0)
|
623
|
+
if (git_repository_workdir_path(&full_path, diff->base.repo, entry.path) < 0)
|
599
624
|
return -1;
|
600
625
|
|
601
626
|
if (!mode) {
|
@@ -604,8 +629,8 @@ int git_diff__oid_for_entry(
|
|
604
629
|
diff->base.perf.stat_calls++;
|
605
630
|
|
606
631
|
if (p_stat(full_path.ptr, &st) < 0) {
|
607
|
-
error =
|
608
|
-
|
632
|
+
error = git_fs_path_set_error(errno, entry.path, "stat");
|
633
|
+
git_str_dispose(&full_path);
|
609
634
|
return error;
|
610
635
|
}
|
611
636
|
|
@@ -668,7 +693,7 @@ int git_diff__oid_for_entry(
|
|
668
693
|
}
|
669
694
|
}
|
670
695
|
|
671
|
-
|
696
|
+
git_str_dispose(&full_path);
|
672
697
|
return error;
|
673
698
|
}
|
674
699
|
|
@@ -678,6 +703,8 @@ typedef struct {
|
|
678
703
|
git_iterator *new_iter;
|
679
704
|
const git_index_entry *oitem;
|
680
705
|
const git_index_entry *nitem;
|
706
|
+
git_strmap *submodule_cache;
|
707
|
+
bool submodule_cache_initialized;
|
681
708
|
} diff_in_progress;
|
682
709
|
|
683
710
|
#define MODE_BITS_MASK 0000777
|
@@ -692,6 +719,7 @@ static int maybe_modified_submodule(
|
|
692
719
|
git_submodule *sub;
|
693
720
|
unsigned int sm_status = 0;
|
694
721
|
git_submodule_ignore_t ign = diff->base.opts.ignore_submodules;
|
722
|
+
git_strmap *submodule_cache = NULL;
|
695
723
|
|
696
724
|
*status = GIT_DELTA_UNMODIFIED;
|
697
725
|
|
@@ -699,8 +727,23 @@ static int maybe_modified_submodule(
|
|
699
727
|
ign == GIT_SUBMODULE_IGNORE_ALL)
|
700
728
|
return 0;
|
701
729
|
|
702
|
-
if (
|
703
|
-
|
730
|
+
if (diff->base.repo->submodule_cache != NULL) {
|
731
|
+
submodule_cache = diff->base.repo->submodule_cache;
|
732
|
+
} else {
|
733
|
+
if (!info->submodule_cache_initialized) {
|
734
|
+
info->submodule_cache_initialized = true;
|
735
|
+
/*
|
736
|
+
* Try to cache the submodule information to avoid having to parse it for
|
737
|
+
* every submodule. It is okay if it fails, the cache will still be NULL
|
738
|
+
* and the submodules will be attempted to be looked up individually.
|
739
|
+
*/
|
740
|
+
git_submodule_cache_init(&info->submodule_cache, diff->base.repo);
|
741
|
+
}
|
742
|
+
submodule_cache = info->submodule_cache;
|
743
|
+
}
|
744
|
+
|
745
|
+
if ((error = git_submodule__lookup_with_cache(
|
746
|
+
&sub, diff->base.repo, info->nitem->path, submodule_cache)) < 0) {
|
704
747
|
|
705
748
|
/* GIT_EEXISTS means dir with .git in it was found - ignore it */
|
706
749
|
if (error == GIT_EEXISTS) {
|
@@ -1004,10 +1047,10 @@ static int handle_unmatched_new_item(
|
|
1004
1047
|
|
1005
1048
|
/* do not advance into directories that contain a .git file */
|
1006
1049
|
if (recurse_into_dir && !contains_oitem) {
|
1007
|
-
|
1050
|
+
git_str *full = NULL;
|
1008
1051
|
if (git_iterator_current_workdir_path(&full, info->new_iter) < 0)
|
1009
1052
|
return -1;
|
1010
|
-
if (full &&
|
1053
|
+
if (full && git_fs_path_contains(full, DOT_GIT)) {
|
1011
1054
|
/* TODO: warning if not a valid git repository */
|
1012
1055
|
recurse_into_dir = false;
|
1013
1056
|
}
|
@@ -1190,7 +1233,7 @@ int git_diff__from_iterators(
|
|
1190
1233
|
const git_diff_options *opts)
|
1191
1234
|
{
|
1192
1235
|
git_diff_generated *diff;
|
1193
|
-
diff_in_progress info;
|
1236
|
+
diff_in_progress info = {0};
|
1194
1237
|
int error = 0;
|
1195
1238
|
|
1196
1239
|
*out = NULL;
|
@@ -1204,8 +1247,9 @@ int git_diff__from_iterators(
|
|
1204
1247
|
|
1205
1248
|
/* make iterators have matching icase behavior */
|
1206
1249
|
if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_IGNORE_CASE)) {
|
1207
|
-
git_iterator_set_ignore_case(old_iter, true)
|
1208
|
-
|
1250
|
+
if ((error = git_iterator_set_ignore_case(old_iter, true)) < 0 ||
|
1251
|
+
(error = git_iterator_set_ignore_case(new_iter, true)) < 0)
|
1252
|
+
goto cleanup;
|
1209
1253
|
}
|
1210
1254
|
|
1211
1255
|
/* finish initialization */
|
@@ -1257,6 +1301,8 @@ cleanup:
|
|
1257
1301
|
*out = &diff->base;
|
1258
1302
|
else
|
1259
1303
|
git_diff_free(&diff->base);
|
1304
|
+
if (info.submodule_cache)
|
1305
|
+
git_submodule_cache_free(info.submodule_cache);
|
1260
1306
|
|
1261
1307
|
return error;
|
1262
1308
|
}
|
@@ -1302,7 +1348,8 @@ int git_diff_tree_to_tree(
|
|
1302
1348
|
char *prefix = NULL;
|
1303
1349
|
int error = 0;
|
1304
1350
|
|
1305
|
-
|
1351
|
+
GIT_ASSERT_ARG(out);
|
1352
|
+
GIT_ASSERT_ARG(repo);
|
1306
1353
|
|
1307
1354
|
*out = NULL;
|
1308
1355
|
|
@@ -1358,7 +1405,8 @@ int git_diff_tree_to_index(
|
|
1358
1405
|
bool index_ignore_case = false;
|
1359
1406
|
int error = 0;
|
1360
1407
|
|
1361
|
-
|
1408
|
+
GIT_ASSERT_ARG(out);
|
1409
|
+
GIT_ASSERT_ARG(repo);
|
1362
1410
|
|
1363
1411
|
*out = NULL;
|
1364
1412
|
|
@@ -1401,7 +1449,8 @@ int git_diff_index_to_workdir(
|
|
1401
1449
|
char *prefix = NULL;
|
1402
1450
|
int error = 0;
|
1403
1451
|
|
1404
|
-
|
1452
|
+
GIT_ASSERT_ARG(out);
|
1453
|
+
GIT_ASSERT_ARG(repo);
|
1405
1454
|
|
1406
1455
|
*out = NULL;
|
1407
1456
|
|
@@ -1444,7 +1493,8 @@ int git_diff_tree_to_workdir(
|
|
1444
1493
|
git_index *index;
|
1445
1494
|
int error;
|
1446
1495
|
|
1447
|
-
|
1496
|
+
GIT_ASSERT_ARG(out);
|
1497
|
+
GIT_ASSERT_ARG(repo);
|
1448
1498
|
|
1449
1499
|
*out = NULL;
|
1450
1500
|
|
@@ -1477,7 +1527,8 @@ int git_diff_tree_to_workdir_with_index(
|
|
1477
1527
|
git_index *index = NULL;
|
1478
1528
|
int error = 0;
|
1479
1529
|
|
1480
|
-
|
1530
|
+
GIT_ASSERT_ARG(out);
|
1531
|
+
GIT_ASSERT_ARG(repo);
|
1481
1532
|
|
1482
1533
|
*out = NULL;
|
1483
1534
|
|
@@ -1513,7 +1564,9 @@ int git_diff_index_to_index(
|
|
1513
1564
|
char *prefix = NULL;
|
1514
1565
|
int error;
|
1515
1566
|
|
1516
|
-
|
1567
|
+
GIT_ASSERT_ARG(out);
|
1568
|
+
GIT_ASSERT_ARG(old_index);
|
1569
|
+
GIT_ASSERT_ARG(new_index);
|
1517
1570
|
|
1518
1571
|
*out = NULL;
|
1519
1572
|
|
@@ -18,7 +18,7 @@ enum {
|
|
18
18
|
GIT_DIFFCAPS_IGNORE_STAT = (1 << 1), /* use stat? */
|
19
19
|
GIT_DIFFCAPS_TRUST_MODE_BITS = (1 << 2), /* use st_mode? */
|
20
20
|
GIT_DIFFCAPS_TRUST_CTIME = (1 << 3), /* use st_ctime? */
|
21
|
-
GIT_DIFFCAPS_USE_DEV = (1 << 4)
|
21
|
+
GIT_DIFFCAPS_USE_DEV = (1 << 4) /* use st_dev? */
|
22
22
|
};
|
23
23
|
|
24
24
|
#define DIFF_FLAGS_KNOWN_BINARY (GIT_DIFF_FLAG_BINARY|GIT_DIFF_FLAG_NOT_BINARY)
|
@@ -36,7 +36,7 @@ enum {
|
|
36
36
|
GIT_DIFF_FLAG__TO_SPLIT = (1 << 17), /* split entry during rename det. */
|
37
37
|
GIT_DIFF_FLAG__IS_RENAME_TARGET = (1 << 18),
|
38
38
|
GIT_DIFF_FLAG__IS_RENAME_SOURCE = (1 << 19),
|
39
|
-
GIT_DIFF_FLAG__HAS_SELF_SIMILARITY = (1 << 20)
|
39
|
+
GIT_DIFF_FLAG__HAS_SELF_SIMILARITY = (1 << 20)
|
40
40
|
};
|
41
41
|
|
42
42
|
#define GIT_DIFF_FLAG__CLEAR_INTERNAL(F) (F) = ((F) & 0x00FFFF)
|
@@ -119,8 +119,10 @@ GIT_INLINE(int) git_diff_file__resolve_zero_size(
|
|
119
119
|
|
120
120
|
git_odb_free(odb);
|
121
121
|
|
122
|
-
if (!error)
|
122
|
+
if (!error) {
|
123
123
|
file->size = (git_object_size_t)len;
|
124
|
+
file->flags |= GIT_DIFF_FLAG_VALID_SIZE;
|
125
|
+
}
|
124
126
|
|
125
127
|
return error;
|
126
128
|
}
|