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
data/vendor/libgit2/src/config.c
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#include "git2/config.h"
|
11
11
|
#include "git2/sys/config.h"
|
12
12
|
|
13
|
-
#include "
|
13
|
+
#include "buf.h"
|
14
14
|
#include "config_backend.h"
|
15
15
|
#include "regexp.h"
|
16
16
|
#include "sysdir.h"
|
@@ -108,7 +108,8 @@ int git_config_add_file_ondisk(
|
|
108
108
|
struct stat st;
|
109
109
|
int res;
|
110
110
|
|
111
|
-
|
111
|
+
GIT_ASSERT_ARG(cfg);
|
112
|
+
GIT_ASSERT_ARG(path);
|
112
113
|
|
113
114
|
res = p_stat(path, &st);
|
114
115
|
if (res < 0 && errno != ENOENT && errno != ENOTDIR) {
|
@@ -316,7 +317,8 @@ int git_config_add_backend(
|
|
316
317
|
backend_internal *internal;
|
317
318
|
int result;
|
318
319
|
|
319
|
-
|
320
|
+
GIT_ASSERT_ARG(cfg);
|
321
|
+
GIT_ASSERT_ARG(backend);
|
320
322
|
|
321
323
|
GIT_ERROR_CHECK_VERSION(backend, GIT_CONFIG_BACKEND_VERSION, "git_config_backend");
|
322
324
|
|
@@ -510,11 +512,12 @@ int git_config_backend_foreach_match(
|
|
510
512
|
void *payload)
|
511
513
|
{
|
512
514
|
git_config_entry *entry;
|
513
|
-
git_config_iterator*
|
515
|
+
git_config_iterator *iter;
|
514
516
|
git_regexp regex;
|
515
517
|
int error = 0;
|
516
518
|
|
517
|
-
|
519
|
+
GIT_ASSERT_ARG(backend);
|
520
|
+
GIT_ASSERT_ARG(cb);
|
518
521
|
|
519
522
|
if (regexp && git_regexp_compile(®ex, regexp, 0) < 0)
|
520
523
|
return -1;
|
@@ -846,7 +849,40 @@ static int is_readonly(const git_config *cfg)
|
|
846
849
|
return 1;
|
847
850
|
}
|
848
851
|
|
849
|
-
int
|
852
|
+
static int git_config__parse_path(git_str *out, const char *value)
|
853
|
+
{
|
854
|
+
GIT_ASSERT_ARG(out);
|
855
|
+
GIT_ASSERT_ARG(value);
|
856
|
+
|
857
|
+
if (value[0] == '~') {
|
858
|
+
if (value[1] != '\0' && value[1] != '/') {
|
859
|
+
git_error_set(GIT_ERROR_CONFIG, "retrieving a homedir by name is not supported");
|
860
|
+
return -1;
|
861
|
+
}
|
862
|
+
|
863
|
+
return git_sysdir_expand_global_file(out, value[1] ? &value[2] : NULL);
|
864
|
+
}
|
865
|
+
|
866
|
+
return git_str_sets(out, value);
|
867
|
+
}
|
868
|
+
|
869
|
+
int git_config_parse_path(git_buf *out, const char *value)
|
870
|
+
{
|
871
|
+
GIT_BUF_WRAP_PRIVATE(out, git_config__parse_path, value);
|
872
|
+
}
|
873
|
+
|
874
|
+
int git_config_get_path(
|
875
|
+
git_buf *out,
|
876
|
+
const git_config *cfg,
|
877
|
+
const char *name)
|
878
|
+
{
|
879
|
+
GIT_BUF_WRAP_PRIVATE(out, git_config__get_path, cfg, name);
|
880
|
+
}
|
881
|
+
|
882
|
+
int git_config__get_path(
|
883
|
+
git_str *out,
|
884
|
+
const git_config *cfg,
|
885
|
+
const char *name)
|
850
886
|
{
|
851
887
|
git_config_entry *entry;
|
852
888
|
int error;
|
@@ -854,7 +890,7 @@ int git_config_get_path(git_buf *out, const git_config *cfg, const char *name)
|
|
854
890
|
if ((error = get_entry(&entry, cfg, name, true, GET_ALL_ERRORS)) < 0)
|
855
891
|
return error;
|
856
892
|
|
857
|
-
error =
|
893
|
+
error = git_config__parse_path(out, entry->value);
|
858
894
|
git_config_entry_free(entry);
|
859
895
|
|
860
896
|
return error;
|
@@ -881,18 +917,25 @@ int git_config_get_string(
|
|
881
917
|
|
882
918
|
int git_config_get_string_buf(
|
883
919
|
git_buf *out, const git_config *cfg, const char *name)
|
920
|
+
{
|
921
|
+
GIT_BUF_WRAP_PRIVATE(out, git_config__get_string_buf, cfg, name);
|
922
|
+
}
|
923
|
+
|
924
|
+
int git_config__get_string_buf(
|
925
|
+
git_str *out, const git_config *cfg, const char *name)
|
884
926
|
{
|
885
927
|
git_config_entry *entry;
|
886
928
|
int ret;
|
887
929
|
const char *str;
|
888
930
|
|
889
|
-
|
931
|
+
GIT_ASSERT_ARG(out);
|
932
|
+
GIT_ASSERT_ARG(cfg);
|
890
933
|
|
891
934
|
ret = get_entry(&entry, cfg, name, true, GET_ALL_ERRORS);
|
892
935
|
str = !ret ? (entry->value ? entry->value : "") : NULL;
|
893
936
|
|
894
937
|
if (str)
|
895
|
-
ret =
|
938
|
+
ret = git_str_puts(out, str);
|
896
939
|
|
897
940
|
git_config_entry_free(entry);
|
898
941
|
|
@@ -1084,87 +1127,116 @@ void git_config_iterator_free(git_config_iterator *iter)
|
|
1084
1127
|
|
1085
1128
|
int git_config_find_global(git_buf *path)
|
1086
1129
|
{
|
1087
|
-
|
1130
|
+
GIT_BUF_WRAP_PRIVATE(path, git_sysdir_find_global_file, GIT_CONFIG_FILENAME_GLOBAL);
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
int git_config__find_global(git_str *path)
|
1134
|
+
{
|
1088
1135
|
return git_sysdir_find_global_file(path, GIT_CONFIG_FILENAME_GLOBAL);
|
1089
1136
|
}
|
1090
1137
|
|
1091
1138
|
int git_config_find_xdg(git_buf *path)
|
1092
1139
|
{
|
1093
|
-
|
1140
|
+
GIT_BUF_WRAP_PRIVATE(path, git_sysdir_find_global_file, GIT_CONFIG_FILENAME_XDG);
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
int git_config__find_xdg(git_str *path)
|
1144
|
+
{
|
1094
1145
|
return git_sysdir_find_xdg_file(path, GIT_CONFIG_FILENAME_XDG);
|
1095
1146
|
}
|
1096
1147
|
|
1097
1148
|
int git_config_find_system(git_buf *path)
|
1098
1149
|
{
|
1099
|
-
|
1150
|
+
GIT_BUF_WRAP_PRIVATE(path, git_sysdir_find_global_file, GIT_CONFIG_FILENAME_SYSTEM);
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
int git_config__find_system(git_str *path)
|
1154
|
+
{
|
1100
1155
|
return git_sysdir_find_system_file(path, GIT_CONFIG_FILENAME_SYSTEM);
|
1101
1156
|
}
|
1102
1157
|
|
1103
1158
|
int git_config_find_programdata(git_buf *path)
|
1104
1159
|
{
|
1105
|
-
|
1160
|
+
git_str str = GIT_STR_INIT;
|
1161
|
+
int error;
|
1106
1162
|
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1163
|
+
if ((error = git_buf_tostr(&str, path)) == 0 &&
|
1164
|
+
(error = git_config__find_programdata(&str)) == 0)
|
1165
|
+
error = git_buf_fromstr(path, &str);
|
1166
|
+
|
1167
|
+
git_str_dispose(&str);
|
1168
|
+
return error;
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
int git_config__find_programdata(git_str *path)
|
1172
|
+
{
|
1173
|
+
bool is_safe;
|
1174
|
+
|
1175
|
+
if (git_sysdir_find_programdata_file(path, GIT_CONFIG_FILENAME_PROGRAMDATA) < 0 ||
|
1176
|
+
git_fs_path_owner_is_system_or_current_user(&is_safe, path->ptr) < 0)
|
1177
|
+
return -1;
|
1178
|
+
|
1179
|
+
if (!is_safe) {
|
1180
|
+
git_error_set(GIT_ERROR_CONFIG, "programdata path has invalid ownership");
|
1181
|
+
return -1;
|
1182
|
+
}
|
1112
1183
|
|
1113
|
-
return
|
1184
|
+
return 0;
|
1114
1185
|
}
|
1115
1186
|
|
1116
|
-
int git_config__global_location(
|
1187
|
+
int git_config__global_location(git_str *buf)
|
1117
1188
|
{
|
1118
|
-
const
|
1189
|
+
const git_str *paths;
|
1119
1190
|
const char *sep, *start;
|
1120
1191
|
|
1121
1192
|
if (git_sysdir_get(&paths, GIT_SYSDIR_GLOBAL) < 0)
|
1122
1193
|
return -1;
|
1123
1194
|
|
1124
1195
|
/* no paths, so give up */
|
1125
|
-
if (!paths || !
|
1196
|
+
if (!paths || !git_str_len(paths))
|
1126
1197
|
return -1;
|
1127
1198
|
|
1128
1199
|
/* find unescaped separator or end of string */
|
1129
|
-
for (sep = start =
|
1200
|
+
for (sep = start = git_str_cstr(paths); *sep; ++sep) {
|
1130
1201
|
if (*sep == GIT_PATH_LIST_SEPARATOR &&
|
1131
1202
|
(sep <= start || sep[-1] != '\\'))
|
1132
1203
|
break;
|
1133
1204
|
}
|
1134
1205
|
|
1135
|
-
if (
|
1206
|
+
if (git_str_set(buf, start, (size_t)(sep - start)) < 0)
|
1136
1207
|
return -1;
|
1137
1208
|
|
1138
|
-
return
|
1209
|
+
return git_str_joinpath(buf, buf->ptr, GIT_CONFIG_FILENAME_GLOBAL);
|
1139
1210
|
}
|
1140
1211
|
|
1141
1212
|
int git_config_open_default(git_config **out)
|
1142
1213
|
{
|
1143
1214
|
int error;
|
1144
1215
|
git_config *cfg = NULL;
|
1145
|
-
|
1216
|
+
git_str buf = GIT_STR_INIT;
|
1146
1217
|
|
1147
1218
|
if ((error = git_config_new(&cfg)) < 0)
|
1148
1219
|
return error;
|
1149
1220
|
|
1150
|
-
if (!
|
1221
|
+
if (!git_config__find_global(&buf) ||
|
1222
|
+
!git_config__global_location(&buf)) {
|
1151
1223
|
error = git_config_add_file_ondisk(cfg, buf.ptr,
|
1152
1224
|
GIT_CONFIG_LEVEL_GLOBAL, NULL, 0);
|
1153
1225
|
}
|
1154
1226
|
|
1155
|
-
if (!error && !
|
1227
|
+
if (!error && !git_config__find_xdg(&buf))
|
1156
1228
|
error = git_config_add_file_ondisk(cfg, buf.ptr,
|
1157
1229
|
GIT_CONFIG_LEVEL_XDG, NULL, 0);
|
1158
1230
|
|
1159
|
-
if (!error && !
|
1231
|
+
if (!error && !git_config__find_system(&buf))
|
1160
1232
|
error = git_config_add_file_ondisk(cfg, buf.ptr,
|
1161
1233
|
GIT_CONFIG_LEVEL_SYSTEM, NULL, 0);
|
1162
1234
|
|
1163
|
-
if (!error && !
|
1235
|
+
if (!error && !git_config__find_programdata(&buf))
|
1164
1236
|
error = git_config_add_file_ondisk(cfg, buf.ptr,
|
1165
1237
|
GIT_CONFIG_LEVEL_PROGRAMDATA, NULL, 0);
|
1166
1238
|
|
1167
|
-
|
1239
|
+
git_str_dispose(&buf);
|
1168
1240
|
|
1169
1241
|
if (error) {
|
1170
1242
|
git_config_free(cfg);
|
@@ -1182,7 +1254,7 @@ int git_config_lock(git_transaction **out, git_config *cfg)
|
|
1182
1254
|
git_config_backend *backend;
|
1183
1255
|
backend_internal *internal;
|
1184
1256
|
|
1185
|
-
|
1257
|
+
GIT_ASSERT_ARG(cfg);
|
1186
1258
|
|
1187
1259
|
internal = git_vector_get(&cfg->backends, 0);
|
1188
1260
|
if (!internal || !internal->backend) {
|
@@ -1202,7 +1274,7 @@ int git_config_unlock(git_config *cfg, int commit)
|
|
1202
1274
|
git_config_backend *backend;
|
1203
1275
|
backend_internal *internal;
|
1204
1276
|
|
1205
|
-
|
1277
|
+
GIT_ASSERT_ARG(cfg);
|
1206
1278
|
|
1207
1279
|
internal = git_vector_get(&cfg->backends, 0);
|
1208
1280
|
if (!internal || !internal->backend) {
|
@@ -1358,24 +1430,6 @@ fail_parse:
|
|
1358
1430
|
return -1;
|
1359
1431
|
}
|
1360
1432
|
|
1361
|
-
int git_config_parse_path(git_buf *out, const char *value)
|
1362
|
-
{
|
1363
|
-
assert(out && value);
|
1364
|
-
|
1365
|
-
git_buf_sanitize(out);
|
1366
|
-
|
1367
|
-
if (value[0] == '~') {
|
1368
|
-
if (value[1] != '\0' && value[1] != '/') {
|
1369
|
-
git_error_set(GIT_ERROR_CONFIG, "retrieving a homedir by name is not supported");
|
1370
|
-
return -1;
|
1371
|
-
}
|
1372
|
-
|
1373
|
-
return git_sysdir_expand_global_file(out, value[1] ? &value[2] : NULL);
|
1374
|
-
}
|
1375
|
-
|
1376
|
-
return git_buf_sets(out, value);
|
1377
|
-
}
|
1378
|
-
|
1379
1433
|
static int normalize_section(char *start, char *end)
|
1380
1434
|
{
|
1381
1435
|
char *scan;
|
@@ -1405,7 +1459,8 @@ int git_config__normalize_name(const char *in, char **out)
|
|
1405
1459
|
{
|
1406
1460
|
char *name, *fdot, *ldot;
|
1407
1461
|
|
1408
|
-
|
1462
|
+
GIT_ASSERT_ARG(in);
|
1463
|
+
GIT_ASSERT_ARG(out);
|
1409
1464
|
|
1410
1465
|
name = git__strdup(in);
|
1411
1466
|
GIT_ERROR_CHECK_ALLOC(name);
|
@@ -1437,7 +1492,7 @@ invalid:
|
|
1437
1492
|
|
1438
1493
|
struct rename_data {
|
1439
1494
|
git_config *config;
|
1440
|
-
|
1495
|
+
git_str *name;
|
1441
1496
|
size_t old_len;
|
1442
1497
|
};
|
1443
1498
|
|
@@ -1447,15 +1502,15 @@ static int rename_config_entries_cb(
|
|
1447
1502
|
{
|
1448
1503
|
int error = 0;
|
1449
1504
|
struct rename_data *data = (struct rename_data *)payload;
|
1450
|
-
size_t base_len =
|
1505
|
+
size_t base_len = git_str_len(data->name);
|
1451
1506
|
|
1452
1507
|
if (base_len > 0 &&
|
1453
|
-
!(error =
|
1508
|
+
!(error = git_str_puts(data->name, entry->name + data->old_len)))
|
1454
1509
|
{
|
1455
1510
|
error = git_config_set_string(
|
1456
|
-
data->config,
|
1511
|
+
data->config, git_str_cstr(data->name), entry->value);
|
1457
1512
|
|
1458
|
-
|
1513
|
+
git_str_truncate(data->name, base_len);
|
1459
1514
|
}
|
1460
1515
|
|
1461
1516
|
if (!error)
|
@@ -1470,13 +1525,13 @@ int git_config_rename_section(
|
|
1470
1525
|
const char *new_section_name)
|
1471
1526
|
{
|
1472
1527
|
git_config *config;
|
1473
|
-
|
1528
|
+
git_str pattern = GIT_STR_INIT, replace = GIT_STR_INIT;
|
1474
1529
|
int error = 0;
|
1475
1530
|
struct rename_data data;
|
1476
1531
|
|
1477
|
-
|
1532
|
+
git_str_puts_escape_regex(&pattern, old_section_name);
|
1478
1533
|
|
1479
|
-
if ((error =
|
1534
|
+
if ((error = git_str_puts(&pattern, "\\..+")) < 0)
|
1480
1535
|
goto cleanup;
|
1481
1536
|
|
1482
1537
|
if ((error = git_repository_config__weakptr(&config, repo)) < 0)
|
@@ -1486,7 +1541,7 @@ int git_config_rename_section(
|
|
1486
1541
|
data.name = &replace;
|
1487
1542
|
data.old_len = strlen(old_section_name) + 1;
|
1488
1543
|
|
1489
|
-
if ((error =
|
1544
|
+
if ((error = git_str_join(&replace, '.', new_section_name, "")) < 0)
|
1490
1545
|
goto cleanup;
|
1491
1546
|
|
1492
1547
|
if (new_section_name != NULL &&
|
@@ -1498,11 +1553,11 @@ int git_config_rename_section(
|
|
1498
1553
|
}
|
1499
1554
|
|
1500
1555
|
error = git_config_foreach_match(
|
1501
|
-
config,
|
1556
|
+
config, git_str_cstr(&pattern), rename_config_entries_cb, &data);
|
1502
1557
|
|
1503
1558
|
cleanup:
|
1504
|
-
|
1505
|
-
|
1559
|
+
git_str_dispose(&pattern);
|
1560
|
+
git_str_dispose(&replace);
|
1506
1561
|
|
1507
1562
|
return error;
|
1508
1563
|
}
|
data/vendor/libgit2/src/config.h
CHANGED
@@ -27,7 +27,12 @@ struct git_config {
|
|
27
27
|
git_vector backends;
|
28
28
|
};
|
29
29
|
|
30
|
-
extern int git_config__global_location(
|
30
|
+
extern int git_config__global_location(git_str *buf);
|
31
|
+
|
32
|
+
extern int git_config__find_global(git_str *path);
|
33
|
+
extern int git_config__find_xdg(git_str *path);
|
34
|
+
extern int git_config__find_system(git_str *path);
|
35
|
+
extern int git_config__find_programdata(git_str *path);
|
31
36
|
|
32
37
|
extern int git_config_rename_section(
|
33
38
|
git_repository *repo,
|
@@ -51,6 +56,14 @@ extern int git_config__update_entry(
|
|
51
56
|
bool overwrite_existing,
|
52
57
|
bool only_if_existing);
|
53
58
|
|
59
|
+
int git_config__get_path(
|
60
|
+
git_str *out,
|
61
|
+
const git_config *cfg,
|
62
|
+
const char *name);
|
63
|
+
|
64
|
+
int git_config__get_string_buf(
|
65
|
+
git_str *out, const git_config *cfg, const char *name);
|
66
|
+
|
54
67
|
/*
|
55
68
|
* Lookup functions that cannot fail. These functions look up a config
|
56
69
|
* value and return a fallback value if the value is missing or if any
|
@@ -83,7 +96,7 @@ int git_config_lookup_map_enum(git_configmap_t *type_out,
|
|
83
96
|
/**
|
84
97
|
* Unlock the backend with the highest priority
|
85
98
|
*
|
86
|
-
* Unlocking will allow other writers to
|
99
|
+
* Unlocking will allow other writers to update the configuration
|
87
100
|
* file. Optionally, any changes performed since the lock will be
|
88
101
|
* applied to the configuration.
|
89
102
|
*
|
@@ -86,6 +86,7 @@ static struct map_data _configmaps[] = {
|
|
86
86
|
{"core.protecthfs", NULL, 0, GIT_PROTECTHFS_DEFAULT },
|
87
87
|
{"core.protectntfs", NULL, 0, GIT_PROTECTNTFS_DEFAULT },
|
88
88
|
{"core.fsyncobjectfiles", NULL, 0, GIT_FSYNCOBJECTFILES_DEFAULT },
|
89
|
+
{"core.longpaths", NULL, 0, GIT_LONGPATHS_DEFAULT },
|
89
90
|
};
|
90
91
|
|
91
92
|
int git_config__configmap_lookup(int *out, git_config *config, git_configmap_item item)
|
@@ -111,20 +112,21 @@ int git_config__configmap_lookup(int *out, git_config *config, git_configmap_ite
|
|
111
112
|
|
112
113
|
int git_repository__configmap_lookup(int *out, git_repository *repo, git_configmap_item item)
|
113
114
|
{
|
114
|
-
intptr_t value = repo->configmap_cache[(int)item];
|
115
|
+
intptr_t value = (intptr_t)git_atomic_load(repo->configmap_cache[(int)item]);
|
115
116
|
|
116
117
|
*out = (int)value;
|
117
118
|
|
118
119
|
if (value == GIT_CONFIGMAP_NOT_CACHED) {
|
119
|
-
int error;
|
120
120
|
git_config *config;
|
121
|
+
intptr_t oldval = value;
|
122
|
+
int error;
|
121
123
|
|
122
124
|
if ((error = git_repository_config__weakptr(&config, repo)) < 0 ||
|
123
125
|
(error = git_config__configmap_lookup(out, config, item)) < 0)
|
124
126
|
return error;
|
125
127
|
|
126
128
|
value = *out;
|
127
|
-
repo->configmap_cache[(int)item]
|
129
|
+
git_atomic_compare_and_swap(&repo->configmap_cache[(int)item], (void *)oldval, (void *)value);
|
128
130
|
}
|
129
131
|
|
130
132
|
return 0;
|