rugged 0.28.4.1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/rugged/extconf.rb +3 -1
- data/ext/rugged/rugged.c +35 -31
- data/ext/rugged/rugged.h +13 -0
- data/ext/rugged/rugged_blob.c +11 -9
- data/ext/rugged/rugged_commit.c +17 -15
- data/ext/rugged/rugged_config.c +1 -1
- data/ext/rugged/rugged_diff.c +4 -26
- data/ext/rugged/rugged_index.c +4 -2
- data/ext/rugged/rugged_note.c +5 -3
- data/ext/rugged/rugged_object.c +57 -10
- data/ext/rugged/rugged_rebase.c +3 -1
- data/ext/rugged/rugged_remote.c +32 -8
- data/ext/rugged/rugged_repo.c +232 -17
- data/ext/rugged/rugged_tag.c +8 -6
- data/ext/rugged/rugged_tree.c +18 -16
- data/lib/rugged/commit.rb +1 -2
- data/lib/rugged/repository.rb +5 -6
- data/lib/rugged/submodule_collection.rb +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +39 -19
- data/vendor/libgit2/COPYING +28 -0
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +5 -1
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +28 -0
- data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +38 -0
- data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +37 -0
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +6 -0
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +77 -0
- data/vendor/libgit2/cmake/Modules/SanitizeBool.cmake +20 -0
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +56 -0
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +127 -0
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +69 -0
- data/vendor/libgit2/deps/http-parser/http_parser.c +11 -6
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +23 -0
- data/vendor/libgit2/deps/ntlmclient/compat.h +55 -0
- data/vendor/libgit2/deps/ntlmclient/crypt.h +64 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +120 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +18 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +145 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +18 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +130 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +21 -0
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +1422 -0
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +174 -0
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +320 -0
- data/vendor/libgit2/deps/ntlmclient/unicode.h +36 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +445 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +201 -0
- data/vendor/libgit2/deps/ntlmclient/utf8.h +1257 -0
- data/vendor/libgit2/deps/ntlmclient/util.c +21 -0
- data/vendor/libgit2/deps/ntlmclient/util.h +14 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +140 -0
- data/vendor/libgit2/deps/pcre/COPYING +5 -0
- data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +22 -0
- data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +17 -0
- data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +58 -0
- data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +29 -0
- data/vendor/libgit2/deps/pcre/config.h.in +57 -0
- data/vendor/libgit2/deps/pcre/pcre.h +641 -0
- data/vendor/libgit2/deps/pcre/pcre_byte_order.c +319 -0
- data/vendor/libgit2/deps/pcre/pcre_chartables.c +198 -0
- data/vendor/libgit2/deps/pcre/pcre_compile.c +9800 -0
- data/vendor/libgit2/deps/pcre/pcre_config.c +190 -0
- data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +3676 -0
- data/vendor/libgit2/deps/pcre/pcre_exec.c +7173 -0
- data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +245 -0
- data/vendor/libgit2/deps/pcre/pcre_get.c +669 -0
- data/vendor/libgit2/deps/pcre/pcre_globals.c +86 -0
- data/vendor/libgit2/deps/pcre/pcre_internal.h +2787 -0
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +11913 -0
- data/vendor/libgit2/deps/pcre/pcre_maketables.c +156 -0
- data/vendor/libgit2/deps/pcre/pcre_newline.c +210 -0
- data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +94 -0
- data/vendor/libgit2/deps/pcre/pcre_printint.c +834 -0
- data/vendor/libgit2/deps/pcre/pcre_refcount.c +92 -0
- data/vendor/libgit2/deps/pcre/pcre_string_utils.c +211 -0
- data/vendor/libgit2/deps/pcre/pcre_study.c +1686 -0
- data/vendor/libgit2/deps/pcre/pcre_tables.c +727 -0
- data/vendor/libgit2/deps/pcre/pcre_ucd.c +3644 -0
- data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +301 -0
- data/vendor/libgit2/deps/pcre/pcre_version.c +98 -0
- data/vendor/libgit2/deps/pcre/pcre_xclass.c +268 -0
- data/vendor/libgit2/deps/pcre/pcreposix.c +421 -0
- data/vendor/libgit2/deps/pcre/pcreposix.h +117 -0
- data/vendor/libgit2/deps/pcre/ucp.h +224 -0
- data/vendor/libgit2/deps/zlib/adler32.c +0 -7
- data/vendor/libgit2/deps/zlib/crc32.c +0 -7
- data/vendor/libgit2/include/git2.h +2 -0
- data/vendor/libgit2/include/git2/apply.h +22 -2
- data/vendor/libgit2/include/git2/attr.h +23 -13
- data/vendor/libgit2/include/git2/blame.h +2 -2
- data/vendor/libgit2/include/git2/blob.h +44 -12
- data/vendor/libgit2/include/git2/branch.h +74 -57
- data/vendor/libgit2/include/git2/buffer.h +20 -14
- data/vendor/libgit2/include/git2/cert.h +135 -0
- data/vendor/libgit2/include/git2/checkout.h +46 -14
- 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 +23 -1
- data/vendor/libgit2/include/git2/common.h +15 -6
- data/vendor/libgit2/include/git2/config.h +12 -12
- data/vendor/libgit2/include/git2/cred_helpers.h +4 -42
- data/vendor/libgit2/include/git2/credential.h +314 -0
- data/vendor/libgit2/include/git2/credential_helpers.h +52 -0
- data/vendor/libgit2/include/git2/deprecated.h +321 -3
- data/vendor/libgit2/include/git2/describe.h +4 -4
- data/vendor/libgit2/include/git2/diff.h +16 -14
- data/vendor/libgit2/include/git2/errors.h +4 -2
- data/vendor/libgit2/include/git2/filter.h +8 -0
- data/vendor/libgit2/include/git2/index.h +2 -1
- data/vendor/libgit2/include/git2/indexer.h +48 -4
- data/vendor/libgit2/include/git2/merge.h +6 -10
- data/vendor/libgit2/include/git2/net.h +0 -5
- data/vendor/libgit2/include/git2/object.h +2 -14
- data/vendor/libgit2/include/git2/odb.h +3 -2
- data/vendor/libgit2/include/git2/odb_backend.h +5 -4
- data/vendor/libgit2/include/git2/oid.h +11 -6
- data/vendor/libgit2/include/git2/pack.h +12 -1
- data/vendor/libgit2/include/git2/proxy.h +6 -4
- data/vendor/libgit2/include/git2/rebase.h +46 -2
- data/vendor/libgit2/include/git2/refs.h +19 -0
- data/vendor/libgit2/include/git2/remote.h +40 -15
- data/vendor/libgit2/include/git2/repository.h +29 -6
- data/vendor/libgit2/include/git2/revert.h +1 -1
- data/vendor/libgit2/include/git2/revwalk.h +7 -3
- data/vendor/libgit2/include/git2/stash.h +4 -4
- data/vendor/libgit2/include/git2/status.h +25 -16
- data/vendor/libgit2/include/git2/submodule.h +20 -3
- data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
- data/vendor/libgit2/include/git2/sys/cred.h +15 -0
- data/vendor/libgit2/include/git2/sys/credential.h +90 -0
- data/vendor/libgit2/include/git2/sys/index.h +4 -2
- data/vendor/libgit2/include/git2/sys/mempack.h +2 -1
- data/vendor/libgit2/include/git2/sys/merge.h +1 -1
- data/vendor/libgit2/include/git2/sys/odb_backend.h +48 -4
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +164 -21
- data/vendor/libgit2/include/git2/sys/repository.h +17 -6
- data/vendor/libgit2/include/git2/sys/transport.h +4 -4
- data/vendor/libgit2/include/git2/tag.h +11 -2
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transport.h +11 -340
- data/vendor/libgit2/include/git2/tree.h +5 -3
- data/vendor/libgit2/include/git2/types.h +4 -89
- data/vendor/libgit2/include/git2/version.h +5 -5
- data/vendor/libgit2/include/git2/worktree.h +5 -5
- data/vendor/libgit2/src/CMakeLists.txt +99 -236
- data/vendor/libgit2/src/alloc.c +2 -14
- data/vendor/libgit2/src/{stdalloc.c → allocators/stdalloc.c} +3 -4
- data/vendor/libgit2/src/{stdalloc.h → allocators/stdalloc.h} +4 -4
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +118 -0
- data/vendor/libgit2/src/{transports/cred.h → allocators/win32_crtdbg.h} +5 -4
- data/vendor/libgit2/src/apply.c +60 -30
- data/vendor/libgit2/src/attr.c +70 -64
- data/vendor/libgit2/src/attr_file.c +189 -96
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +48 -48
- data/vendor/libgit2/src/attrcache.h +2 -1
- data/vendor/libgit2/src/blame.c +17 -5
- data/vendor/libgit2/src/blame.h +1 -1
- data/vendor/libgit2/src/blame_git.c +21 -7
- data/vendor/libgit2/src/blob.c +81 -17
- data/vendor/libgit2/src/blob.h +2 -2
- data/vendor/libgit2/src/branch.c +60 -32
- data/vendor/libgit2/src/buffer.c +19 -7
- data/vendor/libgit2/src/buffer.h +1 -0
- data/vendor/libgit2/src/cache.c +33 -36
- data/vendor/libgit2/src/cache.h +1 -1
- data/vendor/libgit2/src/cc-compat.h +5 -0
- data/vendor/libgit2/src/checkout.c +26 -16
- data/vendor/libgit2/src/cherrypick.c +9 -3
- data/vendor/libgit2/src/clone.c +29 -7
- data/vendor/libgit2/src/clone.h +4 -0
- data/vendor/libgit2/src/commit.c +70 -22
- data/vendor/libgit2/src/commit.h +6 -0
- data/vendor/libgit2/src/commit_list.c +28 -76
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +3 -75
- data/vendor/libgit2/src/config.c +31 -40
- data/vendor/libgit2/src/config.h +7 -6
- data/vendor/libgit2/src/config_backend.h +12 -0
- data/vendor/libgit2/src/config_cache.c +39 -39
- data/vendor/libgit2/src/config_entries.c +69 -99
- data/vendor/libgit2/src/config_entries.h +1 -0
- data/vendor/libgit2/src/config_file.c +346 -380
- data/vendor/libgit2/src/config_mem.c +12 -16
- data/vendor/libgit2/src/config_parse.c +49 -29
- data/vendor/libgit2/src/config_parse.h +13 -12
- data/vendor/libgit2/src/config_snapshot.c +206 -0
- data/vendor/libgit2/src/crlf.c +14 -14
- data/vendor/libgit2/src/describe.c +21 -20
- data/vendor/libgit2/src/diff.c +43 -58
- data/vendor/libgit2/src/diff.h +4 -3
- data/vendor/libgit2/src/diff_driver.c +37 -38
- data/vendor/libgit2/src/diff_file.c +12 -10
- data/vendor/libgit2/src/diff_file.h +2 -2
- data/vendor/libgit2/src/diff_generate.c +148 -98
- 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 +25 -13
- data/vendor/libgit2/src/diff_stats.c +1 -1
- data/vendor/libgit2/src/diff_tform.c +11 -11
- data/vendor/libgit2/src/errors.c +21 -25
- data/vendor/libgit2/src/errors.h +81 -0
- data/vendor/libgit2/src/features.h.in +9 -2
- data/vendor/libgit2/src/fetch.c +7 -2
- data/vendor/libgit2/src/fetchhead.c +36 -4
- data/vendor/libgit2/src/filebuf.c +6 -10
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/filter.c +16 -8
- data/vendor/libgit2/src/{fileops.c → futils.c} +21 -17
- data/vendor/libgit2/src/{fileops.h → futils.h} +5 -5
- data/vendor/libgit2/src/global.c +12 -40
- data/vendor/libgit2/src/global.h +0 -2
- data/vendor/libgit2/src/hash.c +61 -0
- data/vendor/libgit2/src/hash.h +19 -21
- data/vendor/libgit2/src/hash/sha1.h +38 -0
- data/vendor/libgit2/src/hash/{hash_collisiondetect.h → sha1/collisiondetect.c} +14 -17
- data/vendor/libgit2/src/{sha1_lookup.h → hash/sha1/collisiondetect.h} +8 -8
- data/vendor/libgit2/src/hash/{hash_common_crypto.h → sha1/common_crypto.c} +15 -19
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +19 -0
- data/vendor/libgit2/src/hash/{hash_generic.c → sha1/generic.c} +22 -10
- data/vendor/libgit2/src/hash/{hash_generic.h → sha1/generic.h} +4 -14
- data/vendor/libgit2/src/hash/{hash_mbedtls.c → sha1/mbedtls.c} +15 -7
- data/vendor/libgit2/src/hash/{hash_mbedtls.h → sha1/mbedtls.h} +6 -11
- data/vendor/libgit2/src/hash/{hash_openssl.h → sha1/openssl.c} +14 -18
- data/vendor/libgit2/src/hash/sha1/openssl.h +19 -0
- data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/sha1.c +14 -3
- data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/sha1.h +0 -0
- data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/ubc_check.c +0 -0
- data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/ubc_check.h +0 -0
- data/vendor/libgit2/src/hash/{hash_win32.c → sha1/win32.c} +34 -24
- data/vendor/libgit2/src/hash/{hash_win32.h → sha1/win32.h} +6 -19
- data/vendor/libgit2/src/hashsig.c +1 -1
- data/vendor/libgit2/src/idxmap.c +91 -65
- data/vendor/libgit2/src/idxmap.h +151 -15
- data/vendor/libgit2/src/ignore.c +32 -38
- data/vendor/libgit2/src/index.c +105 -83
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +71 -72
- data/vendor/libgit2/src/integer.h +39 -4
- data/vendor/libgit2/src/iterator.c +40 -35
- data/vendor/libgit2/src/iterator.h +8 -8
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +78 -51
- data/vendor/libgit2/src/merge.h +2 -2
- data/vendor/libgit2/src/merge_driver.c +5 -5
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +18 -23
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/net.c +411 -0
- data/vendor/libgit2/src/net.h +57 -0
- data/vendor/libgit2/src/netops.c +6 -193
- data/vendor/libgit2/src/netops.h +1 -34
- data/vendor/libgit2/src/notes.c +8 -5
- data/vendor/libgit2/src/object.c +3 -3
- data/vendor/libgit2/src/object.h +2 -0
- data/vendor/libgit2/src/odb.c +41 -23
- data/vendor/libgit2/src/odb.h +3 -2
- data/vendor/libgit2/src/odb_loose.c +17 -10
- data/vendor/libgit2/src/odb_mempack.c +13 -24
- data/vendor/libgit2/src/odb_pack.c +4 -5
- data/vendor/libgit2/src/offmap.c +43 -55
- data/vendor/libgit2/src/offmap.h +102 -24
- data/vendor/libgit2/src/oid.c +19 -8
- data/vendor/libgit2/src/oidmap.c +39 -57
- data/vendor/libgit2/src/oidmap.h +99 -19
- data/vendor/libgit2/src/pack-objects.c +28 -33
- data/vendor/libgit2/src/pack-objects.h +1 -1
- data/vendor/libgit2/src/pack.c +117 -129
- data/vendor/libgit2/src/pack.h +15 -18
- data/vendor/libgit2/src/parse.c +10 -0
- 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 +130 -33
- data/vendor/libgit2/src/path.c +43 -6
- data/vendor/libgit2/src/path.h +2 -0
- data/vendor/libgit2/src/pathspec.c +14 -14
- data/vendor/libgit2/src/pool.c +26 -22
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +7 -7
- data/vendor/libgit2/src/posix.h +12 -1
- data/vendor/libgit2/src/proxy.c +7 -2
- data/vendor/libgit2/src/push.c +13 -7
- data/vendor/libgit2/src/reader.c +2 -2
- data/vendor/libgit2/src/rebase.c +87 -28
- data/vendor/libgit2/src/refdb.c +12 -0
- data/vendor/libgit2/src/refdb_fs.c +219 -167
- data/vendor/libgit2/src/reflog.c +11 -13
- data/vendor/libgit2/src/refs.c +39 -23
- data/vendor/libgit2/src/refs.h +8 -1
- data/vendor/libgit2/src/refspec.c +9 -16
- data/vendor/libgit2/src/regexp.c +221 -0
- data/vendor/libgit2/src/regexp.h +97 -0
- data/vendor/libgit2/src/remote.c +57 -55
- data/vendor/libgit2/src/remote.h +2 -2
- data/vendor/libgit2/src/repository.c +187 -154
- data/vendor/libgit2/src/repository.h +49 -40
- data/vendor/libgit2/src/revert.c +8 -3
- data/vendor/libgit2/src/revparse.c +18 -19
- data/vendor/libgit2/src/revwalk.c +72 -34
- data/vendor/libgit2/src/revwalk.h +20 -0
- data/vendor/libgit2/src/settings.c +13 -1
- data/vendor/libgit2/src/sortedcache.c +12 -26
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +47 -67
- data/vendor/libgit2/src/status.c +17 -11
- data/vendor/libgit2/src/streams/openssl.c +54 -2
- data/vendor/libgit2/src/streams/socket.c +2 -2
- data/vendor/libgit2/src/strmap.c +37 -84
- data/vendor/libgit2/src/strmap.h +105 -33
- data/vendor/libgit2/src/submodule.c +151 -126
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +11 -1
- data/vendor/libgit2/src/tag.c +10 -2
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/trace.h +3 -3
- data/vendor/libgit2/src/trailer.c +46 -32
- data/vendor/libgit2/src/transaction.c +10 -9
- data/vendor/libgit2/src/transports/auth.c +16 -15
- data/vendor/libgit2/src/transports/auth.h +18 -11
- data/vendor/libgit2/src/transports/auth_negotiate.c +64 -33
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/auth_ntlm.c +223 -0
- data/vendor/libgit2/src/transports/auth_ntlm.h +38 -0
- data/vendor/libgit2/src/transports/credential.c +476 -0
- data/vendor/libgit2/src/transports/{cred_helpers.c → credential_helpers.c} +21 -8
- data/vendor/libgit2/src/transports/git.c +11 -16
- data/vendor/libgit2/src/transports/http.c +488 -1248
- data/vendor/libgit2/src/transports/http.h +4 -1
- data/vendor/libgit2/src/transports/httpclient.c +1549 -0
- data/vendor/libgit2/src/transports/httpclient.h +190 -0
- data/vendor/libgit2/src/transports/local.c +10 -10
- data/vendor/libgit2/src/transports/smart.c +19 -19
- data/vendor/libgit2/src/transports/smart.h +3 -3
- data/vendor/libgit2/src/transports/smart_pkt.c +1 -1
- data/vendor/libgit2/src/transports/smart_protocol.c +40 -64
- data/vendor/libgit2/src/transports/ssh.c +77 -59
- data/vendor/libgit2/src/transports/winhttp.c +272 -242
- data/vendor/libgit2/src/tree-cache.c +14 -7
- data/vendor/libgit2/src/tree.c +16 -26
- data/vendor/libgit2/src/unix/map.c +1 -1
- data/vendor/libgit2/src/unix/posix.h +2 -12
- data/vendor/libgit2/src/userdiff.h +3 -1
- data/vendor/libgit2/src/util.c +51 -53
- data/vendor/libgit2/src/util.h +16 -21
- data/vendor/libgit2/src/wildmatch.c +320 -0
- data/vendor/libgit2/src/wildmatch.h +23 -0
- data/vendor/libgit2/src/win32/map.c +3 -5
- data/vendor/libgit2/src/win32/path_w32.c +40 -3
- data/vendor/libgit2/src/win32/path_w32.h +15 -29
- data/vendor/libgit2/src/win32/posix.h +1 -4
- data/vendor/libgit2/src/win32/posix_w32.c +47 -5
- data/vendor/libgit2/src/win32/precompiled.h +0 -2
- data/vendor/libgit2/src/win32/thread.c +5 -10
- data/vendor/libgit2/src/win32/w32_buffer.c +7 -3
- data/vendor/libgit2/src/win32/w32_common.h +39 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +0 -93
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -2
- data/vendor/libgit2/src/win32/w32_stack.c +4 -9
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +31 -0
- data/vendor/libgit2/src/win32/w32_util.h +6 -32
- data/vendor/libgit2/src/worktree.c +79 -49
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +12 -0
- data/vendor/libgit2/src/xdiff/xpatience.c +3 -0
- data/vendor/libgit2/src/zstream.c +5 -0
- data/vendor/libgit2/src/zstream.h +1 -0
- metadata +108 -41
- data/vendor/libgit2/deps/regex/CMakeLists.txt +0 -2
- data/vendor/libgit2/deps/regex/COPYING +0 -502
- data/vendor/libgit2/deps/regex/config.h +0 -7
- data/vendor/libgit2/deps/regex/regcomp.c +0 -3857
- data/vendor/libgit2/deps/regex/regex.c +0 -92
- data/vendor/libgit2/deps/regex/regex.h +0 -582
- data/vendor/libgit2/deps/regex/regex_internal.c +0 -1744
- data/vendor/libgit2/deps/regex/regex_internal.h +0 -819
- data/vendor/libgit2/deps/regex/regexec.c +0 -4369
- data/vendor/libgit2/include/git2/inttypes.h +0 -309
- data/vendor/libgit2/include/git2/sys/time.h +0 -31
- data/vendor/libgit2/libgit2.pc.in +0 -13
- data/vendor/libgit2/src/fnmatch.c +0 -248
- data/vendor/libgit2/src/fnmatch.h +0 -48
- data/vendor/libgit2/src/sha1_lookup.c +0 -35
- data/vendor/libgit2/src/transports/cred.c +0 -390
@@ -0,0 +1,224 @@
|
|
1
|
+
/*************************************************
|
2
|
+
* Unicode Property Table handler *
|
3
|
+
*************************************************/
|
4
|
+
|
5
|
+
#ifndef _UCP_H
|
6
|
+
#define _UCP_H
|
7
|
+
|
8
|
+
/* This file contains definitions of the property values that are returned by
|
9
|
+
the UCD access macros. New values that are added for new releases of Unicode
|
10
|
+
should always be at the end of each enum, for backwards compatibility.
|
11
|
+
|
12
|
+
IMPORTANT: Note also that the specific numeric values of the enums have to be
|
13
|
+
the same as the values that are generated by the maint/MultiStage2.py script,
|
14
|
+
where the equivalent property descriptive names are listed in vectors.
|
15
|
+
|
16
|
+
ALSO: The specific values of the first two enums are assumed for the table
|
17
|
+
called catposstab in pcre_compile.c. */
|
18
|
+
|
19
|
+
/* These are the general character categories. */
|
20
|
+
|
21
|
+
enum {
|
22
|
+
ucp_C, /* Other */
|
23
|
+
ucp_L, /* Letter */
|
24
|
+
ucp_M, /* Mark */
|
25
|
+
ucp_N, /* Number */
|
26
|
+
ucp_P, /* Punctuation */
|
27
|
+
ucp_S, /* Symbol */
|
28
|
+
ucp_Z /* Separator */
|
29
|
+
};
|
30
|
+
|
31
|
+
/* These are the particular character categories. */
|
32
|
+
|
33
|
+
enum {
|
34
|
+
ucp_Cc, /* Control */
|
35
|
+
ucp_Cf, /* Format */
|
36
|
+
ucp_Cn, /* Unassigned */
|
37
|
+
ucp_Co, /* Private use */
|
38
|
+
ucp_Cs, /* Surrogate */
|
39
|
+
ucp_Ll, /* Lower case letter */
|
40
|
+
ucp_Lm, /* Modifier letter */
|
41
|
+
ucp_Lo, /* Other letter */
|
42
|
+
ucp_Lt, /* Title case letter */
|
43
|
+
ucp_Lu, /* Upper case letter */
|
44
|
+
ucp_Mc, /* Spacing mark */
|
45
|
+
ucp_Me, /* Enclosing mark */
|
46
|
+
ucp_Mn, /* Non-spacing mark */
|
47
|
+
ucp_Nd, /* Decimal number */
|
48
|
+
ucp_Nl, /* Letter number */
|
49
|
+
ucp_No, /* Other number */
|
50
|
+
ucp_Pc, /* Connector punctuation */
|
51
|
+
ucp_Pd, /* Dash punctuation */
|
52
|
+
ucp_Pe, /* Close punctuation */
|
53
|
+
ucp_Pf, /* Final punctuation */
|
54
|
+
ucp_Pi, /* Initial punctuation */
|
55
|
+
ucp_Po, /* Other punctuation */
|
56
|
+
ucp_Ps, /* Open punctuation */
|
57
|
+
ucp_Sc, /* Currency symbol */
|
58
|
+
ucp_Sk, /* Modifier symbol */
|
59
|
+
ucp_Sm, /* Mathematical symbol */
|
60
|
+
ucp_So, /* Other symbol */
|
61
|
+
ucp_Zl, /* Line separator */
|
62
|
+
ucp_Zp, /* Paragraph separator */
|
63
|
+
ucp_Zs /* Space separator */
|
64
|
+
};
|
65
|
+
|
66
|
+
/* These are grapheme break properties. Note that the code for processing them
|
67
|
+
assumes that the values are less than 16. If more values are added that take
|
68
|
+
the number to 16 or more, the code will have to be rewritten. */
|
69
|
+
|
70
|
+
enum {
|
71
|
+
ucp_gbCR, /* 0 */
|
72
|
+
ucp_gbLF, /* 1 */
|
73
|
+
ucp_gbControl, /* 2 */
|
74
|
+
ucp_gbExtend, /* 3 */
|
75
|
+
ucp_gbPrepend, /* 4 */
|
76
|
+
ucp_gbSpacingMark, /* 5 */
|
77
|
+
ucp_gbL, /* 6 Hangul syllable type L */
|
78
|
+
ucp_gbV, /* 7 Hangul syllable type V */
|
79
|
+
ucp_gbT, /* 8 Hangul syllable type T */
|
80
|
+
ucp_gbLV, /* 9 Hangul syllable type LV */
|
81
|
+
ucp_gbLVT, /* 10 Hangul syllable type LVT */
|
82
|
+
ucp_gbRegionalIndicator, /* 11 */
|
83
|
+
ucp_gbOther /* 12 */
|
84
|
+
};
|
85
|
+
|
86
|
+
/* These are the script identifications. */
|
87
|
+
|
88
|
+
enum {
|
89
|
+
ucp_Arabic,
|
90
|
+
ucp_Armenian,
|
91
|
+
ucp_Bengali,
|
92
|
+
ucp_Bopomofo,
|
93
|
+
ucp_Braille,
|
94
|
+
ucp_Buginese,
|
95
|
+
ucp_Buhid,
|
96
|
+
ucp_Canadian_Aboriginal,
|
97
|
+
ucp_Cherokee,
|
98
|
+
ucp_Common,
|
99
|
+
ucp_Coptic,
|
100
|
+
ucp_Cypriot,
|
101
|
+
ucp_Cyrillic,
|
102
|
+
ucp_Deseret,
|
103
|
+
ucp_Devanagari,
|
104
|
+
ucp_Ethiopic,
|
105
|
+
ucp_Georgian,
|
106
|
+
ucp_Glagolitic,
|
107
|
+
ucp_Gothic,
|
108
|
+
ucp_Greek,
|
109
|
+
ucp_Gujarati,
|
110
|
+
ucp_Gurmukhi,
|
111
|
+
ucp_Han,
|
112
|
+
ucp_Hangul,
|
113
|
+
ucp_Hanunoo,
|
114
|
+
ucp_Hebrew,
|
115
|
+
ucp_Hiragana,
|
116
|
+
ucp_Inherited,
|
117
|
+
ucp_Kannada,
|
118
|
+
ucp_Katakana,
|
119
|
+
ucp_Kharoshthi,
|
120
|
+
ucp_Khmer,
|
121
|
+
ucp_Lao,
|
122
|
+
ucp_Latin,
|
123
|
+
ucp_Limbu,
|
124
|
+
ucp_Linear_B,
|
125
|
+
ucp_Malayalam,
|
126
|
+
ucp_Mongolian,
|
127
|
+
ucp_Myanmar,
|
128
|
+
ucp_New_Tai_Lue,
|
129
|
+
ucp_Ogham,
|
130
|
+
ucp_Old_Italic,
|
131
|
+
ucp_Old_Persian,
|
132
|
+
ucp_Oriya,
|
133
|
+
ucp_Osmanya,
|
134
|
+
ucp_Runic,
|
135
|
+
ucp_Shavian,
|
136
|
+
ucp_Sinhala,
|
137
|
+
ucp_Syloti_Nagri,
|
138
|
+
ucp_Syriac,
|
139
|
+
ucp_Tagalog,
|
140
|
+
ucp_Tagbanwa,
|
141
|
+
ucp_Tai_Le,
|
142
|
+
ucp_Tamil,
|
143
|
+
ucp_Telugu,
|
144
|
+
ucp_Thaana,
|
145
|
+
ucp_Thai,
|
146
|
+
ucp_Tibetan,
|
147
|
+
ucp_Tifinagh,
|
148
|
+
ucp_Ugaritic,
|
149
|
+
ucp_Yi,
|
150
|
+
/* New for Unicode 5.0: */
|
151
|
+
ucp_Balinese,
|
152
|
+
ucp_Cuneiform,
|
153
|
+
ucp_Nko,
|
154
|
+
ucp_Phags_Pa,
|
155
|
+
ucp_Phoenician,
|
156
|
+
/* New for Unicode 5.1: */
|
157
|
+
ucp_Carian,
|
158
|
+
ucp_Cham,
|
159
|
+
ucp_Kayah_Li,
|
160
|
+
ucp_Lepcha,
|
161
|
+
ucp_Lycian,
|
162
|
+
ucp_Lydian,
|
163
|
+
ucp_Ol_Chiki,
|
164
|
+
ucp_Rejang,
|
165
|
+
ucp_Saurashtra,
|
166
|
+
ucp_Sundanese,
|
167
|
+
ucp_Vai,
|
168
|
+
/* New for Unicode 5.2: */
|
169
|
+
ucp_Avestan,
|
170
|
+
ucp_Bamum,
|
171
|
+
ucp_Egyptian_Hieroglyphs,
|
172
|
+
ucp_Imperial_Aramaic,
|
173
|
+
ucp_Inscriptional_Pahlavi,
|
174
|
+
ucp_Inscriptional_Parthian,
|
175
|
+
ucp_Javanese,
|
176
|
+
ucp_Kaithi,
|
177
|
+
ucp_Lisu,
|
178
|
+
ucp_Meetei_Mayek,
|
179
|
+
ucp_Old_South_Arabian,
|
180
|
+
ucp_Old_Turkic,
|
181
|
+
ucp_Samaritan,
|
182
|
+
ucp_Tai_Tham,
|
183
|
+
ucp_Tai_Viet,
|
184
|
+
/* New for Unicode 6.0.0: */
|
185
|
+
ucp_Batak,
|
186
|
+
ucp_Brahmi,
|
187
|
+
ucp_Mandaic,
|
188
|
+
/* New for Unicode 6.1.0: */
|
189
|
+
ucp_Chakma,
|
190
|
+
ucp_Meroitic_Cursive,
|
191
|
+
ucp_Meroitic_Hieroglyphs,
|
192
|
+
ucp_Miao,
|
193
|
+
ucp_Sharada,
|
194
|
+
ucp_Sora_Sompeng,
|
195
|
+
ucp_Takri,
|
196
|
+
/* New for Unicode 7.0.0: */
|
197
|
+
ucp_Bassa_Vah,
|
198
|
+
ucp_Caucasian_Albanian,
|
199
|
+
ucp_Duployan,
|
200
|
+
ucp_Elbasan,
|
201
|
+
ucp_Grantha,
|
202
|
+
ucp_Khojki,
|
203
|
+
ucp_Khudawadi,
|
204
|
+
ucp_Linear_A,
|
205
|
+
ucp_Mahajani,
|
206
|
+
ucp_Manichaean,
|
207
|
+
ucp_Mende_Kikakui,
|
208
|
+
ucp_Modi,
|
209
|
+
ucp_Mro,
|
210
|
+
ucp_Nabataean,
|
211
|
+
ucp_Old_North_Arabian,
|
212
|
+
ucp_Old_Permic,
|
213
|
+
ucp_Pahawh_Hmong,
|
214
|
+
ucp_Palmyrene,
|
215
|
+
ucp_Psalter_Pahlavi,
|
216
|
+
ucp_Pau_Cin_Hau,
|
217
|
+
ucp_Siddham,
|
218
|
+
ucp_Tirhuta,
|
219
|
+
ucp_Warang_Citi
|
220
|
+
};
|
221
|
+
|
222
|
+
#endif
|
223
|
+
|
224
|
+
/* End of ucp.h */
|
@@ -177,10 +177,3 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2)
|
|
177
177
|
return adler32_combine_(adler1, adler2, len2);
|
178
178
|
}
|
179
179
|
|
180
|
-
uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
|
181
|
-
uLong adler1;
|
182
|
-
uLong adler2;
|
183
|
-
z_off64_t len2;
|
184
|
-
{
|
185
|
-
return adler32_combine_(adler1, adler2, len2);
|
186
|
-
}
|
@@ -433,10 +433,3 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
|
|
433
433
|
return crc32_combine_(crc1, crc2, len2);
|
434
434
|
}
|
435
435
|
|
436
|
-
uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
|
437
|
-
uLong crc1;
|
438
|
-
uLong crc2;
|
439
|
-
z_off64_t len2;
|
440
|
-
{
|
441
|
-
return crc32_combine_(crc1, crc2, len2);
|
442
|
-
}
|
@@ -15,12 +15,14 @@
|
|
15
15
|
#include "git2/blame.h"
|
16
16
|
#include "git2/branch.h"
|
17
17
|
#include "git2/buffer.h"
|
18
|
+
#include "git2/cert.h"
|
18
19
|
#include "git2/checkout.h"
|
19
20
|
#include "git2/cherrypick.h"
|
20
21
|
#include "git2/clone.h"
|
21
22
|
#include "git2/commit.h"
|
22
23
|
#include "git2/common.h"
|
23
24
|
#include "git2/config.h"
|
25
|
+
#include "git2/credential.h"
|
24
26
|
#include "git2/deprecated.h"
|
25
27
|
#include "git2/describe.h"
|
26
28
|
#include "git2/diff.h"
|
@@ -53,25 +53,44 @@ typedef int GIT_CALLBACK(git_apply_hunk_cb)(
|
|
53
53
|
const git_diff_hunk *hunk,
|
54
54
|
void *payload);
|
55
55
|
|
56
|
+
/** Flags controlling the behavior of git_apply */
|
57
|
+
typedef enum {
|
58
|
+
/**
|
59
|
+
* Don't actually make changes, just test that the patch applies.
|
60
|
+
* This is the equivalent of `git apply --check`.
|
61
|
+
*/
|
62
|
+
GIT_APPLY_CHECK = (1 << 0),
|
63
|
+
} git_apply_flags_t;
|
64
|
+
|
56
65
|
/**
|
57
66
|
* Apply options structure
|
58
67
|
*
|
59
68
|
* Initialize with `GIT_APPLY_OPTIONS_INIT`. Alternatively, you can
|
60
|
-
* use `
|
69
|
+
* use `git_apply_options_init`.
|
61
70
|
*
|
62
71
|
* @see git_apply_to_tree, git_apply
|
63
72
|
*/
|
64
73
|
typedef struct {
|
65
|
-
unsigned int version;
|
74
|
+
unsigned int version; /**< The version */
|
66
75
|
|
76
|
+
/** When applying a patch, callback that will be made per delta (file). */
|
67
77
|
git_apply_delta_cb delta_cb;
|
78
|
+
|
79
|
+
/** When applying a patch, callback that will be made per hunk. */
|
68
80
|
git_apply_hunk_cb hunk_cb;
|
81
|
+
|
82
|
+
/** Payload passed to both delta_cb & hunk_cb. */
|
69
83
|
void *payload;
|
84
|
+
|
85
|
+
/** Bitmask of git_apply_flags_t */
|
86
|
+
unsigned int flags;
|
70
87
|
} git_apply_options;
|
71
88
|
|
72
89
|
#define GIT_APPLY_OPTIONS_VERSION 1
|
73
90
|
#define GIT_APPLY_OPTIONS_INIT {GIT_APPLY_OPTIONS_VERSION}
|
74
91
|
|
92
|
+
GIT_EXTERN(int) git_apply_options_init(git_apply_options *opts, unsigned int version);
|
93
|
+
|
75
94
|
/**
|
76
95
|
* Apply a `git_diff` to a `git_tree`, and return the resulting image
|
77
96
|
* as an index.
|
@@ -89,6 +108,7 @@ GIT_EXTERN(int) git_apply_to_tree(
|
|
89
108
|
git_diff *diff,
|
90
109
|
const git_apply_options *options);
|
91
110
|
|
111
|
+
/** Possible application locations for git_apply */
|
92
112
|
typedef enum {
|
93
113
|
/**
|
94
114
|
* Apply the patch to the workdir, leaving the index untouched.
|
@@ -30,7 +30,7 @@ GIT_BEGIN_DECL
|
|
30
30
|
* Then for file `xyz.c` looking up attribute "foo" gives a value for
|
31
31
|
* which `GIT_ATTR_TRUE(value)` is true.
|
32
32
|
*/
|
33
|
-
#define
|
33
|
+
#define GIT_ATTR_IS_TRUE(attr) (git_attr_value(attr) == GIT_ATTR_VALUE_TRUE)
|
34
34
|
|
35
35
|
/**
|
36
36
|
* GIT_ATTR_FALSE checks if an attribute is set off. In core git
|
@@ -44,7 +44,7 @@ GIT_BEGIN_DECL
|
|
44
44
|
* Then for file `zyx.h` looking up attribute "foo" gives a value for
|
45
45
|
* which `GIT_ATTR_FALSE(value)` is true.
|
46
46
|
*/
|
47
|
-
#define
|
47
|
+
#define GIT_ATTR_IS_FALSE(attr) (git_attr_value(attr) == GIT_ATTR_VALUE_FALSE)
|
48
48
|
|
49
49
|
/**
|
50
50
|
* GIT_ATTR_UNSPECIFIED checks if an attribute is unspecified. This
|
@@ -62,7 +62,7 @@ GIT_BEGIN_DECL
|
|
62
62
|
* file `onefile.rb` or looking up "bar" on any file will all give
|
63
63
|
* `GIT_ATTR_UNSPECIFIED(value)` of true.
|
64
64
|
*/
|
65
|
-
#define
|
65
|
+
#define GIT_ATTR_IS_UNSPECIFIED(attr) (git_attr_value(attr) == GIT_ATTR_VALUE_UNSPECIFIED)
|
66
66
|
|
67
67
|
/**
|
68
68
|
* GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as
|
@@ -74,17 +74,17 @@ GIT_BEGIN_DECL
|
|
74
74
|
* Given this, looking up "eol" for `onefile.txt` will give back the
|
75
75
|
* string "lf" and `GIT_ATTR_SET_TO_VALUE(attr)` will return true.
|
76
76
|
*/
|
77
|
-
#define GIT_ATTR_HAS_VALUE(attr) (git_attr_value(attr) ==
|
77
|
+
#define GIT_ATTR_HAS_VALUE(attr) (git_attr_value(attr) == GIT_ATTR_VALUE_STRING)
|
78
78
|
|
79
79
|
/**
|
80
80
|
* Possible states for an attribute
|
81
81
|
*/
|
82
82
|
typedef enum {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}
|
83
|
+
GIT_ATTR_VALUE_UNSPECIFIED = 0, /**< The attribute has been left unspecified */
|
84
|
+
GIT_ATTR_VALUE_TRUE, /**< The attribute has been set */
|
85
|
+
GIT_ATTR_VALUE_FALSE, /**< The attribute has been unset */
|
86
|
+
GIT_ATTR_VALUE_STRING, /**< This attribute has a value */
|
87
|
+
} git_attr_value_t;
|
88
88
|
|
89
89
|
/**
|
90
90
|
* Return the value type for a given attribute.
|
@@ -99,7 +99,7 @@ typedef enum {
|
|
99
99
|
* @param attr The attribute
|
100
100
|
* @return the value type for the attribute
|
101
101
|
*/
|
102
|
-
GIT_EXTERN(
|
102
|
+
GIT_EXTERN(git_attr_value_t) git_attr_value(const char *attr);
|
103
103
|
|
104
104
|
/**
|
105
105
|
* Check attribute flags: Reading values from index and working directory.
|
@@ -119,13 +119,20 @@ GIT_EXTERN(git_attr_t) git_attr_value(const char *attr);
|
|
119
119
|
#define GIT_ATTR_CHECK_INDEX_ONLY 2
|
120
120
|
|
121
121
|
/**
|
122
|
-
* Check attribute flags:
|
122
|
+
* Check attribute flags: controlling extended attribute behavior.
|
123
123
|
*
|
124
124
|
* Normally, attribute checks include looking in the /etc (or system
|
125
125
|
* equivalent) directory for a `gitattributes` file. Passing this
|
126
126
|
* flag will cause attribute checks to ignore that file.
|
127
|
+
* equivalent) directory for a `gitattributes` file. Passing the
|
128
|
+
* `GIT_ATTR_CHECK_NO_SYSTEM` flag will cause attribute checks to
|
129
|
+
* ignore that file.
|
130
|
+
*
|
131
|
+
* Passing the `GIT_ATTR_CHECK_INCLUDE_HEAD` flag will use attributes
|
132
|
+
* from a `.gitattributes` file in the repository at the HEAD revision.
|
127
133
|
*/
|
128
|
-
#define GIT_ATTR_CHECK_NO_SYSTEM
|
134
|
+
#define GIT_ATTR_CHECK_NO_SYSTEM (1 << 2)
|
135
|
+
#define GIT_ATTR_CHECK_INCLUDE_HEAD (1 << 3)
|
129
136
|
|
130
137
|
/**
|
131
138
|
* Look up the value of one git attribute for path.
|
@@ -231,8 +238,11 @@ GIT_EXTERN(int) git_attr_foreach(
|
|
231
238
|
* disk no longer match the cached contents of memory. This will cause
|
232
239
|
* the attributes files to be reloaded the next time that an attribute
|
233
240
|
* access function is called.
|
241
|
+
*
|
242
|
+
* @param repo The repository containing the gitattributes cache
|
243
|
+
* @return 0 on success, or an error code
|
234
244
|
*/
|
235
|
-
GIT_EXTERN(
|
245
|
+
GIT_EXTERN(int) git_attr_cache_flush(
|
236
246
|
git_repository *repo);
|
237
247
|
|
238
248
|
/**
|
@@ -53,7 +53,7 @@ typedef enum {
|
|
53
53
|
* Blame options structure
|
54
54
|
*
|
55
55
|
* Initialize with `GIT_BLAME_OPTIONS_INIT`. Alternatively, you can
|
56
|
-
* use `
|
56
|
+
* use `git_blame_options_init`.
|
57
57
|
*
|
58
58
|
*/
|
59
59
|
typedef struct git_blame_options {
|
@@ -100,7 +100,7 @@ typedef struct git_blame_options {
|
|
100
100
|
* @param version The struct version; pass `GIT_BLAME_OPTIONS_VERSION`.
|
101
101
|
* @return Zero on success; -1 on failure.
|
102
102
|
*/
|
103
|
-
GIT_EXTERN(int)
|
103
|
+
GIT_EXTERN(int) git_blame_options_init(
|
104
104
|
git_blame_options *opts,
|
105
105
|
unsigned int version);
|
106
106
|
|
@@ -94,7 +94,40 @@ GIT_EXTERN(const void *) git_blob_rawcontent(const git_blob *blob);
|
|
94
94
|
* @param blob pointer to the blob
|
95
95
|
* @return size on bytes
|
96
96
|
*/
|
97
|
-
GIT_EXTERN(
|
97
|
+
GIT_EXTERN(git_object_size_t) git_blob_rawsize(const git_blob *blob);
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Flags to control the functionality of `git_blob_filter`.
|
101
|
+
*/
|
102
|
+
typedef enum {
|
103
|
+
/** When set, filters will not be applied to binary files. */
|
104
|
+
GIT_BLOB_FILTER_CHECK_FOR_BINARY = (1 << 0),
|
105
|
+
|
106
|
+
/**
|
107
|
+
* When set, filters will not load configuration from the
|
108
|
+
* system-wide `gitattributes` in `/etc` (or system equivalent).
|
109
|
+
*/
|
110
|
+
GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES = (1 << 1),
|
111
|
+
|
112
|
+
/**
|
113
|
+
* When set, filters will be loaded from a `.gitattributes` file
|
114
|
+
* in the HEAD commit.
|
115
|
+
*/
|
116
|
+
GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD = (1 << 2),
|
117
|
+
} git_blob_filter_flag_t;
|
118
|
+
|
119
|
+
/**
|
120
|
+
* The options used when applying filter options to a file.
|
121
|
+
*/
|
122
|
+
typedef struct {
|
123
|
+
int version;
|
124
|
+
|
125
|
+
/** Flags to control the filtering process, see `git_blob_filter_flag_t` above */
|
126
|
+
uint32_t flags;
|
127
|
+
} git_blob_filter_options;
|
128
|
+
|
129
|
+
#define GIT_BLOB_FILTER_OPTIONS_VERSION 1
|
130
|
+
#define GIT_BLOB_FILTER_OPTIONS_INIT {GIT_BLOB_FILTER_OPTIONS_VERSION, GIT_BLOB_FILTER_CHECK_FOR_BINARY}
|
98
131
|
|
99
132
|
/**
|
100
133
|
* Get a buffer with the filtered content of a blob.
|
@@ -115,15 +148,14 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
|
|
115
148
|
* @param out The git_buf to be filled in
|
116
149
|
* @param blob Pointer to the blob
|
117
150
|
* @param as_path Path used for file attribute lookups, etc.
|
118
|
-
* @param
|
119
|
-
* NUL bytes / looks like binary data before applying filters?
|
151
|
+
* @param opts Options to use for filtering the blob
|
120
152
|
* @return 0 on success or an error code
|
121
153
|
*/
|
122
|
-
GIT_EXTERN(int)
|
154
|
+
GIT_EXTERN(int) git_blob_filter(
|
123
155
|
git_buf *out,
|
124
156
|
git_blob *blob,
|
125
157
|
const char *as_path,
|
126
|
-
|
158
|
+
git_blob_filter_options *opts);
|
127
159
|
|
128
160
|
/**
|
129
161
|
* Read a file from the working folder of a repository
|
@@ -136,7 +168,7 @@ GIT_EXTERN(int) git_blob_filtered_content(
|
|
136
168
|
* relative to the repository's working dir
|
137
169
|
* @return 0 or an error code
|
138
170
|
*/
|
139
|
-
GIT_EXTERN(int)
|
171
|
+
GIT_EXTERN(int) git_blob_create_from_workdir(git_oid *id, git_repository *repo, const char *relative_path);
|
140
172
|
|
141
173
|
/**
|
142
174
|
* Read a file from the filesystem and write its content
|
@@ -148,7 +180,7 @@ GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, c
|
|
148
180
|
* @param path file from which the blob will be created
|
149
181
|
* @return 0 or an error code
|
150
182
|
*/
|
151
|
-
GIT_EXTERN(int)
|
183
|
+
GIT_EXTERN(int) git_blob_create_from_disk(git_oid *id, git_repository *repo, const char *path);
|
152
184
|
|
153
185
|
/**
|
154
186
|
* Create a stream to write a new blob into the object db
|
@@ -156,12 +188,12 @@ GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, cons
|
|
156
188
|
* This function may need to buffer the data on disk and will in
|
157
189
|
* general not be the right choice if you know the size of the data
|
158
190
|
* to write. If you have data in memory, use
|
159
|
-
* `
|
191
|
+
* `git_blob_create_from_buffer()`. If you do not, but know the size of
|
160
192
|
* the contents (and don't want/need to perform filtering), use
|
161
193
|
* `git_odb_open_wstream()`.
|
162
194
|
*
|
163
195
|
* Don't close this stream yourself but pass it to
|
164
|
-
* `
|
196
|
+
* `git_blob_create_from_stream_commit()` to commit the write to the
|
165
197
|
* object db and get the object id.
|
166
198
|
*
|
167
199
|
* If the `hintpath` parameter is filled, it will be used to determine
|
@@ -175,7 +207,7 @@ GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, cons
|
|
175
207
|
* to apply onto the content of the blob to be created.
|
176
208
|
* @return 0 or error code
|
177
209
|
*/
|
178
|
-
GIT_EXTERN(int)
|
210
|
+
GIT_EXTERN(int) git_blob_create_from_stream(
|
179
211
|
git_writestream **out,
|
180
212
|
git_repository *repo,
|
181
213
|
const char *hintpath);
|
@@ -189,7 +221,7 @@ GIT_EXTERN(int) git_blob_create_fromstream(
|
|
189
221
|
* @param stream the stream to close
|
190
222
|
* @return 0 or an error code
|
191
223
|
*/
|
192
|
-
GIT_EXTERN(int)
|
224
|
+
GIT_EXTERN(int) git_blob_create_from_stream_commit(
|
193
225
|
git_oid *out,
|
194
226
|
git_writestream *stream);
|
195
227
|
|
@@ -202,7 +234,7 @@ GIT_EXTERN(int) git_blob_create_fromstream_commit(
|
|
202
234
|
* @param len length of the data
|
203
235
|
* @return 0 or an error code
|
204
236
|
*/
|
205
|
-
GIT_EXTERN(int)
|
237
|
+
GIT_EXTERN(int) git_blob_create_from_buffer(
|
206
238
|
git_oid *id, git_repository *repo, const void *buffer, size_t len);
|
207
239
|
|
208
240
|
/**
|