rugged 1.0.1 → 1.3.0
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/rugged.c +7 -4
- data/ext/rugged/rugged_commit.c +1 -1
- data/ext/rugged/rugged_object.c +1 -1
- data/ext/rugged/rugged_repo.c +3 -3
- data/lib/rugged/commit.rb +16 -2
- data/lib/rugged/repository.rb +2 -2
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +41 -74
- data/vendor/libgit2/COPYING +109 -1
- data/vendor/libgit2/cmake/{Modules/AddCFlagIfSupported.cmake → AddCFlagIfSupported.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/EnableWarnings.cmake → EnableWarnings.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindCoreFoundation.cmake → FindCoreFoundation.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSAPI.cmake → FindGSSAPI.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSFramework.cmake → FindGSSFramework.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindHTTP_Parser.cmake → FindHTTP_Parser.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindIconv.cmake → FindIconv.cmake} +0 -0
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE.cmake → FindPCRE.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE2.cmake → FindPCRE2.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPkgLibraries.cmake → FindPkgLibraries.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindSecurity.cmake → FindSecurity.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindStatNsec.cmake → FindStatNsec.cmake} +0 -0
- data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
- data/vendor/libgit2/cmake/{Modules/FindmbedTLS.cmake → FindmbedTLS.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/IdeSplitSources.cmake → IdeSplitSources.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/PkgBuildConfig.cmake → PkgBuildConfig.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SanitizeBool.cmake → SanitizeBool.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SelectGSSAPI.cmake → SelectGSSAPI.cmake} +18 -26
- data/vendor/libgit2/cmake/{Modules/SelectHTTPSBackend.cmake → SelectHTTPSBackend.cmake} +29 -32
- data/vendor/libgit2/cmake/{Modules/SelectHashes.cmake → SelectHashes.cmake} +21 -28
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +4 -3
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +24 -10
- data/vendor/libgit2/deps/ntlmclient/compat.h +0 -27
- 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 +164 -135
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +13 -9
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +16 -3
- 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/ntlmclient/util.c +15 -1
- data/vendor/libgit2/deps/ntlmclient/util.h +2 -1
- data/vendor/libgit2/deps/pcre/LICENCE +93 -0
- data/vendor/libgit2/deps/pcre/pcre.h +2 -2
- data/vendor/libgit2/deps/pcre/pcre_compile.c +29 -17
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +4 -4
- data/vendor/libgit2/deps/pcre/pcreposix.c +2 -3
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -5
- data/vendor/libgit2/deps/zlib/deflate.c +1 -0
- data/vendor/libgit2/include/git2/annotated_commit.h +1 -1
- data/vendor/libgit2/include/git2/apply.h +2 -0
- data/vendor/libgit2/include/git2/attr.h +95 -0
- data/vendor/libgit2/include/git2/blame.h +95 -42
- data/vendor/libgit2/include/git2/blob.h +37 -3
- data/vendor/libgit2/include/git2/branch.h +25 -0
- data/vendor/libgit2/include/git2/cert.h +42 -5
- data/vendor/libgit2/include/git2/checkout.h +28 -12
- data/vendor/libgit2/include/git2/clone.h +1 -1
- data/vendor/libgit2/include/git2/commit.h +35 -19
- data/vendor/libgit2/include/git2/common.h +51 -6
- data/vendor/libgit2/include/git2/config.h +1 -1
- data/vendor/libgit2/include/git2/deprecated.h +368 -8
- data/vendor/libgit2/include/git2/diff.h +34 -113
- data/vendor/libgit2/include/git2/email.h +127 -0
- data/vendor/libgit2/include/git2/errors.h +8 -7
- data/vendor/libgit2/include/git2/filter.h +63 -17
- data/vendor/libgit2/include/git2/graph.h +20 -2
- data/vendor/libgit2/include/git2/index.h +4 -5
- data/vendor/libgit2/include/git2/indexer.h +2 -1
- data/vendor/libgit2/include/git2/notes.h +2 -2
- data/vendor/libgit2/include/git2/odb.h +44 -20
- data/vendor/libgit2/include/git2/oidarray.h +5 -8
- data/vendor/libgit2/include/git2/pack.h +1 -1
- data/vendor/libgit2/include/git2/patch.h +8 -0
- data/vendor/libgit2/include/git2/rebase.h +25 -1
- data/vendor/libgit2/include/git2/refs.h +9 -5
- data/vendor/libgit2/include/git2/remote.h +62 -9
- data/vendor/libgit2/include/git2/repository.h +107 -62
- data/vendor/libgit2/include/git2/revparse.h +5 -5
- data/vendor/libgit2/include/git2/stash.h +1 -1
- data/vendor/libgit2/include/git2/status.h +115 -59
- data/vendor/libgit2/include/git2/stdint.h +3 -3
- data/vendor/libgit2/include/git2/strarray.h +6 -10
- data/vendor/libgit2/include/git2/submodule.h +9 -0
- 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 +7 -0
- data/vendor/libgit2/include/git2/sys/transport.h +1 -0
- data/vendor/libgit2/include/git2/tag.h +12 -0
- data/vendor/libgit2/include/git2/transport.h +1 -1
- data/vendor/libgit2/include/git2/tree.h +2 -14
- data/vendor/libgit2/include/git2/types.h +9 -0
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +1 -0
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +84 -44
- 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/apply.c +21 -8
- data/vendor/libgit2/src/array.h +11 -11
- data/vendor/libgit2/src/assert_safe.h +58 -0
- data/vendor/libgit2/src/attr.c +192 -70
- data/vendor/libgit2/src/attr_file.c +99 -41
- data/vendor/libgit2/src/attr_file.h +32 -11
- data/vendor/libgit2/src/attrcache.c +44 -40
- data/vendor/libgit2/src/attrcache.h +4 -5
- data/vendor/libgit2/src/blame.c +32 -19
- data/vendor/libgit2/src/blame_git.c +7 -4
- data/vendor/libgit2/src/blob.c +60 -32
- data/vendor/libgit2/src/branch.c +87 -37
- data/vendor/libgit2/src/buffer.c +349 -29
- data/vendor/libgit2/src/buffer.h +154 -2
- data/vendor/libgit2/src/cache.c +3 -24
- data/vendor/libgit2/src/cache.h +7 -7
- data/vendor/libgit2/src/cc-compat.h +10 -8
- data/vendor/libgit2/src/checkout.c +103 -105
- data/vendor/libgit2/src/cherrypick.c +8 -2
- data/vendor/libgit2/src/clone.c +105 -30
- data/vendor/libgit2/src/commit.c +41 -28
- data/vendor/libgit2/src/commit_graph.c +1209 -0
- data/vendor/libgit2/src/commit_graph.h +162 -0
- data/vendor/libgit2/src/commit_list.c +46 -0
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +26 -2
- data/vendor/libgit2/src/config.c +41 -23
- data/vendor/libgit2/src/config_cache.c +9 -4
- data/vendor/libgit2/src/config_entries.c +35 -27
- data/vendor/libgit2/src/config_file.c +17 -9
- data/vendor/libgit2/src/config_parse.c +6 -8
- data/vendor/libgit2/src/config_snapshot.c +2 -1
- data/vendor/libgit2/src/crlf.c +16 -6
- data/vendor/libgit2/src/date.c +4 -3
- data/vendor/libgit2/src/delta.c +1 -1
- data/vendor/libgit2/src/describe.c +12 -5
- data/vendor/libgit2/src/diff.c +55 -183
- data/vendor/libgit2/src/diff_driver.c +21 -17
- data/vendor/libgit2/src/diff_file.c +5 -7
- data/vendor/libgit2/src/diff_generate.c +56 -28
- data/vendor/libgit2/src/diff_parse.c +2 -3
- data/vendor/libgit2/src/diff_print.c +81 -65
- data/vendor/libgit2/src/diff_stats.c +19 -16
- data/vendor/libgit2/src/diff_tform.c +13 -13
- data/vendor/libgit2/src/diff_xdiff.c +4 -2
- data/vendor/libgit2/src/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/email.c +299 -0
- data/vendor/libgit2/src/email.h +25 -0
- data/vendor/libgit2/src/errors.c +26 -19
- data/vendor/libgit2/src/features.h.in +5 -1
- data/vendor/libgit2/src/fetch.c +7 -2
- data/vendor/libgit2/src/fetchhead.c +8 -4
- data/vendor/libgit2/src/filebuf.c +9 -7
- data/vendor/libgit2/src/filter.c +215 -113
- data/vendor/libgit2/src/filter.h +24 -5
- data/vendor/libgit2/src/futils.c +8 -8
- data/vendor/libgit2/src/futils.h +4 -4
- data/vendor/libgit2/src/graph.c +64 -9
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +3 -3
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +3 -3
- data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +12 -12
- data/vendor/libgit2/src/hash/sha1/openssl.c +3 -3
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +8 -10
- data/vendor/libgit2/src/hash/sha1/win32.c +15 -11
- data/vendor/libgit2/src/hash.c +16 -13
- data/vendor/libgit2/src/hash.h +1 -1
- data/vendor/libgit2/src/hashsig.c +23 -10
- data/vendor/libgit2/src/ident.c +13 -3
- data/vendor/libgit2/src/idxmap.c +0 -22
- data/vendor/libgit2/src/ignore.c +33 -17
- data/vendor/libgit2/src/index.c +124 -82
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +95 -37
- data/vendor/libgit2/src/integer.h +79 -2
- data/vendor/libgit2/src/iterator.c +40 -28
- data/vendor/libgit2/src/iterator.h +1 -1
- data/vendor/libgit2/src/khash.h +2 -11
- data/vendor/libgit2/src/{settings.c → libgit2.c} +148 -49
- data/vendor/libgit2/src/libgit2.h +15 -0
- data/vendor/libgit2/src/mailmap.c +23 -10
- data/vendor/libgit2/src/map.h +3 -3
- data/vendor/libgit2/src/merge.c +95 -43
- data/vendor/libgit2/src/merge.h +2 -1
- data/vendor/libgit2/src/merge_driver.c +19 -13
- data/vendor/libgit2/src/merge_file.c +15 -9
- data/vendor/libgit2/src/message.c +3 -1
- data/vendor/libgit2/src/midx.c +879 -0
- data/vendor/libgit2/src/midx.h +110 -0
- data/vendor/libgit2/src/mwindow.c +214 -95
- data/vendor/libgit2/src/mwindow.h +3 -3
- data/vendor/libgit2/src/net.c +133 -4
- data/vendor/libgit2/src/net.h +16 -2
- data/vendor/libgit2/src/netops.c +6 -4
- data/vendor/libgit2/src/netops.h +2 -2
- data/vendor/libgit2/src/notes.c +40 -40
- data/vendor/libgit2/src/object.c +24 -15
- data/vendor/libgit2/src/odb.c +298 -57
- data/vendor/libgit2/src/odb.h +16 -2
- data/vendor/libgit2/src/odb_loose.c +31 -21
- data/vendor/libgit2/src/odb_mempack.c +3 -1
- data/vendor/libgit2/src/odb_pack.c +391 -114
- data/vendor/libgit2/src/oid.c +7 -4
- data/vendor/libgit2/src/oidarray.c +10 -1
- data/vendor/libgit2/src/pack-objects.c +83 -69
- data/vendor/libgit2/src/pack.c +383 -150
- data/vendor/libgit2/src/pack.h +44 -9
- data/vendor/libgit2/src/patch.c +14 -7
- data/vendor/libgit2/src/patch_generate.c +3 -5
- data/vendor/libgit2/src/patch_parse.c +6 -3
- data/vendor/libgit2/src/path.c +103 -58
- data/vendor/libgit2/src/path.h +80 -7
- data/vendor/libgit2/src/pathspec.c +12 -11
- data/vendor/libgit2/src/pool.c +34 -22
- data/vendor/libgit2/src/pool.h +9 -1
- data/vendor/libgit2/src/posix.c +43 -12
- data/vendor/libgit2/src/posix.h +9 -0
- data/vendor/libgit2/src/proxy.c +2 -0
- data/vendor/libgit2/src/push.c +2 -0
- data/vendor/libgit2/src/reader.c +10 -6
- data/vendor/libgit2/src/rebase.c +95 -49
- data/vendor/libgit2/src/refdb.c +165 -13
- data/vendor/libgit2/src/refdb.h +69 -0
- data/vendor/libgit2/src/refdb_fs.c +145 -153
- data/vendor/libgit2/src/reflog.c +21 -20
- data/vendor/libgit2/src/refs.c +153 -233
- data/vendor/libgit2/src/refs.h +2 -20
- data/vendor/libgit2/src/refspec.c +81 -45
- data/vendor/libgit2/src/regexp.c +2 -2
- data/vendor/libgit2/src/remote.c +320 -122
- data/vendor/libgit2/src/remote.h +2 -1
- data/vendor/libgit2/src/repository.c +476 -203
- data/vendor/libgit2/src/repository.h +27 -29
- data/vendor/libgit2/src/reset.c +8 -7
- data/vendor/libgit2/src/revert.c +8 -2
- data/vendor/libgit2/src/revparse.c +23 -17
- data/vendor/libgit2/src/revwalk.c +35 -20
- data/vendor/libgit2/src/runtime.c +162 -0
- data/vendor/libgit2/src/runtime.h +62 -0
- data/vendor/libgit2/src/{refdb_fs.h → settings.h} +3 -11
- data/vendor/libgit2/src/signature.c +6 -5
- data/vendor/libgit2/src/sortedcache.c +2 -3
- data/vendor/libgit2/src/sortedcache.h +10 -8
- data/vendor/libgit2/src/stash.c +6 -2
- data/vendor/libgit2/src/status.c +9 -4
- data/vendor/libgit2/src/strarray.c +64 -0
- data/vendor/libgit2/src/streams/mbedtls.c +14 -17
- data/vendor/libgit2/src/streams/mbedtls.h +1 -1
- data/vendor/libgit2/src/streams/openssl.c +113 -207
- 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 +10 -9
- 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 +134 -66
- data/vendor/libgit2/src/submodule.h +9 -9
- data/vendor/libgit2/src/sysdir.c +8 -26
- data/vendor/libgit2/src/sysdir.h +0 -11
- data/vendor/libgit2/src/tag.c +49 -11
- 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 +2 -2
- data/vendor/libgit2/src/trace.h +17 -13
- data/vendor/libgit2/src/trailer.c +1 -1
- data/vendor/libgit2/src/transaction.c +21 -9
- data/vendor/libgit2/src/transport.c +3 -3
- data/vendor/libgit2/src/transports/auth.c +1 -1
- data/vendor/libgit2/src/transports/auth_negotiate.c +11 -4
- data/vendor/libgit2/src/transports/auth_ntlm.c +10 -6
- data/vendor/libgit2/src/transports/credential.c +17 -7
- data/vendor/libgit2/src/transports/credential_helpers.c +2 -0
- data/vendor/libgit2/src/transports/git.c +1 -3
- data/vendor/libgit2/src/transports/http.c +19 -17
- data/vendor/libgit2/src/transports/http.h +1 -0
- data/vendor/libgit2/src/transports/httpclient.c +68 -38
- data/vendor/libgit2/src/transports/httpclient.h +1 -1
- data/vendor/libgit2/src/transports/local.c +5 -5
- data/vendor/libgit2/src/transports/smart.c +14 -9
- data/vendor/libgit2/src/transports/smart.h +1 -1
- data/vendor/libgit2/src/transports/smart_protocol.c +11 -5
- data/vendor/libgit2/src/transports/ssh.c +55 -21
- data/vendor/libgit2/src/transports/winhttp.c +157 -89
- data/vendor/libgit2/src/tree.c +100 -77
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/tsort.c +0 -2
- data/vendor/libgit2/src/unix/map.c +3 -1
- data/vendor/libgit2/src/unix/posix.h +16 -1
- data/vendor/libgit2/src/unix/pthread.h +2 -1
- data/vendor/libgit2/src/utf8.c +150 -0
- data/vendor/libgit2/src/utf8.h +52 -0
- data/vendor/libgit2/src/util.c +75 -184
- data/vendor/libgit2/src/util.h +34 -40
- data/vendor/libgit2/src/vector.c +23 -19
- data/vendor/libgit2/src/vector.h +4 -2
- data/vendor/libgit2/src/win32/findfile.c +5 -3
- data/vendor/libgit2/src/win32/git2.rc +18 -3
- 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 +23 -25
- data/vendor/libgit2/src/win32/path_w32.h +0 -1
- data/vendor/libgit2/src/win32/posix.h +6 -6
- data/vendor/libgit2/src/win32/posix_w32.c +86 -7
- 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 +3 -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 +36 -14
- data/vendor/libgit2/src/zstream.c +1 -1
- metadata +65 -42
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +0 -29
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +0 -96
- 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/global.c +0 -361
- 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 -246
- 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/errors.c
CHANGED
@@ -7,9 +7,10 @@
|
|
7
7
|
|
8
8
|
#include "common.h"
|
9
9
|
|
10
|
-
#include "
|
10
|
+
#include "threadstate.h"
|
11
11
|
#include "posix.h"
|
12
12
|
#include "buffer.h"
|
13
|
+
#include "libgit2.h"
|
13
14
|
|
14
15
|
/********************************************
|
15
16
|
* New error handling
|
@@ -20,20 +21,25 @@ static git_error g_git_oom_error = {
|
|
20
21
|
GIT_ERROR_NOMEMORY
|
21
22
|
};
|
22
23
|
|
24
|
+
static git_error g_git_uninitialized_error = {
|
25
|
+
"libgit2 has not been initialized; you must call git_libgit2_init",
|
26
|
+
GIT_ERROR_INVALID
|
27
|
+
};
|
28
|
+
|
23
29
|
static void set_error_from_buffer(int error_class)
|
24
30
|
{
|
25
|
-
git_error *error = &
|
26
|
-
git_buf *buf = &
|
31
|
+
git_error *error = &GIT_THREADSTATE->error_t;
|
32
|
+
git_buf *buf = &GIT_THREADSTATE->error_buf;
|
27
33
|
|
28
34
|
error->message = buf->ptr;
|
29
35
|
error->klass = error_class;
|
30
36
|
|
31
|
-
|
37
|
+
GIT_THREADSTATE->last_error = error;
|
32
38
|
}
|
33
39
|
|
34
40
|
static void set_error(int error_class, char *string)
|
35
41
|
{
|
36
|
-
git_buf *buf = &
|
42
|
+
git_buf *buf = &GIT_THREADSTATE->error_buf;
|
37
43
|
|
38
44
|
git_buf_clear(buf);
|
39
45
|
if (string) {
|
@@ -46,7 +52,7 @@ static void set_error(int error_class, char *string)
|
|
46
52
|
|
47
53
|
void git_error_set_oom(void)
|
48
54
|
{
|
49
|
-
|
55
|
+
GIT_THREADSTATE->last_error = &g_git_oom_error;
|
50
56
|
}
|
51
57
|
|
52
58
|
void git_error_set(int error_class, const char *fmt, ...)
|
@@ -64,7 +70,7 @@ void git_error_vset(int error_class, const char *fmt, va_list ap)
|
|
64
70
|
DWORD win32_error_code = (error_class == GIT_ERROR_OS) ? GetLastError() : 0;
|
65
71
|
#endif
|
66
72
|
int error_code = (error_class == GIT_ERROR_OS) ? errno : 0;
|
67
|
-
git_buf *buf = &
|
73
|
+
git_buf *buf = &GIT_THREADSTATE->error_buf;
|
68
74
|
|
69
75
|
git_buf_clear(buf);
|
70
76
|
if (fmt) {
|
@@ -97,14 +103,9 @@ void git_error_vset(int error_class, const char *fmt, va_list ap)
|
|
97
103
|
|
98
104
|
int git_error_set_str(int error_class, const char *string)
|
99
105
|
{
|
100
|
-
git_buf *buf = &
|
106
|
+
git_buf *buf = &GIT_THREADSTATE->error_buf;
|
101
107
|
|
102
|
-
|
103
|
-
|
104
|
-
if (!string) {
|
105
|
-
git_error_set(GIT_ERROR_INVALID, "unspecified caller error");
|
106
|
-
return -1;
|
107
|
-
}
|
108
|
+
GIT_ASSERT_ARG(string);
|
108
109
|
|
109
110
|
git_buf_clear(buf);
|
110
111
|
git_buf_puts(buf, string);
|
@@ -118,9 +119,9 @@ int git_error_set_str(int error_class, const char *string)
|
|
118
119
|
|
119
120
|
void git_error_clear(void)
|
120
121
|
{
|
121
|
-
if (
|
122
|
+
if (GIT_THREADSTATE->last_error != NULL) {
|
122
123
|
set_error(0, NULL);
|
123
|
-
|
124
|
+
GIT_THREADSTATE->last_error = NULL;
|
124
125
|
}
|
125
126
|
|
126
127
|
errno = 0;
|
@@ -131,13 +132,17 @@ void git_error_clear(void)
|
|
131
132
|
|
132
133
|
const git_error *git_error_last(void)
|
133
134
|
{
|
134
|
-
return
|
135
|
+
/* If the library is not initialized, return a static error. */
|
136
|
+
if (!git_libgit2_init_count())
|
137
|
+
return &g_git_uninitialized_error;
|
138
|
+
|
139
|
+
return GIT_THREADSTATE->last_error;
|
135
140
|
}
|
136
141
|
|
137
142
|
int git_error_state_capture(git_error_state *state, int error_code)
|
138
143
|
{
|
139
|
-
git_error *error =
|
140
|
-
git_buf *error_buf = &
|
144
|
+
git_error *error = GIT_THREADSTATE->last_error;
|
145
|
+
git_buf *error_buf = &GIT_THREADSTATE->error_buf;
|
141
146
|
|
142
147
|
memset(state, 0, sizeof(git_error_state));
|
143
148
|
|
@@ -210,6 +215,7 @@ void git_error_system_set(int code)
|
|
210
215
|
|
211
216
|
/* Deprecated error values and functions */
|
212
217
|
|
218
|
+
#ifndef GIT_DEPRECATE_HARD
|
213
219
|
const git_error *giterr_last(void)
|
214
220
|
{
|
215
221
|
return git_error_last();
|
@@ -229,3 +235,4 @@ void giterr_set_oom(void)
|
|
229
235
|
{
|
230
236
|
git_error_set_oom();
|
231
237
|
}
|
238
|
+
#endif
|
@@ -2,9 +2,12 @@
|
|
2
2
|
#define INCLUDE_features_h__
|
3
3
|
|
4
4
|
#cmakedefine GIT_DEBUG_POOL 1
|
5
|
+
#cmakedefine GIT_DEBUG_STRICT_ALLOC 1
|
6
|
+
#cmakedefine GIT_DEBUG_STRICT_OPEN 1
|
7
|
+
|
5
8
|
#cmakedefine GIT_TRACE 1
|
6
9
|
#cmakedefine GIT_THREADS 1
|
7
|
-
#cmakedefine
|
10
|
+
#cmakedefine GIT_WIN32_LEAKCHECK 1
|
8
11
|
|
9
12
|
#cmakedefine GIT_ARCH_64 1
|
10
13
|
#cmakedefine GIT_ARCH_32 1
|
@@ -32,6 +35,7 @@
|
|
32
35
|
#cmakedefine GIT_WINHTTP 1
|
33
36
|
#cmakedefine GIT_HTTPS 1
|
34
37
|
#cmakedefine GIT_OPENSSL 1
|
38
|
+
#cmakedefine GIT_OPENSSL_DYNAMIC 1
|
35
39
|
#cmakedefine GIT_SECURE_TRANSPORT 1
|
36
40
|
#cmakedefine GIT_MBEDTLS 1
|
37
41
|
|
data/vendor/libgit2/src/fetch.c
CHANGED
@@ -21,9 +21,12 @@
|
|
21
21
|
|
22
22
|
static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, git_refspec *tagspec, git_remote_autotag_option_t tagopt)
|
23
23
|
{
|
24
|
-
int match = 0;
|
24
|
+
int match = 0, valid;
|
25
25
|
|
26
|
-
if (
|
26
|
+
if (git_reference_name_is_valid(&valid, head->name) < 0)
|
27
|
+
return -1;
|
28
|
+
|
29
|
+
if (!valid)
|
27
30
|
return 0;
|
28
31
|
|
29
32
|
if (tagopt == GIT_REMOTE_DOWNLOAD_TAGS_ALL) {
|
@@ -155,7 +158,9 @@ int git_fetch_options_init(git_fetch_options *opts, unsigned int version)
|
|
155
158
|
return 0;
|
156
159
|
}
|
157
160
|
|
161
|
+
#ifndef GIT_DEPRECATE_HARD
|
158
162
|
int git_fetch_init_options(git_fetch_options *opts, unsigned int version)
|
159
163
|
{
|
160
164
|
return git_fetch_options_init(opts, version);
|
161
165
|
}
|
166
|
+
#endif
|
@@ -73,7 +73,8 @@ int git_fetchhead_ref_create(
|
|
73
73
|
{
|
74
74
|
git_fetchhead_ref *fetchhead_ref;
|
75
75
|
|
76
|
-
|
76
|
+
GIT_ASSERT_ARG(out);
|
77
|
+
GIT_ASSERT_ARG(oid);
|
77
78
|
|
78
79
|
*out = NULL;
|
79
80
|
|
@@ -108,7 +109,8 @@ static int fetchhead_ref_write(
|
|
108
109
|
const char *type, *name;
|
109
110
|
int head = 0;
|
110
111
|
|
111
|
-
|
112
|
+
GIT_ASSERT_ARG(file);
|
113
|
+
GIT_ASSERT_ARG(fetchhead_ref);
|
112
114
|
|
113
115
|
git_oid_fmt(oid, &fetchhead_ref->oid);
|
114
116
|
oid[GIT_OID_HEXSZ] = '\0';
|
@@ -145,7 +147,8 @@ int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs)
|
|
145
147
|
unsigned int i;
|
146
148
|
git_fetchhead_ref *fetchhead_ref;
|
147
149
|
|
148
|
-
|
150
|
+
GIT_ASSERT_ARG(repo);
|
151
|
+
GIT_ASSERT_ARG(fetchhead_refs);
|
149
152
|
|
150
153
|
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0)
|
151
154
|
return -1;
|
@@ -279,7 +282,8 @@ int git_repository_fetchhead_foreach(git_repository *repo,
|
|
279
282
|
size_t line_num = 0;
|
280
283
|
int error = 0;
|
281
284
|
|
282
|
-
|
285
|
+
GIT_ASSERT_ARG(repo);
|
286
|
+
GIT_ASSERT_ARG(cb);
|
283
287
|
|
284
288
|
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0)
|
285
289
|
return -1;
|
@@ -184,7 +184,7 @@ static int write_deflate(git_filebuf *file, void *source, size_t len)
|
|
184
184
|
|
185
185
|
} while (zs->avail_out == 0);
|
186
186
|
|
187
|
-
|
187
|
+
GIT_ASSERT(zs->avail_in == 0);
|
188
188
|
|
189
189
|
if (file->compute_digest)
|
190
190
|
git_hash_update(&file->digest, source, len);
|
@@ -278,10 +278,9 @@ int git_filebuf_open_withsize(git_filebuf *file, const char *path, int flags, mo
|
|
278
278
|
int compression, error = -1;
|
279
279
|
size_t path_len, alloc_len;
|
280
280
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
assert(file && path && file->buffer == NULL);
|
281
|
+
GIT_ASSERT_ARG(file);
|
282
|
+
GIT_ASSERT_ARG(path);
|
283
|
+
GIT_ASSERT(file->buffer == NULL);
|
285
284
|
|
286
285
|
memset(file, 0x0, sizeof(git_filebuf));
|
287
286
|
|
@@ -389,7 +388,9 @@ cleanup:
|
|
389
388
|
|
390
389
|
int git_filebuf_hash(git_oid *oid, git_filebuf *file)
|
391
390
|
{
|
392
|
-
|
391
|
+
GIT_ASSERT_ARG(oid);
|
392
|
+
GIT_ASSERT_ARG(file);
|
393
|
+
GIT_ASSERT_ARG(file->compute_digest);
|
393
394
|
|
394
395
|
flush_buffer(file);
|
395
396
|
|
@@ -415,7 +416,8 @@ int git_filebuf_commit_at(git_filebuf *file, const char *path)
|
|
415
416
|
int git_filebuf_commit(git_filebuf *file)
|
416
417
|
{
|
417
418
|
/* temporary files cannot be committed */
|
418
|
-
|
419
|
+
GIT_ASSERT_ARG(file);
|
420
|
+
GIT_ASSERT(file->path_original);
|
419
421
|
|
420
422
|
file->flush_mode = Z_FINISH;
|
421
423
|
flush_buffer(file);
|