rugged 0.28.4 → 0.28.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +0 -1
- data/vendor/libgit2/CMakeLists.txt +16 -36
- data/vendor/libgit2/COPYING +0 -28
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +1 -5
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
- data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
- data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/regex/COPYING +502 -0
- data/vendor/libgit2/deps/regex/config.h +7 -0
- data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
- data/vendor/libgit2/deps/regex/regex.c +92 -0
- data/vendor/libgit2/deps/regex/regex.h +582 -0
- data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
- data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
- data/vendor/libgit2/deps/regex/regexec.c +4369 -0
- data/vendor/libgit2/deps/zlib/adler32.c +7 -0
- data/vendor/libgit2/deps/zlib/crc32.c +7 -0
- data/vendor/libgit2/include/git2.h +0 -2
- data/vendor/libgit2/include/git2/apply.h +2 -22
- data/vendor/libgit2/include/git2/attr.h +12 -19
- data/vendor/libgit2/include/git2/blame.h +2 -2
- data/vendor/libgit2/include/git2/blob.h +12 -44
- data/vendor/libgit2/include/git2/buffer.h +14 -20
- data/vendor/libgit2/include/git2/checkout.h +14 -46
- data/vendor/libgit2/include/git2/cherrypick.h +3 -3
- data/vendor/libgit2/include/git2/clone.h +2 -2
- data/vendor/libgit2/include/git2/commit.h +1 -23
- data/vendor/libgit2/include/git2/common.h +5 -7
- data/vendor/libgit2/include/git2/config.h +12 -12
- data/vendor/libgit2/include/git2/deprecated.h +3 -243
- data/vendor/libgit2/include/git2/describe.h +4 -4
- data/vendor/libgit2/include/git2/diff.h +14 -16
- data/vendor/libgit2/include/git2/filter.h +0 -8
- data/vendor/libgit2/include/git2/index.h +1 -2
- data/vendor/libgit2/include/git2/indexer.h +4 -48
- data/vendor/libgit2/include/git2/inttypes.h +309 -0
- data/vendor/libgit2/include/git2/merge.h +10 -6
- data/vendor/libgit2/include/git2/net.h +5 -0
- data/vendor/libgit2/include/git2/object.h +14 -2
- data/vendor/libgit2/include/git2/odb.h +2 -3
- data/vendor/libgit2/include/git2/odb_backend.h +4 -5
- data/vendor/libgit2/include/git2/oid.h +1 -1
- data/vendor/libgit2/include/git2/pack.h +1 -12
- data/vendor/libgit2/include/git2/proxy.h +3 -5
- data/vendor/libgit2/include/git2/rebase.h +2 -46
- data/vendor/libgit2/include/git2/refs.h +0 -19
- data/vendor/libgit2/include/git2/remote.h +12 -35
- data/vendor/libgit2/include/git2/repository.h +2 -24
- data/vendor/libgit2/include/git2/revert.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +3 -3
- data/vendor/libgit2/include/git2/status.h +16 -25
- data/vendor/libgit2/include/git2/submodule.h +3 -20
- data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
- data/vendor/libgit2/include/git2/sys/odb_backend.h +4 -48
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +21 -57
- data/vendor/libgit2/include/git2/sys/repository.h +1 -5
- data/vendor/libgit2/include/git2/sys/time.h +31 -0
- data/vendor/libgit2/include/git2/sys/transport.h +2 -2
- data/vendor/libgit2/include/git2/tag.h +2 -11
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transport.h +340 -11
- data/vendor/libgit2/include/git2/tree.h +1 -1
- data/vendor/libgit2/include/git2/types.h +89 -4
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/include/git2/worktree.h +5 -5
- data/vendor/libgit2/libgit2.pc.in +13 -0
- data/vendor/libgit2/src/CMakeLists.txt +222 -88
- data/vendor/libgit2/src/alloc.c +14 -2
- data/vendor/libgit2/src/apply.c +30 -60
- data/vendor/libgit2/src/attr.c +64 -70
- data/vendor/libgit2/src/attr_file.c +96 -189
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +46 -44
- data/vendor/libgit2/src/attrcache.h +1 -2
- data/vendor/libgit2/src/blame.c +5 -17
- data/vendor/libgit2/src/blame.h +1 -1
- data/vendor/libgit2/src/blame_git.c +7 -21
- data/vendor/libgit2/src/blob.c +17 -81
- data/vendor/libgit2/src/blob.h +2 -2
- data/vendor/libgit2/src/branch.c +5 -29
- data/vendor/libgit2/src/buffer.c +7 -14
- data/vendor/libgit2/src/cache.c +33 -26
- data/vendor/libgit2/src/cache.h +1 -1
- data/vendor/libgit2/src/cc-compat.h +0 -5
- data/vendor/libgit2/src/checkout.c +16 -26
- data/vendor/libgit2/src/cherrypick.c +3 -9
- data/vendor/libgit2/src/clone.c +7 -29
- data/vendor/libgit2/src/clone.h +0 -4
- data/vendor/libgit2/src/commit.c +21 -69
- data/vendor/libgit2/src/commit.h +0 -6
- data/vendor/libgit2/src/commit_list.c +76 -28
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +75 -3
- data/vendor/libgit2/src/config.c +40 -31
- data/vendor/libgit2/src/config.h +6 -7
- data/vendor/libgit2/src/config_backend.h +0 -12
- data/vendor/libgit2/src/config_cache.c +39 -39
- data/vendor/libgit2/src/config_entries.c +99 -69
- data/vendor/libgit2/src/config_entries.h +0 -1
- data/vendor/libgit2/src/config_file.c +380 -337
- data/vendor/libgit2/src/config_mem.c +16 -12
- data/vendor/libgit2/src/config_parse.c +29 -49
- data/vendor/libgit2/src/config_parse.h +12 -13
- data/vendor/libgit2/src/crlf.c +14 -14
- data/vendor/libgit2/src/describe.c +20 -21
- data/vendor/libgit2/src/diff.c +58 -43
- data/vendor/libgit2/src/diff.h +1 -2
- data/vendor/libgit2/src/diff_driver.c +38 -37
- data/vendor/libgit2/src/diff_file.c +7 -9
- data/vendor/libgit2/src/diff_file.h +1 -1
- data/vendor/libgit2/src/diff_generate.c +85 -135
- data/vendor/libgit2/src/diff_generate.h +2 -2
- data/vendor/libgit2/src/diff_parse.c +1 -1
- data/vendor/libgit2/src/diff_print.c +13 -25
- data/vendor/libgit2/src/diff_stats.c +1 -1
- data/vendor/libgit2/src/diff_tform.c +4 -4
- data/vendor/libgit2/src/errors.c +22 -12
- data/vendor/libgit2/src/features.h.in +2 -9
- data/vendor/libgit2/src/fetch.c +2 -7
- data/vendor/libgit2/src/fetchhead.c +1 -1
- data/vendor/libgit2/src/filebuf.c +10 -6
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/{futils.c → fileops.c} +17 -21
- data/vendor/libgit2/src/{futils.h → fileops.h} +5 -5
- data/vendor/libgit2/src/filter.c +8 -16
- data/vendor/libgit2/src/fnmatch.c +248 -0
- data/vendor/libgit2/src/fnmatch.h +48 -0
- data/vendor/libgit2/src/global.c +40 -12
- data/vendor/libgit2/src/global.h +2 -0
- data/vendor/libgit2/src/hash.c +0 -61
- data/vendor/libgit2/src/hash.h +21 -19
- data/vendor/libgit2/src/hash/{sha1/collisiondetect.c → hash_collisiondetect.h} +17 -14
- data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +19 -15
- data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
- data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +14 -4
- data/vendor/libgit2/src/hash/{sha1/mbedtls.c → hash_mbedtls.c} +7 -15
- data/vendor/libgit2/src/hash/{sha1/mbedtls.h → hash_mbedtls.h} +11 -6
- data/vendor/libgit2/src/hash/{sha1/openssl.c → hash_openssl.h} +18 -14
- data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +24 -34
- data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
- data/vendor/libgit2/src/hashsig.c +1 -1
- data/vendor/libgit2/src/idxmap.c +65 -91
- data/vendor/libgit2/src/idxmap.h +15 -151
- data/vendor/libgit2/src/ignore.c +38 -32
- data/vendor/libgit2/src/index.c +43 -66
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +70 -69
- data/vendor/libgit2/src/integer.h +4 -39
- data/vendor/libgit2/src/iterator.c +22 -27
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +44 -58
- data/vendor/libgit2/src/merge_driver.c +4 -4
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +23 -18
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/netops.c +165 -55
- data/vendor/libgit2/src/netops.h +25 -3
- data/vendor/libgit2/src/notes.c +2 -2
- data/vendor/libgit2/src/object.c +2 -2
- data/vendor/libgit2/src/object.h +0 -2
- data/vendor/libgit2/src/odb.c +23 -41
- data/vendor/libgit2/src/odb.h +2 -3
- data/vendor/libgit2/src/odb_loose.c +10 -17
- data/vendor/libgit2/src/odb_mempack.c +23 -10
- data/vendor/libgit2/src/odb_pack.c +4 -4
- data/vendor/libgit2/src/offmap.c +55 -43
- data/vendor/libgit2/src/offmap.h +24 -102
- data/vendor/libgit2/src/oid.c +1 -6
- data/vendor/libgit2/src/oidmap.c +57 -39
- data/vendor/libgit2/src/oidmap.h +19 -99
- data/vendor/libgit2/src/pack-objects.c +32 -25
- data/vendor/libgit2/src/pack-objects.h +1 -1
- data/vendor/libgit2/src/pack.c +47 -45
- data/vendor/libgit2/src/pack.h +14 -12
- data/vendor/libgit2/src/parse.c +0 -10
- data/vendor/libgit2/src/parse.h +3 -3
- data/vendor/libgit2/src/patch.c +1 -1
- data/vendor/libgit2/src/patch_generate.c +2 -2
- data/vendor/libgit2/src/patch_parse.c +31 -124
- data/vendor/libgit2/src/path.c +6 -43
- data/vendor/libgit2/src/path.h +0 -2
- data/vendor/libgit2/src/pathspec.c +13 -13
- data/vendor/libgit2/src/pool.c +22 -26
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +7 -7
- data/vendor/libgit2/src/posix.h +1 -12
- data/vendor/libgit2/src/proxy.c +2 -7
- data/vendor/libgit2/src/push.c +5 -10
- data/vendor/libgit2/src/reader.c +2 -2
- data/vendor/libgit2/src/rebase.c +7 -66
- data/vendor/libgit2/src/refdb.c +0 -12
- data/vendor/libgit2/src/refdb_fs.c +165 -214
- data/vendor/libgit2/src/reflog.c +13 -11
- data/vendor/libgit2/src/refs.c +18 -24
- data/vendor/libgit2/src/refspec.c +16 -9
- data/vendor/libgit2/src/remote.c +52 -50
- data/vendor/libgit2/src/remote.h +2 -2
- data/vendor/libgit2/src/repository.c +100 -115
- data/vendor/libgit2/src/repository.h +40 -49
- data/vendor/libgit2/src/revert.c +3 -8
- data/vendor/libgit2/src/revparse.c +19 -18
- data/vendor/libgit2/src/revwalk.c +30 -63
- data/vendor/libgit2/src/revwalk.h +0 -20
- data/vendor/libgit2/src/settings.c +0 -5
- data/vendor/libgit2/src/sortedcache.c +26 -12
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +65 -45
- data/vendor/libgit2/src/status.c +9 -15
- data/vendor/libgit2/src/{allocators/stdalloc.c → stdalloc.c} +4 -3
- data/vendor/libgit2/src/{allocators/stdalloc.h → stdalloc.h} +4 -4
- data/vendor/libgit2/src/streams/openssl.c +0 -20
- data/vendor/libgit2/src/streams/socket.c +2 -2
- data/vendor/libgit2/src/strmap.c +84 -37
- data/vendor/libgit2/src/strmap.h +33 -105
- data/vendor/libgit2/src/submodule.c +70 -102
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +1 -11
- data/vendor/libgit2/src/tag.c +2 -10
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/trace.h +2 -2
- data/vendor/libgit2/src/trailer.c +32 -46
- data/vendor/libgit2/src/transaction.c +9 -10
- data/vendor/libgit2/src/transports/auth.c +9 -10
- data/vendor/libgit2/src/transports/auth.h +4 -11
- data/vendor/libgit2/src/transports/auth_negotiate.c +9 -23
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/cred.c +6 -6
- data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
- data/vendor/libgit2/src/transports/git.c +16 -11
- data/vendor/libgit2/src/transports/http.c +276 -419
- data/vendor/libgit2/src/transports/http.h +1 -1
- data/vendor/libgit2/src/transports/local.c +9 -9
- data/vendor/libgit2/src/transports/smart.c +17 -17
- data/vendor/libgit2/src/transports/smart.h +2 -2
- data/vendor/libgit2/src/transports/smart_protocol.c +60 -36
- data/vendor/libgit2/src/transports/ssh.c +36 -46
- data/vendor/libgit2/src/transports/winhttp.c +207 -231
- data/vendor/libgit2/src/tree-cache.c +7 -14
- data/vendor/libgit2/src/tree.c +24 -10
- data/vendor/libgit2/src/unix/map.c +1 -1
- data/vendor/libgit2/src/unix/posix.h +11 -1
- data/vendor/libgit2/src/userdiff.h +1 -3
- data/vendor/libgit2/src/util.c +53 -51
- data/vendor/libgit2/src/util.h +21 -16
- data/vendor/libgit2/src/win32/map.c +5 -3
- data/vendor/libgit2/src/win32/path_w32.c +2 -12
- data/vendor/libgit2/src/win32/path_w32.h +29 -0
- data/vendor/libgit2/src/win32/posix.h +4 -1
- data/vendor/libgit2/src/win32/posix_w32.c +5 -40
- data/vendor/libgit2/src/win32/precompiled.h +2 -0
- data/vendor/libgit2/src/win32/thread.c +10 -5
- data/vendor/libgit2/src/win32/w32_buffer.c +3 -7
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +93 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +2 -0
- data/vendor/libgit2/src/win32/w32_stack.c +9 -4
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +0 -31
- data/vendor/libgit2/src/win32/w32_util.h +32 -6
- data/vendor/libgit2/src/worktree.c +22 -36
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +0 -12
- data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
- metadata +34 -98
- data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
- data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
- data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
- data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
- data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
- data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
- data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
- data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
- data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
- data/vendor/libgit2/deps/pcre/COPYING +0 -5
- data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
- data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
- data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
- data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
- data/vendor/libgit2/deps/pcre/config.h.in +0 -57
- data/vendor/libgit2/deps/pcre/pcre.h +0 -641
- data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
- data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
- data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
- data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
- data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
- data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
- data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
- data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
- data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
- data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
- data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
- data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
- data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
- data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
- data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
- data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
- data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
- data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
- data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
- data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
- data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
- data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
- data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
- data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
- data/vendor/libgit2/deps/pcre/ucp.h +0 -224
- data/vendor/libgit2/include/git2/cert.h +0 -135
- data/vendor/libgit2/include/git2/cred.h +0 -308
- data/vendor/libgit2/include/git2/sys/cred.h +0 -90
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/config_snapshot.c +0 -206
- data/vendor/libgit2/src/errors.h +0 -81
- data/vendor/libgit2/src/hash/sha1.h +0 -38
- data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
- data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
- data/vendor/libgit2/src/net.c +0 -184
- data/vendor/libgit2/src/net.h +0 -36
- data/vendor/libgit2/src/regexp.c +0 -221
- data/vendor/libgit2/src/regexp.h +0 -97
- data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
- data/vendor/libgit2/src/wildmatch.c +0 -320
- data/vendor/libgit2/src/wildmatch.h +0 -23
- data/vendor/libgit2/src/win32/w32_common.h +0 -39
data/vendor/libgit2/src/notes.c
CHANGED
@@ -288,7 +288,7 @@ static int note_write(
|
|
288
288
|
|
289
289
|
/* TODO: should we apply filters? */
|
290
290
|
/* create note object */
|
291
|
-
if ((error =
|
291
|
+
if ((error = git_blob_create_frombuffer(&oid, repo, note, strlen(note))) < 0)
|
292
292
|
goto cleanup;
|
293
293
|
|
294
294
|
if ((error = manipulate_note_in_tree_r(
|
@@ -320,7 +320,7 @@ static int note_new(
|
|
320
320
|
git_blob *blob)
|
321
321
|
{
|
322
322
|
git_note *note = NULL;
|
323
|
-
|
323
|
+
git_off_t blobsize;
|
324
324
|
|
325
325
|
note = git__malloc(sizeof(git_note));
|
326
326
|
GIT_ERROR_CHECK_ALLOC(note);
|
data/vendor/libgit2/src/object.c
CHANGED
@@ -21,7 +21,6 @@
|
|
21
21
|
bool git_object__strict_input_validation = true;
|
22
22
|
|
23
23
|
extern int git_odb_hash(git_oid *out, const void *data, size_t len, git_object_t type);
|
24
|
-
size_t git_object__size(git_object_t type);
|
25
24
|
|
26
25
|
typedef struct {
|
27
26
|
const char *str; /* type name string */
|
@@ -497,7 +496,7 @@ int git_object_short_id(git_buf *out, const git_object *obj)
|
|
497
496
|
git_buf_sanitize(out);
|
498
497
|
repo = git_object_owner(obj);
|
499
498
|
|
500
|
-
if ((error =
|
499
|
+
if ((error = git_repository__cvar(&len, repo, GIT_CVAR_ABBREV)) < 0)
|
501
500
|
return error;
|
502
501
|
|
503
502
|
if ((error = git_repository_odb(&odb, repo)) < 0)
|
@@ -550,3 +549,4 @@ bool git_object__is_valid(
|
|
550
549
|
|
551
550
|
return true;
|
552
551
|
}
|
552
|
+
|
data/vendor/libgit2/src/object.h
CHANGED
data/vendor/libgit2/src/odb.c
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#include <zlib.h>
|
11
11
|
#include "git2/object.h"
|
12
12
|
#include "git2/sys/odb_backend.h"
|
13
|
-
#include "
|
13
|
+
#include "fileops.h"
|
14
14
|
#include "hash.h"
|
15
15
|
#include "delta.h"
|
16
16
|
#include "filter.h"
|
@@ -89,7 +89,7 @@ int git_odb__format_object_header(
|
|
89
89
|
size_t *written,
|
90
90
|
char *hdr,
|
91
91
|
size_t hdr_size,
|
92
|
-
|
92
|
+
git_off_t obj_len,
|
93
93
|
git_object_t obj_type)
|
94
94
|
{
|
95
95
|
const char *type_str = git_object_type2string(obj_type);
|
@@ -320,26 +320,20 @@ int git_odb__hashlink(git_oid *out, const char *path)
|
|
320
320
|
|
321
321
|
int git_odb_hashfile(git_oid *out, const char *path, git_object_t type)
|
322
322
|
{
|
323
|
-
|
324
|
-
int
|
325
|
-
|
326
|
-
if ((fd = git_futils_open_ro(path)) < 0)
|
323
|
+
git_off_t size;
|
324
|
+
int result, fd = git_futils_open_ro(path);
|
325
|
+
if (fd < 0)
|
327
326
|
return fd;
|
328
327
|
|
329
|
-
if ((
|
330
|
-
goto done;
|
331
|
-
|
332
|
-
if (!git__is_sizet(size)) {
|
328
|
+
if ((size = git_futils_filesize(fd)) < 0 || !git__is_sizet(size)) {
|
333
329
|
git_error_set(GIT_ERROR_OS, "file size overflow for 32-bit systems");
|
334
|
-
|
335
|
-
|
330
|
+
p_close(fd);
|
331
|
+
return -1;
|
336
332
|
}
|
337
333
|
|
338
|
-
|
339
|
-
|
340
|
-
done:
|
334
|
+
result = git_odb__hashfd(out, fd, (size_t)size, type);
|
341
335
|
p_close(fd);
|
342
|
-
return
|
336
|
+
return result;
|
343
337
|
}
|
344
338
|
|
345
339
|
int git_odb_hash(git_oid *id, const void *data, size_t len, git_object_t type)
|
@@ -391,7 +385,7 @@ static void fake_wstream__free(git_odb_stream *_stream)
|
|
391
385
|
git__free(stream);
|
392
386
|
}
|
393
387
|
|
394
|
-
static int init_fake_wstream(git_odb_stream **stream_p, git_odb_backend *backend,
|
388
|
+
static int init_fake_wstream(git_odb_stream **stream_p, git_odb_backend *backend, git_off_t size, git_object_t type)
|
395
389
|
{
|
396
390
|
fake_wstream *stream;
|
397
391
|
size_t blobsize;
|
@@ -454,7 +448,7 @@ int git_odb_new(git_odb **out)
|
|
454
448
|
return -1;
|
455
449
|
}
|
456
450
|
if (git_vector_init(&db->backends, 4, backend_sort_cmp) < 0) {
|
457
|
-
|
451
|
+
git_cache_free(&db->own_cache);
|
458
452
|
git__free(db);
|
459
453
|
return -1;
|
460
454
|
}
|
@@ -554,7 +548,6 @@ int git_odb__add_default_backends(
|
|
554
548
|
#else
|
555
549
|
if (p_stat(objects_dir, &st) < 0) {
|
556
550
|
if (as_alternates)
|
557
|
-
/* this should warn */
|
558
551
|
return 0;
|
559
552
|
|
560
553
|
git_error_set(GIT_ERROR_ODB, "failed to load object database in '%s'", objects_dir);
|
@@ -672,7 +665,7 @@ int git_odb__set_caps(git_odb *odb, int caps)
|
|
672
665
|
return -1;
|
673
666
|
}
|
674
667
|
|
675
|
-
if (!
|
668
|
+
if (!git_repository__cvar(&val, repo, GIT_CVAR_FSYNCOBJECTFILES))
|
676
669
|
odb->do_fsync = !!val;
|
677
670
|
}
|
678
671
|
|
@@ -693,7 +686,7 @@ static void odb_free(git_odb *db)
|
|
693
686
|
}
|
694
687
|
|
695
688
|
git_vector_free(&db->backends);
|
696
|
-
|
689
|
+
git_cache_free(&db->own_cache);
|
697
690
|
|
698
691
|
git__memzero(db, sizeof(*db));
|
699
692
|
git__free(db);
|
@@ -773,7 +766,7 @@ int git_odb_exists(git_odb *db, const git_oid *id)
|
|
773
766
|
|
774
767
|
assert(db && id);
|
775
768
|
|
776
|
-
if (
|
769
|
+
if (git_oid_iszero(id))
|
777
770
|
return 0;
|
778
771
|
|
779
772
|
if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) {
|
@@ -1001,7 +994,7 @@ int git_odb__read_header_or_object(
|
|
1001
994
|
|
1002
995
|
*out = NULL;
|
1003
996
|
|
1004
|
-
if (
|
997
|
+
if (git_oid_iszero(id))
|
1005
998
|
return error_null_oid(GIT_ENOTFOUND, "cannot read object");
|
1006
999
|
|
1007
1000
|
if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) {
|
@@ -1106,7 +1099,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id)
|
|
1106
1099
|
|
1107
1100
|
assert(out && db && id);
|
1108
1101
|
|
1109
|
-
if (
|
1102
|
+
if (git_oid_iszero(id))
|
1110
1103
|
return error_null_oid(GIT_ENOTFOUND, "cannot read object");
|
1111
1104
|
|
1112
1105
|
*out = git_cache_get_raw(odb_cache(db), id);
|
@@ -1130,7 +1123,7 @@ static int odb_otype_fast(git_object_t *type_p, git_odb *db, const git_oid *id)
|
|
1130
1123
|
size_t _unused;
|
1131
1124
|
int error;
|
1132
1125
|
|
1133
|
-
if (
|
1126
|
+
if (git_oid_iszero(id))
|
1134
1127
|
return error_null_oid(GIT_ENOTFOUND, "cannot get object type");
|
1135
1128
|
|
1136
1129
|
if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) {
|
@@ -1290,7 +1283,7 @@ int git_odb_write(
|
|
1290
1283
|
|
1291
1284
|
git_odb_hash(oid, data, len, type);
|
1292
1285
|
|
1293
|
-
if (
|
1286
|
+
if (git_oid_iszero(oid))
|
1294
1287
|
return error_null_oid(GIT_EINVALID, "cannot write object");
|
1295
1288
|
|
1296
1289
|
if (git_odb__freshen(db, oid))
|
@@ -1325,7 +1318,7 @@ int git_odb_write(
|
|
1325
1318
|
return error;
|
1326
1319
|
}
|
1327
1320
|
|
1328
|
-
static int hash_header(git_hash_ctx *ctx,
|
1321
|
+
static int hash_header(git_hash_ctx *ctx, git_off_t size, git_object_t type)
|
1329
1322
|
{
|
1330
1323
|
char header[64];
|
1331
1324
|
size_t hdrlen;
|
@@ -1339,7 +1332,7 @@ static int hash_header(git_hash_ctx *ctx, git_object_size_t size, git_object_t t
|
|
1339
1332
|
}
|
1340
1333
|
|
1341
1334
|
int git_odb_open_wstream(
|
1342
|
-
git_odb_stream **stream, git_odb *db,
|
1335
|
+
git_odb_stream **stream, git_odb *db, git_off_t size, git_object_t type)
|
1343
1336
|
{
|
1344
1337
|
size_t i, writes = 0;
|
1345
1338
|
int error = GIT_ERROR;
|
@@ -1475,7 +1468,7 @@ int git_odb_open_rstream(
|
|
1475
1468
|
return error;
|
1476
1469
|
}
|
1477
1470
|
|
1478
|
-
int git_odb_write_pack(struct git_odb_writepack **out, git_odb *db,
|
1471
|
+
int git_odb_write_pack(struct git_odb_writepack **out, git_odb *db, git_transfer_progress_cb progress_cb, void *progress_payload)
|
1479
1472
|
{
|
1480
1473
|
size_t i, writes = 0;
|
1481
1474
|
int error = GIT_ERROR;
|
@@ -1504,21 +1497,10 @@ int git_odb_write_pack(struct git_odb_writepack **out, git_odb *db, git_indexer_
|
|
1504
1497
|
return error;
|
1505
1498
|
}
|
1506
1499
|
|
1507
|
-
void *git_odb_backend_data_alloc(git_odb_backend *backend, size_t len)
|
1508
|
-
{
|
1509
|
-
GIT_UNUSED(backend);
|
1510
|
-
return git__malloc(len);
|
1511
|
-
}
|
1512
|
-
|
1513
1500
|
void *git_odb_backend_malloc(git_odb_backend *backend, size_t len)
|
1514
|
-
{
|
1515
|
-
return git_odb_backend_data_alloc(backend, len);
|
1516
|
-
}
|
1517
|
-
|
1518
|
-
void git_odb_backend_data_free(git_odb_backend *backend, void *data)
|
1519
1501
|
{
|
1520
1502
|
GIT_UNUSED(backend);
|
1521
|
-
|
1503
|
+
return git__malloc(len);
|
1522
1504
|
}
|
1523
1505
|
|
1524
1506
|
int git_odb_refresh(struct git_odb *db)
|
data/vendor/libgit2/src/odb.h
CHANGED
@@ -70,8 +70,7 @@ int git_odb__hashobj(git_oid *id, git_rawobj *obj);
|
|
70
70
|
/*
|
71
71
|
* Format the object header such as it would appear in the on-disk object
|
72
72
|
*/
|
73
|
-
int git_odb__format_object_header(size_t *out_len, char *hdr, size_t hdr_size,
|
74
|
-
|
73
|
+
int git_odb__format_object_header(size_t *out_len, char *hdr, size_t hdr_size, git_off_t obj_len, git_object_t obj_type);
|
75
74
|
/*
|
76
75
|
* Hash an open file descriptor.
|
77
76
|
* This is a performance call when the contents of a fd need to be hashed,
|
@@ -96,7 +95,7 @@ int git_odb__hashfd_filtered(
|
|
96
95
|
* symlink, then the raw contents of the symlink will be hashed. Otherwise,
|
97
96
|
* this will fallback to `git_odb__hashfd`.
|
98
97
|
*
|
99
|
-
* The hash type for this call is always `
|
98
|
+
* The hash type for this call is always `GIT_OBJIECT_BLOB` because
|
100
99
|
* symlinks may only point to blobs.
|
101
100
|
*/
|
102
101
|
int git_odb__hashlink(git_oid *out, const char *path);
|
@@ -10,7 +10,7 @@
|
|
10
10
|
#include <zlib.h>
|
11
11
|
#include "git2/object.h"
|
12
12
|
#include "git2/sys/odb_backend.h"
|
13
|
-
#include "
|
13
|
+
#include "fileops.h"
|
14
14
|
#include "hash.h"
|
15
15
|
#include "odb.h"
|
16
16
|
#include "delta.h"
|
@@ -408,8 +408,7 @@ done:
|
|
408
408
|
static int read_header_loose(git_rawobj *out, git_buf *loc)
|
409
409
|
{
|
410
410
|
unsigned char obj[1024];
|
411
|
-
|
412
|
-
int fd, error;
|
411
|
+
int fd, obj_len, error;
|
413
412
|
|
414
413
|
assert(out && loc);
|
415
414
|
|
@@ -418,14 +417,10 @@ static int read_header_loose(git_rawobj *out, git_buf *loc)
|
|
418
417
|
|
419
418
|
out->data = NULL;
|
420
419
|
|
421
|
-
if ((error = fd = git_futils_open_ro(loc->ptr)) < 0
|
420
|
+
if ((error = fd = git_futils_open_ro(loc->ptr)) < 0 ||
|
421
|
+
(error = obj_len = p_read(fd, obj, sizeof(obj))) < 0)
|
422
422
|
goto done;
|
423
423
|
|
424
|
-
if ((obj_len = p_read(fd, obj, sizeof(obj))) < 0) {
|
425
|
-
error = (int)obj_len;
|
426
|
-
goto done;
|
427
|
-
}
|
428
|
-
|
429
424
|
if (!is_zlib_compressed_data(obj, (size_t)obj_len))
|
430
425
|
error = read_header_loose_packlike(out, obj, (size_t)obj_len);
|
431
426
|
else
|
@@ -824,7 +819,7 @@ static int filebuf_flags(loose_backend *backend)
|
|
824
819
|
return flags;
|
825
820
|
}
|
826
821
|
|
827
|
-
static int loose_backend__writestream(git_odb_stream **stream_out, git_odb_backend *_backend,
|
822
|
+
static int loose_backend__writestream(git_odb_stream **stream_out, git_odb_backend *_backend, git_off_t length, git_object_t type)
|
828
823
|
{
|
829
824
|
loose_backend *backend;
|
830
825
|
loose_writestream *stream = NULL;
|
@@ -833,7 +828,7 @@ static int loose_backend__writestream(git_odb_stream **stream_out, git_odb_backe
|
|
833
828
|
size_t hdrlen;
|
834
829
|
int error;
|
835
830
|
|
836
|
-
assert(_backend);
|
831
|
+
assert(_backend && length >= 0);
|
837
832
|
|
838
833
|
backend = (loose_backend *)_backend;
|
839
834
|
*stream_out = NULL;
|
@@ -876,8 +871,6 @@ static int loose_backend__readstream_read(
|
|
876
871
|
size_t start_remain = stream->start_len - stream->start_read;
|
877
872
|
int total = 0, error;
|
878
873
|
|
879
|
-
buffer_len = min(buffer_len, INT_MAX);
|
880
|
-
|
881
874
|
/*
|
882
875
|
* if we read more than just the header in the initial read, play
|
883
876
|
* that back for the caller.
|
@@ -889,20 +882,20 @@ static int loose_backend__readstream_read(
|
|
889
882
|
buffer += chunk;
|
890
883
|
stream->start_read += chunk;
|
891
884
|
|
892
|
-
total +=
|
885
|
+
total += chunk;
|
893
886
|
buffer_len -= chunk;
|
894
887
|
}
|
895
888
|
|
896
889
|
if (buffer_len) {
|
897
|
-
size_t chunk = buffer_len;
|
890
|
+
size_t chunk = min(buffer_len, INT_MAX);
|
898
891
|
|
899
892
|
if ((error = git_zstream_get_output(buffer, &chunk, &stream->zstream)) < 0)
|
900
893
|
return error;
|
901
894
|
|
902
|
-
total +=
|
895
|
+
total += chunk;
|
903
896
|
}
|
904
897
|
|
905
|
-
return
|
898
|
+
return total;
|
906
899
|
}
|
907
900
|
|
908
901
|
static void loose_backend__readstream_free(git_odb_stream *_stream)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
#include "git2/object.h"
|
11
11
|
#include "git2/sys/odb_backend.h"
|
12
12
|
#include "git2/sys/mempack.h"
|
13
|
-
#include "
|
13
|
+
#include "fileops.h"
|
14
14
|
#include "hash.h"
|
15
15
|
#include "odb.h"
|
16
16
|
#include "array.h"
|
@@ -37,9 +37,15 @@ static int impl__write(git_odb_backend *_backend, const git_oid *oid, const void
|
|
37
37
|
{
|
38
38
|
struct memory_packer_db *db = (struct memory_packer_db *)_backend;
|
39
39
|
struct memobject *obj = NULL;
|
40
|
+
size_t pos;
|
40
41
|
size_t alloc_len;
|
42
|
+
int rval;
|
41
43
|
|
42
|
-
|
44
|
+
pos = git_oidmap_put(db->objects, oid, &rval);
|
45
|
+
if (rval < 0)
|
46
|
+
return -1;
|
47
|
+
|
48
|
+
if (rval == 0)
|
43
49
|
return 0;
|
44
50
|
|
45
51
|
GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, sizeof(struct memobject), len);
|
@@ -51,8 +57,8 @@ static int impl__write(git_odb_backend *_backend, const git_oid *oid, const void
|
|
51
57
|
obj->len = len;
|
52
58
|
obj->type = type;
|
53
59
|
|
54
|
-
|
55
|
-
|
60
|
+
git_oidmap_set_key_at(db->objects, pos, &obj->oid);
|
61
|
+
git_oidmap_set_value_at(db->objects, pos, obj);
|
56
62
|
|
57
63
|
if (type == GIT_OBJECT_COMMIT) {
|
58
64
|
struct memobject **store = git_array_alloc(db->commits);
|
@@ -73,11 +79,15 @@ static int impl__exists(git_odb_backend *backend, const git_oid *oid)
|
|
73
79
|
static int impl__read(void **buffer_p, size_t *len_p, git_object_t *type_p, git_odb_backend *backend, const git_oid *oid)
|
74
80
|
{
|
75
81
|
struct memory_packer_db *db = (struct memory_packer_db *)backend;
|
76
|
-
struct memobject *obj;
|
82
|
+
struct memobject *obj = NULL;
|
83
|
+
size_t pos;
|
77
84
|
|
78
|
-
|
85
|
+
pos = git_oidmap_lookup_index(db->objects, oid);
|
86
|
+
if (!git_oidmap_valid_index(db->objects, pos))
|
79
87
|
return GIT_ENOTFOUND;
|
80
88
|
|
89
|
+
obj = git_oidmap_value_at(db->objects, pos);
|
90
|
+
|
81
91
|
*len_p = obj->len;
|
82
92
|
*type_p = obj->type;
|
83
93
|
*buffer_p = git__malloc(obj->len);
|
@@ -90,11 +100,15 @@ static int impl__read(void **buffer_p, size_t *len_p, git_object_t *type_p, git_
|
|
90
100
|
static int impl__read_header(size_t *len_p, git_object_t *type_p, git_odb_backend *backend, const git_oid *oid)
|
91
101
|
{
|
92
102
|
struct memory_packer_db *db = (struct memory_packer_db *)backend;
|
93
|
-
struct memobject *obj;
|
103
|
+
struct memobject *obj = NULL;
|
104
|
+
size_t pos;
|
94
105
|
|
95
|
-
|
106
|
+
pos = git_oidmap_lookup_index(db->objects, oid);
|
107
|
+
if (!git_oidmap_valid_index(db->objects, pos))
|
96
108
|
return GIT_ENOTFOUND;
|
97
109
|
|
110
|
+
obj = git_oidmap_value_at(db->objects, pos);
|
111
|
+
|
98
112
|
*len_p = obj->len;
|
99
113
|
*type_p = obj->type;
|
100
114
|
return 0;
|
@@ -157,8 +171,7 @@ int git_mempack_new(git_odb_backend **out)
|
|
157
171
|
db = git__calloc(1, sizeof(struct memory_packer_db));
|
158
172
|
GIT_ERROR_CHECK_ALLOC(db);
|
159
173
|
|
160
|
-
|
161
|
-
return -1;
|
174
|
+
db->objects = git_oidmap_alloc();
|
162
175
|
|
163
176
|
db->parent.version = GIT_ODB_BACKEND_VERSION;
|
164
177
|
db->parent.read = &impl__read;
|
@@ -11,7 +11,7 @@
|
|
11
11
|
#include "git2/repository.h"
|
12
12
|
#include "git2/indexer.h"
|
13
13
|
#include "git2/sys/odb_backend.h"
|
14
|
-
#include "
|
14
|
+
#include "fileops.h"
|
15
15
|
#include "hash.h"
|
16
16
|
#include "odb.h"
|
17
17
|
#include "delta.h"
|
@@ -485,7 +485,7 @@ static int pack_backend__foreach(git_odb_backend *_backend, git_odb_foreach_cb c
|
|
485
485
|
return 0;
|
486
486
|
}
|
487
487
|
|
488
|
-
static int pack_backend__writepack_append(struct git_odb_writepack *_writepack, const void *data, size_t size,
|
488
|
+
static int pack_backend__writepack_append(struct git_odb_writepack *_writepack, const void *data, size_t size, git_transfer_progress *stats)
|
489
489
|
{
|
490
490
|
struct pack_writepack *writepack = (struct pack_writepack *)_writepack;
|
491
491
|
|
@@ -494,7 +494,7 @@ static int pack_backend__writepack_append(struct git_odb_writepack *_writepack,
|
|
494
494
|
return git_indexer_append(writepack->indexer, data, size, stats);
|
495
495
|
}
|
496
496
|
|
497
|
-
static int pack_backend__writepack_commit(struct git_odb_writepack *_writepack,
|
497
|
+
static int pack_backend__writepack_commit(struct git_odb_writepack *_writepack, git_transfer_progress *stats)
|
498
498
|
{
|
499
499
|
struct pack_writepack *writepack = (struct pack_writepack *)_writepack;
|
500
500
|
|
@@ -516,7 +516,7 @@ static void pack_backend__writepack_free(struct git_odb_writepack *_writepack)
|
|
516
516
|
static int pack_backend__writepack(struct git_odb_writepack **out,
|
517
517
|
git_odb_backend *_backend,
|
518
518
|
git_odb *odb,
|
519
|
-
|
519
|
+
git_transfer_progress_cb progress_cb,
|
520
520
|
void *progress_payload)
|
521
521
|
{
|
522
522
|
git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
|