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
@@ -7,8 +7,7 @@
|
|
7
7
|
|
8
8
|
#include "refspec.h"
|
9
9
|
|
10
|
-
#include "
|
11
|
-
|
10
|
+
#include "buf.h"
|
12
11
|
#include "refs.h"
|
13
12
|
#include "util.h"
|
14
13
|
#include "vector.h"
|
@@ -24,7 +23,8 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch)
|
|
24
23
|
int valid = 0;
|
25
24
|
unsigned int flags;
|
26
25
|
|
27
|
-
|
26
|
+
GIT_ASSERT_ARG(refspec);
|
27
|
+
GIT_ASSERT_ARG(input);
|
28
28
|
|
29
29
|
memset(refspec, 0x0, sizeof(git_refspec));
|
30
30
|
refspec->push = !is_fetch;
|
@@ -180,7 +180,8 @@ void git_refspec__dispose(git_refspec *refspec)
|
|
180
180
|
int git_refspec_parse(git_refspec **out_refspec, const char *input, int is_fetch)
|
181
181
|
{
|
182
182
|
git_refspec *refspec;
|
183
|
-
|
183
|
+
GIT_ASSERT_ARG(out_refspec);
|
184
|
+
GIT_ASSERT_ARG(input);
|
184
185
|
|
185
186
|
*out_refspec = NULL;
|
186
187
|
|
@@ -219,7 +220,7 @@ const char *git_refspec_string(const git_refspec *refspec)
|
|
219
220
|
|
220
221
|
int git_refspec_force(const git_refspec *refspec)
|
221
222
|
{
|
222
|
-
|
223
|
+
GIT_ASSERT_ARG(refspec);
|
223
224
|
|
224
225
|
return refspec->force;
|
225
226
|
}
|
@@ -241,13 +242,12 @@ int git_refspec_dst_matches(const git_refspec *refspec, const char *refname)
|
|
241
242
|
}
|
242
243
|
|
243
244
|
static int refspec_transform(
|
244
|
-
|
245
|
+
git_str *out, const char *from, const char *to, const char *name)
|
245
246
|
{
|
246
247
|
const char *from_star, *to_star;
|
247
248
|
size_t replacement_len, star_offset;
|
248
249
|
|
249
|
-
|
250
|
-
git_buf_clear(out);
|
250
|
+
git_str_clear(out);
|
251
251
|
|
252
252
|
/*
|
253
253
|
* There are two parts to each side of a refspec, the bit
|
@@ -258,28 +258,34 @@ static int refspec_transform(
|
|
258
258
|
from_star = strchr(from, '*');
|
259
259
|
to_star = strchr(to, '*');
|
260
260
|
|
261
|
-
|
261
|
+
GIT_ASSERT(from_star && to_star);
|
262
262
|
|
263
263
|
/* star offset, both in 'from' and in 'name' */
|
264
264
|
star_offset = from_star - from;
|
265
265
|
|
266
266
|
/* the first half is copied over */
|
267
|
-
|
267
|
+
git_str_put(out, to, to_star - to);
|
268
268
|
|
269
269
|
/*
|
270
270
|
* Copy over the name, but exclude the trailing part in "from" starting
|
271
271
|
* after the glob
|
272
272
|
*/
|
273
273
|
replacement_len = strlen(name + star_offset) - strlen(from_star + 1);
|
274
|
-
|
274
|
+
git_str_put(out, name + star_offset, replacement_len);
|
275
275
|
|
276
|
-
return
|
276
|
+
return git_str_puts(out, to_star + 1);
|
277
277
|
}
|
278
278
|
|
279
279
|
int git_refspec_transform(git_buf *out, const git_refspec *spec, const char *name)
|
280
280
|
{
|
281
|
-
|
282
|
-
|
281
|
+
GIT_BUF_WRAP_PRIVATE(out, git_refspec__transform, spec, name);
|
282
|
+
}
|
283
|
+
|
284
|
+
int git_refspec__transform(git_str *out, const git_refspec *spec, const char *name)
|
285
|
+
{
|
286
|
+
GIT_ASSERT_ARG(out);
|
287
|
+
GIT_ASSERT_ARG(spec);
|
288
|
+
GIT_ASSERT_ARG(name);
|
283
289
|
|
284
290
|
if (!git_refspec_src_matches(spec, name)) {
|
285
291
|
git_error_set(GIT_ERROR_INVALID, "ref '%s' doesn't match the source", name);
|
@@ -287,15 +293,21 @@ int git_refspec_transform(git_buf *out, const git_refspec *spec, const char *nam
|
|
287
293
|
}
|
288
294
|
|
289
295
|
if (!spec->pattern)
|
290
|
-
return
|
296
|
+
return git_str_puts(out, spec->dst ? spec->dst : "");
|
291
297
|
|
292
298
|
return refspec_transform(out, spec->src, spec->dst, name);
|
293
299
|
}
|
294
300
|
|
295
301
|
int git_refspec_rtransform(git_buf *out, const git_refspec *spec, const char *name)
|
296
302
|
{
|
297
|
-
|
298
|
-
|
303
|
+
GIT_BUF_WRAP_PRIVATE(out, git_refspec__rtransform, spec, name);
|
304
|
+
}
|
305
|
+
|
306
|
+
int git_refspec__rtransform(git_str *out, const git_refspec *spec, const char *name)
|
307
|
+
{
|
308
|
+
GIT_ASSERT_ARG(out);
|
309
|
+
GIT_ASSERT_ARG(spec);
|
310
|
+
GIT_ASSERT_ARG(name);
|
299
311
|
|
300
312
|
if (!git_refspec_dst_matches(spec, name)) {
|
301
313
|
git_error_set(GIT_ERROR_INVALID, "ref '%s' doesn't match the destination", name);
|
@@ -303,52 +315,55 @@ int git_refspec_rtransform(git_buf *out, const git_refspec *spec, const char *na
|
|
303
315
|
}
|
304
316
|
|
305
317
|
if (!spec->pattern)
|
306
|
-
return
|
318
|
+
return git_str_puts(out, spec->src);
|
307
319
|
|
308
320
|
return refspec_transform(out, spec->dst, spec->src, name);
|
309
321
|
}
|
310
322
|
|
311
|
-
int git_refspec__serialize(
|
323
|
+
int git_refspec__serialize(git_str *out, const git_refspec *refspec)
|
312
324
|
{
|
313
325
|
if (refspec->force)
|
314
|
-
|
326
|
+
git_str_putc(out, '+');
|
315
327
|
|
316
|
-
|
328
|
+
git_str_printf(out, "%s:%s",
|
317
329
|
refspec->src != NULL ? refspec->src : "",
|
318
330
|
refspec->dst != NULL ? refspec->dst : "");
|
319
331
|
|
320
|
-
return
|
332
|
+
return git_str_oom(out) == false;
|
321
333
|
}
|
322
334
|
|
323
335
|
int git_refspec_is_wildcard(const git_refspec *spec)
|
324
336
|
{
|
325
|
-
|
337
|
+
GIT_ASSERT_ARG(spec);
|
338
|
+
GIT_ASSERT_ARG(spec->src);
|
326
339
|
|
327
340
|
return (spec->src[strlen(spec->src) - 1] == '*');
|
328
341
|
}
|
329
342
|
|
330
343
|
git_direction git_refspec_direction(const git_refspec *spec)
|
331
344
|
{
|
332
|
-
|
345
|
+
GIT_ASSERT_ARG(spec);
|
333
346
|
|
334
347
|
return spec->push;
|
335
348
|
}
|
336
349
|
|
337
350
|
int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
|
338
351
|
{
|
339
|
-
|
352
|
+
git_str buf = GIT_STR_INIT;
|
340
353
|
size_t j, pos;
|
341
354
|
git_remote_head key;
|
342
355
|
git_refspec *cur;
|
343
356
|
|
344
|
-
const char*
|
357
|
+
const char *formatters[] = {
|
345
358
|
GIT_REFS_DIR "%s",
|
346
359
|
GIT_REFS_TAGS_DIR "%s",
|
347
360
|
GIT_REFS_HEADS_DIR "%s",
|
348
361
|
NULL
|
349
362
|
};
|
350
363
|
|
351
|
-
|
364
|
+
GIT_ASSERT_ARG(out);
|
365
|
+
GIT_ASSERT_ARG(spec);
|
366
|
+
GIT_ASSERT_ARG(refs);
|
352
367
|
|
353
368
|
cur = git__calloc(1, sizeof(git_refspec));
|
354
369
|
GIT_ERROR_CHECK_ALLOC(cur);
|
@@ -362,14 +377,14 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
|
|
362
377
|
/* shorthand on the lhs */
|
363
378
|
if (git__prefixcmp(spec->src, GIT_REFS_DIR)) {
|
364
379
|
for (j = 0; formatters[j]; j++) {
|
365
|
-
|
366
|
-
|
367
|
-
|
380
|
+
git_str_clear(&buf);
|
381
|
+
git_str_printf(&buf, formatters[j], spec->src);
|
382
|
+
GIT_ERROR_CHECK_ALLOC_STR(&buf);
|
368
383
|
|
369
|
-
key.name = (char *)
|
384
|
+
key.name = (char *) git_str_cstr(&buf);
|
370
385
|
if (!git_vector_search(&pos, refs, &key)) {
|
371
386
|
/* we found something to match the shorthand, set src to that */
|
372
|
-
cur->src =
|
387
|
+
cur->src = git_str_detach(&buf);
|
373
388
|
}
|
374
389
|
}
|
375
390
|
}
|
@@ -383,18 +398,18 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
|
|
383
398
|
if (spec->dst && git__prefixcmp(spec->dst, GIT_REFS_DIR)) {
|
384
399
|
/* if it starts with "remotes" then we just prepend "refs/" */
|
385
400
|
if (!git__prefixcmp(spec->dst, "remotes/")) {
|
386
|
-
|
401
|
+
git_str_puts(&buf, GIT_REFS_DIR);
|
387
402
|
} else {
|
388
|
-
|
403
|
+
git_str_puts(&buf, GIT_REFS_HEADS_DIR);
|
389
404
|
}
|
390
405
|
|
391
|
-
|
392
|
-
|
406
|
+
git_str_puts(&buf, spec->dst);
|
407
|
+
GIT_ERROR_CHECK_ALLOC_STR(&buf);
|
393
408
|
|
394
|
-
cur->dst =
|
409
|
+
cur->dst = git_str_detach(&buf);
|
395
410
|
}
|
396
411
|
|
397
|
-
|
412
|
+
git_str_dispose(&buf);
|
398
413
|
|
399
414
|
if (cur->dst == NULL && spec->dst != NULL) {
|
400
415
|
cur->dst = git__strdup(spec->dst);
|
@@ -10,7 +10,7 @@
|
|
10
10
|
#include "common.h"
|
11
11
|
|
12
12
|
#include "git2/refspec.h"
|
13
|
-
#include "
|
13
|
+
#include "str.h"
|
14
14
|
#include "vector.h"
|
15
15
|
|
16
16
|
struct git_refspec {
|
@@ -25,6 +25,9 @@ struct git_refspec {
|
|
25
25
|
|
26
26
|
#define GIT_REFSPEC_TAGS "refs/tags/*:refs/tags/*"
|
27
27
|
|
28
|
+
int git_refspec__transform(git_str *out, const git_refspec *spec, const char *name);
|
29
|
+
int git_refspec__rtransform(git_str *out, const git_refspec *spec, const char *name);
|
30
|
+
|
28
31
|
int git_refspec__parse(
|
29
32
|
struct git_refspec *refspec,
|
30
33
|
const char *str,
|
@@ -32,7 +35,7 @@ int git_refspec__parse(
|
|
32
35
|
|
33
36
|
void git_refspec__dispose(git_refspec *refspec);
|
34
37
|
|
35
|
-
int git_refspec__serialize(
|
38
|
+
int git_refspec__serialize(git_str *out, const git_refspec *refspec);
|
36
39
|
|
37
40
|
/**
|
38
41
|
* Determines if a refspec is a wildcard refspec.
|
data/vendor/libgit2/src/regexp.c
CHANGED
@@ -45,7 +45,7 @@ int git_regexp_search(const git_regexp *r, const char *string, size_t nmatches,
|
|
45
45
|
int error;
|
46
46
|
size_t i;
|
47
47
|
|
48
|
-
/* The ovec array always needs to be a
|
48
|
+
/* The ovec array always needs to be a multiple of three */
|
49
49
|
if (nmatches <= ARRAY_SIZE(static_ovec) / 3)
|
50
50
|
ovec = static_ovec;
|
51
51
|
else
|