rugged 1.7.2 → 1.9.0
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 +1 -0
- data/vendor/libgit2/CMakeLists.txt +23 -10
- data/vendor/libgit2/COPYING +195 -1
- data/vendor/libgit2/cmake/{FindIconv.cmake → FindIntlIconv.cmake} +6 -0
- data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +23 -8
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +17 -8
- data/vendor/libgit2/cmake/SelectHashes.cmake +28 -11
- data/vendor/libgit2/cmake/SelectRegex.cmake +6 -1
- data/vendor/libgit2/cmake/SelectSSH.cmake +22 -17
- data/vendor/libgit2/cmake/SelectZlib.cmake +4 -0
- data/vendor/libgit2/deps/llhttp/CMakeLists.txt +8 -0
- data/vendor/libgit2/deps/llhttp/LICENSE-MIT +22 -0
- data/vendor/libgit2/deps/llhttp/api.c +510 -0
- data/vendor/libgit2/deps/llhttp/http.c +170 -0
- data/vendor/libgit2/deps/llhttp/llhttp.c +10168 -0
- data/vendor/libgit2/deps/llhttp/llhttp.h +897 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +1 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_builtin_md4.c +311 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +21 -21
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +5 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/utf8.h +1176 -721
- data/vendor/libgit2/deps/ntlmclient/util.h +11 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +1 -0
- data/vendor/libgit2/deps/xdiff/xmerge.c +2 -2
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
- data/vendor/libgit2/deps/zlib/LICENSE +22 -0
- data/vendor/libgit2/deps/zlib/adler32.c +5 -27
- data/vendor/libgit2/deps/zlib/crc32.c +94 -167
- data/vendor/libgit2/deps/zlib/deflate.c +358 -435
- data/vendor/libgit2/deps/zlib/deflate.h +41 -10
- data/vendor/libgit2/deps/zlib/gzguts.h +13 -18
- data/vendor/libgit2/deps/zlib/infback.c +17 -30
- data/vendor/libgit2/deps/zlib/inffast.c +1 -4
- data/vendor/libgit2/deps/zlib/inffast.h +1 -1
- data/vendor/libgit2/deps/zlib/inflate.c +36 -102
- data/vendor/libgit2/deps/zlib/inftrees.c +6 -11
- data/vendor/libgit2/deps/zlib/inftrees.h +6 -6
- data/vendor/libgit2/deps/zlib/trees.c +287 -352
- data/vendor/libgit2/deps/zlib/zconf.h +23 -14
- data/vendor/libgit2/deps/zlib/zlib.h +202 -202
- data/vendor/libgit2/deps/zlib/zutil.c +18 -44
- data/vendor/libgit2/deps/zlib/zutil.h +13 -33
- data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
- data/vendor/libgit2/include/git2/apply.h +27 -6
- data/vendor/libgit2/include/git2/attr.h +17 -4
- data/vendor/libgit2/include/git2/blame.h +133 -28
- data/vendor/libgit2/include/git2/blob.h +71 -28
- data/vendor/libgit2/include/git2/branch.h +22 -15
- data/vendor/libgit2/include/git2/buffer.h +6 -4
- data/vendor/libgit2/include/git2/cert.h +2 -1
- data/vendor/libgit2/include/git2/checkout.h +83 -32
- data/vendor/libgit2/include/git2/cherrypick.h +10 -3
- data/vendor/libgit2/include/git2/clone.h +25 -9
- data/vendor/libgit2/include/git2/commit.h +132 -3
- data/vendor/libgit2/include/git2/common.h +120 -63
- data/vendor/libgit2/include/git2/config.h +93 -23
- data/vendor/libgit2/include/git2/credential.h +30 -2
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +133 -3
- data/vendor/libgit2/include/git2/describe.h +13 -1
- data/vendor/libgit2/include/git2/diff.h +38 -8
- data/vendor/libgit2/include/git2/email.h +9 -29
- data/vendor/libgit2/include/git2/errors.h +46 -73
- data/vendor/libgit2/include/git2/filter.h +14 -7
- data/vendor/libgit2/include/git2/global.h +8 -1
- data/vendor/libgit2/include/git2/graph.h +3 -2
- data/vendor/libgit2/include/git2/ignore.h +10 -0
- data/vendor/libgit2/include/git2/index.h +99 -14
- data/vendor/libgit2/include/git2/indexer.h +21 -4
- data/vendor/libgit2/include/git2/mailmap.h +7 -1
- data/vendor/libgit2/include/git2/merge.h +46 -1
- data/vendor/libgit2/include/git2/message.h +2 -2
- data/vendor/libgit2/include/git2/net.h +3 -1
- data/vendor/libgit2/include/git2/notes.h +9 -6
- data/vendor/libgit2/include/git2/object.h +9 -8
- data/vendor/libgit2/include/git2/odb.h +91 -49
- data/vendor/libgit2/include/git2/odb_backend.h +80 -52
- data/vendor/libgit2/include/git2/oid.h +23 -24
- data/vendor/libgit2/include/git2/oidarray.h +7 -1
- data/vendor/libgit2/include/git2/pack.h +13 -1
- data/vendor/libgit2/include/git2/patch.h +2 -3
- data/vendor/libgit2/include/git2/pathspec.h +9 -0
- data/vendor/libgit2/include/git2/proxy.h +10 -0
- data/vendor/libgit2/include/git2/rebase.h +9 -6
- data/vendor/libgit2/include/git2/refdb.h +2 -2
- data/vendor/libgit2/include/git2/reflog.h +3 -2
- data/vendor/libgit2/include/git2/refs.h +9 -6
- data/vendor/libgit2/include/git2/refspec.h +14 -4
- data/vendor/libgit2/include/git2/remote.h +94 -18
- data/vendor/libgit2/include/git2/repository.h +57 -21
- data/vendor/libgit2/include/git2/reset.h +16 -3
- data/vendor/libgit2/include/git2/revert.h +9 -4
- data/vendor/libgit2/include/git2/revparse.h +3 -3
- data/vendor/libgit2/include/git2/revwalk.h +3 -2
- data/vendor/libgit2/include/git2/signature.h +46 -1
- data/vendor/libgit2/include/git2/stash.h +17 -3
- data/vendor/libgit2/include/git2/status.h +10 -6
- data/vendor/libgit2/include/git2/stdint.h +87 -85
- data/vendor/libgit2/include/git2/strarray.h +2 -3
- data/vendor/libgit2/include/git2/submodule.h +20 -9
- data/vendor/libgit2/include/git2/sys/alloc.h +12 -0
- data/vendor/libgit2/include/git2/sys/commit.h +77 -3
- data/vendor/libgit2/include/git2/sys/commit_graph.h +103 -62
- data/vendor/libgit2/include/git2/sys/config.h +80 -4
- data/vendor/libgit2/include/git2/sys/credential.h +4 -3
- data/vendor/libgit2/include/git2/sys/diff.h +21 -1
- data/vendor/libgit2/include/git2/sys/email.h +7 -0
- data/vendor/libgit2/include/git2/sys/errors.h +76 -0
- data/vendor/libgit2/include/git2/sys/filter.h +66 -3
- data/vendor/libgit2/include/git2/sys/hashsig.h +11 -0
- data/vendor/libgit2/include/git2/sys/index.h +3 -2
- data/vendor/libgit2/include/git2/sys/mempack.h +32 -2
- data/vendor/libgit2/include/git2/sys/merge.h +55 -7
- data/vendor/libgit2/include/git2/sys/midx.h +43 -4
- data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -3
- data/vendor/libgit2/include/git2/sys/openssl.h +8 -1
- data/vendor/libgit2/include/git2/sys/path.h +12 -1
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -36
- data/vendor/libgit2/include/git2/sys/refs.h +3 -2
- data/vendor/libgit2/include/git2/sys/remote.h +8 -1
- data/vendor/libgit2/include/git2/sys/repository.h +63 -3
- data/vendor/libgit2/include/git2/sys/stream.h +11 -2
- data/vendor/libgit2/include/git2/sys/transport.h +24 -3
- data/vendor/libgit2/include/git2/tag.h +3 -1
- data/vendor/libgit2/include/git2/trace.h +9 -3
- data/vendor/libgit2/include/git2/transaction.h +3 -2
- data/vendor/libgit2/include/git2/transport.h +11 -3
- data/vendor/libgit2/include/git2/tree.h +16 -5
- data/vendor/libgit2/include/git2/types.h +19 -3
- data/vendor/libgit2/include/git2/version.h +44 -8
- data/vendor/libgit2/include/git2/worktree.h +16 -6
- data/vendor/libgit2/src/CMakeLists.txt +6 -4
- data/vendor/libgit2/src/cli/CMakeLists.txt +2 -2
- data/vendor/libgit2/src/cli/cmd.c +1 -1
- data/vendor/libgit2/src/cli/cmd.h +4 -0
- data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
- data/vendor/libgit2/src/cli/cmd_cat_file.c +6 -8
- data/vendor/libgit2/src/cli/cmd_clone.c +5 -7
- data/vendor/libgit2/src/cli/cmd_config.c +241 -0
- data/vendor/libgit2/src/cli/cmd_hash_object.c +6 -8
- data/vendor/libgit2/src/cli/cmd_help.c +6 -7
- data/vendor/libgit2/src/cli/cmd_index_pack.c +114 -0
- data/vendor/libgit2/src/cli/cmd_init.c +102 -0
- data/vendor/libgit2/src/cli/common.c +168 -0
- data/vendor/libgit2/src/cli/common.h +63 -0
- data/vendor/libgit2/src/cli/error.h +1 -1
- data/vendor/libgit2/src/cli/main.c +52 -24
- data/vendor/libgit2/src/cli/opt.c +29 -3
- data/vendor/libgit2/src/cli/opt.h +21 -3
- data/vendor/libgit2/src/cli/opt_usage.c +102 -33
- data/vendor/libgit2/src/cli/opt_usage.h +6 -1
- data/vendor/libgit2/src/cli/progress.c +51 -2
- data/vendor/libgit2/src/cli/progress.h +12 -0
- data/vendor/libgit2/src/cli/unix/sighandler.c +2 -1
- data/vendor/libgit2/src/cli/win32/precompiled.h +1 -1
- data/vendor/libgit2/src/cli/win32/sighandler.c +1 -1
- data/vendor/libgit2/src/libgit2/CMakeLists.txt +26 -8
- data/vendor/libgit2/src/libgit2/apply.c +10 -13
- data/vendor/libgit2/src/libgit2/attr.c +30 -13
- data/vendor/libgit2/src/libgit2/attr_file.c +7 -2
- data/vendor/libgit2/src/libgit2/attr_file.h +2 -0
- data/vendor/libgit2/src/libgit2/attrcache.c +69 -33
- data/vendor/libgit2/src/libgit2/attrcache.h +5 -9
- data/vendor/libgit2/src/libgit2/blame.c +130 -44
- data/vendor/libgit2/src/libgit2/blame.h +1 -0
- data/vendor/libgit2/src/libgit2/cache.c +22 -17
- data/vendor/libgit2/src/libgit2/cache.h +7 -9
- data/vendor/libgit2/src/libgit2/checkout.c +34 -24
- data/vendor/libgit2/src/libgit2/checkout.h +0 -2
- data/vendor/libgit2/src/libgit2/cherrypick.c +1 -2
- data/vendor/libgit2/src/libgit2/clone.c +186 -166
- data/vendor/libgit2/src/libgit2/clone.h +4 -1
- data/vendor/libgit2/src/libgit2/commit.c +92 -0
- data/vendor/libgit2/src/libgit2/commit_graph.c +67 -56
- data/vendor/libgit2/src/libgit2/commit_graph.h +1 -2
- data/vendor/libgit2/src/libgit2/config.c +389 -298
- data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
- data/vendor/libgit2/src/libgit2/config.h +9 -4
- data/vendor/libgit2/src/libgit2/config_backend.h +8 -10
- data/vendor/libgit2/src/libgit2/config_cache.c +4 -5
- data/vendor/libgit2/src/libgit2/config_file.c +99 -88
- data/vendor/libgit2/src/libgit2/config_list.c +285 -0
- data/vendor/libgit2/src/libgit2/config_list.h +32 -0
- data/vendor/libgit2/src/libgit2/config_mem.c +194 -40
- data/vendor/libgit2/src/libgit2/config_parse.c +10 -9
- data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
- data/vendor/libgit2/src/libgit2/describe.c +24 -24
- data/vendor/libgit2/src/libgit2/diff.c +1 -1
- data/vendor/libgit2/src/libgit2/diff_driver.c +12 -19
- data/vendor/libgit2/src/libgit2/diff_driver.h +2 -2
- data/vendor/libgit2/src/libgit2/diff_generate.c +3 -3
- data/vendor/libgit2/src/libgit2/diff_parse.c +2 -2
- data/vendor/libgit2/src/libgit2/diff_print.c +65 -9
- data/vendor/libgit2/src/libgit2/diff_tform.c +36 -8
- data/vendor/libgit2/src/libgit2/email.c +1 -0
- data/vendor/libgit2/src/libgit2/fetch.c +5 -3
- data/vendor/libgit2/src/libgit2/filter.c +5 -5
- data/vendor/libgit2/src/libgit2/git2.rc +3 -3
- data/vendor/libgit2/src/libgit2/grafts.c +18 -20
- data/vendor/libgit2/src/libgit2/grafts.h +0 -1
- data/vendor/libgit2/src/libgit2/graph.c +1 -1
- data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
- data/vendor/libgit2/src/libgit2/ignore.c +9 -5
- data/vendor/libgit2/src/libgit2/index.c +68 -90
- data/vendor/libgit2/src/libgit2/index.h +2 -2
- data/vendor/libgit2/src/libgit2/index_map.c +95 -0
- data/vendor/libgit2/src/libgit2/index_map.h +28 -0
- data/vendor/libgit2/src/libgit2/indexer.c +34 -38
- data/vendor/libgit2/src/libgit2/iterator.c +14 -8
- data/vendor/libgit2/src/libgit2/libgit2.c +153 -368
- data/vendor/libgit2/src/libgit2/mailmap.c +1 -1
- data/vendor/libgit2/src/libgit2/merge.c +42 -37
- data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
- data/vendor/libgit2/src/libgit2/midx.c +28 -15
- data/vendor/libgit2/src/libgit2/mwindow.c +38 -45
- data/vendor/libgit2/src/libgit2/mwindow.h +4 -0
- data/vendor/libgit2/src/libgit2/object.c +6 -5
- data/vendor/libgit2/src/libgit2/odb.c +5 -4
- data/vendor/libgit2/src/libgit2/odb_mempack.c +49 -17
- data/vendor/libgit2/src/libgit2/odb_pack.c +13 -5
- data/vendor/libgit2/src/libgit2/oid.c +32 -5
- data/vendor/libgit2/src/libgit2/oid.h +11 -0
- data/vendor/libgit2/src/libgit2/pack-objects.c +58 -31
- data/vendor/libgit2/src/libgit2/pack-objects.h +12 -4
- data/vendor/libgit2/src/libgit2/pack.c +30 -24
- data/vendor/libgit2/src/libgit2/pack.h +15 -10
- data/vendor/libgit2/src/libgit2/patch_parse.c +2 -2
- data/vendor/libgit2/src/libgit2/path.c +1 -1
- data/vendor/libgit2/src/libgit2/pathspec.c +1 -1
- data/vendor/libgit2/src/libgit2/push.c +79 -28
- data/vendor/libgit2/src/libgit2/push.h +1 -0
- data/vendor/libgit2/src/libgit2/refdb_fs.c +128 -61
- data/vendor/libgit2/src/libgit2/reflog.c +1 -2
- data/vendor/libgit2/src/libgit2/reflog.h +2 -0
- data/vendor/libgit2/src/libgit2/refs.c +26 -7
- data/vendor/libgit2/src/libgit2/refs.h +6 -1
- data/vendor/libgit2/src/libgit2/refspec.c +28 -1
- data/vendor/libgit2/src/libgit2/refspec.h +8 -0
- data/vendor/libgit2/src/libgit2/remote.c +121 -61
- data/vendor/libgit2/src/libgit2/repository.c +231 -51
- data/vendor/libgit2/src/libgit2/repository.h +10 -6
- data/vendor/libgit2/src/libgit2/revert.c +1 -2
- data/vendor/libgit2/src/libgit2/revparse.c +2 -2
- data/vendor/libgit2/src/libgit2/revwalk.c +13 -10
- data/vendor/libgit2/src/libgit2/revwalk.h +3 -3
- data/vendor/libgit2/src/libgit2/settings.c +468 -0
- data/vendor/libgit2/src/libgit2/settings.h +6 -2
- data/vendor/libgit2/src/libgit2/signature.c +132 -15
- data/vendor/libgit2/src/libgit2/signature.h +0 -1
- data/vendor/libgit2/src/libgit2/status.c +1 -1
- data/vendor/libgit2/src/libgit2/streams/mbedtls.c +54 -60
- data/vendor/libgit2/src/libgit2/streams/openssl.c +32 -7
- data/vendor/libgit2/src/libgit2/streams/openssl.h +2 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.c +4 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.h +3 -0
- data/vendor/libgit2/src/libgit2/streams/stransport.c +39 -7
- data/vendor/libgit2/src/libgit2/submodule.c +106 -63
- data/vendor/libgit2/src/libgit2/submodule.h +6 -7
- data/vendor/libgit2/src/libgit2/tag.c +1 -1
- data/vendor/libgit2/src/libgit2/trailer.c +6 -6
- data/vendor/libgit2/src/libgit2/transaction.c +26 -20
- data/vendor/libgit2/src/libgit2/transaction.h +4 -1
- data/vendor/libgit2/src/libgit2/transport.c +4 -1
- data/vendor/libgit2/src/libgit2/transports/credential.c +1 -1
- data/vendor/libgit2/src/libgit2/transports/http.c +1 -2
- data/vendor/libgit2/src/libgit2/transports/http.h +0 -10
- data/vendor/libgit2/src/libgit2/transports/httpclient.c +112 -72
- data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
- data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
- data/vendor/libgit2/src/libgit2/transports/local.c +8 -7
- data/vendor/libgit2/src/libgit2/transports/smart.c +20 -8
- data/vendor/libgit2/src/libgit2/transports/smart.h +4 -2
- data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +2 -2
- data/vendor/libgit2/src/libgit2/transports/smart_protocol.c +55 -10
- data/vendor/libgit2/src/libgit2/transports/ssh.c +41 -1103
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +347 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +1126 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
- data/vendor/libgit2/src/libgit2/transports/winhttp.c +35 -7
- data/vendor/libgit2/src/libgit2/tree.c +34 -26
- data/vendor/libgit2/src/libgit2/tree.h +3 -2
- data/vendor/libgit2/src/libgit2/worktree.c +14 -17
- data/vendor/libgit2/src/util/CMakeLists.txt +4 -6
- data/vendor/libgit2/src/util/alloc.c +4 -1
- data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
- data/vendor/libgit2/src/{cli/cli.h → util/allocators/debugalloc.h} +6 -9
- data/vendor/libgit2/src/util/allocators/stdalloc.c +0 -10
- data/vendor/libgit2/src/util/array.h +18 -17
- data/vendor/libgit2/src/util/cc-compat.h +2 -0
- data/vendor/libgit2/src/util/ctype_compat.h +70 -0
- data/vendor/libgit2/src/util/date.c +22 -14
- data/vendor/libgit2/src/util/date.h +12 -0
- data/vendor/libgit2/src/util/errors.c +401 -0
- data/vendor/libgit2/src/{libgit2 → util}/errors.h +21 -17
- data/vendor/libgit2/src/util/fs_path.c +15 -4
- data/vendor/libgit2/src/util/fs_path.h +23 -0
- data/vendor/libgit2/src/util/futils.c +6 -5
- data/vendor/libgit2/src/util/futils.h +13 -4
- data/vendor/libgit2/src/util/git2_features.h.in +12 -1
- data/vendor/libgit2/src/util/git2_util.h +6 -0
- data/vendor/libgit2/src/util/hash/openssl.c +152 -0
- data/vendor/libgit2/src/util/hash/openssl.h +17 -1
- data/vendor/libgit2/src/util/hash/sha.h +4 -1
- data/vendor/libgit2/src/util/hashmap.h +424 -0
- data/vendor/libgit2/src/util/hashmap_str.h +43 -0
- data/vendor/libgit2/src/util/integer.h +3 -1
- data/vendor/libgit2/src/util/net.c +13 -7
- data/vendor/libgit2/src/util/net.h +2 -0
- data/vendor/libgit2/src/util/pool.c +1 -1
- data/vendor/libgit2/src/util/pool.h +5 -0
- data/vendor/libgit2/src/util/pqueue.h +1 -1
- data/vendor/libgit2/src/util/process.h +222 -0
- data/vendor/libgit2/src/util/rand.c +1 -7
- data/vendor/libgit2/src/util/regexp.c +1 -1
- data/vendor/libgit2/src/util/sortedcache.c +14 -13
- data/vendor/libgit2/src/util/sortedcache.h +3 -3
- data/vendor/libgit2/src/util/str.c +2 -2
- data/vendor/libgit2/src/util/strlist.c +108 -0
- data/vendor/libgit2/src/util/strlist.h +36 -0
- data/vendor/libgit2/src/util/unix/posix.h +0 -2
- data/vendor/libgit2/src/util/unix/process.c +629 -0
- data/vendor/libgit2/src/util/unix/realpath.c +23 -5
- data/vendor/libgit2/src/util/util.c +2 -2
- data/vendor/libgit2/src/util/util.h +4 -38
- data/vendor/libgit2/src/util/vector.c +3 -3
- data/vendor/libgit2/src/util/vector.h +2 -2
- data/vendor/libgit2/src/util/win32/posix_w32.c +29 -6
- data/vendor/libgit2/src/util/win32/process.c +506 -0
- metadata +45 -28
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -6
- data/vendor/libgit2/deps/http-parser/COPYING +0 -23
- data/vendor/libgit2/deps/http-parser/http_parser.c +0 -2182
- data/vendor/libgit2/deps/http-parser/http_parser.h +0 -305
- data/vendor/libgit2/deps/zlib/COPYING +0 -27
- data/vendor/libgit2/include/git2/sys/reflog.h +0 -21
- data/vendor/libgit2/src/libgit2/config_entries.c +0 -237
- data/vendor/libgit2/src/libgit2/config_entries.h +0 -24
- data/vendor/libgit2/src/libgit2/errors.c +0 -293
- data/vendor/libgit2/src/libgit2/idxmap.c +0 -157
- data/vendor/libgit2/src/libgit2/idxmap.h +0 -177
- data/vendor/libgit2/src/libgit2/libgit2.h +0 -15
- data/vendor/libgit2/src/libgit2/offmap.c +0 -101
- data/vendor/libgit2/src/libgit2/offmap.h +0 -133
- data/vendor/libgit2/src/libgit2/oidmap.c +0 -107
- data/vendor/libgit2/src/libgit2/oidmap.h +0 -128
- data/vendor/libgit2/src/libgit2/threadstate.c +0 -97
- data/vendor/libgit2/src/libgit2/threadstate.h +0 -22
- data/vendor/libgit2/src/libgit2/transports/ssh.h +0 -14
- data/vendor/libgit2/src/util/khash.h +0 -615
- data/vendor/libgit2/src/util/strmap.c +0 -100
- data/vendor/libgit2/src/util/strmap.h +0 -131
- /data/vendor/libgit2/cmake/{FindHTTPParser.cmake → FindHTTP_Parser.cmake} +0 -0
@@ -4,13 +4,23 @@
|
|
4
4
|
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef INCLUDE_git_indexer_h__
|
8
|
+
#define INCLUDE_git_indexer_h__
|
9
9
|
|
10
10
|
#include "common.h"
|
11
11
|
#include "types.h"
|
12
12
|
#include "oid.h"
|
13
13
|
|
14
|
+
/**
|
15
|
+
* @file git2/indexer.h
|
16
|
+
* @brief Packfile indexing
|
17
|
+
* @ingroup Git
|
18
|
+
* @{
|
19
|
+
*
|
20
|
+
* Indexing is the operation of taking a packfile - which is simply a
|
21
|
+
* collection of unordered commits - and producing an "index" so that
|
22
|
+
* one can lookup a commit in the packfile by object ID.
|
23
|
+
*/
|
14
24
|
GIT_BEGIN_DECL
|
15
25
|
|
16
26
|
/** A git indexer object */
|
@@ -53,6 +63,7 @@ typedef struct git_indexer_progress {
|
|
53
63
|
*
|
54
64
|
* @param stats Structure containing information about the state of the transfer
|
55
65
|
* @param payload Payload provided by caller
|
66
|
+
* @return 0 on success or an error code
|
56
67
|
*/
|
57
68
|
typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *stats, void *payload);
|
58
69
|
|
@@ -66,6 +77,9 @@ typedef struct git_indexer_options {
|
|
66
77
|
/** permissions to use creating packfile or 0 for defaults */
|
67
78
|
unsigned int mode;
|
68
79
|
|
80
|
+
/** the type of object ids in the packfile or 0 for SHA1 */
|
81
|
+
git_oid_t oid_type;
|
82
|
+
|
69
83
|
/**
|
70
84
|
* object database from which to read base objects when
|
71
85
|
* fixing thin packs. This can be NULL if there are no thin
|
@@ -85,7 +99,10 @@ typedef struct git_indexer_options {
|
|
85
99
|
unsigned char verify;
|
86
100
|
} git_indexer_options;
|
87
101
|
|
102
|
+
/** Current version for the `git_indexer_options` structure */
|
88
103
|
#define GIT_INDEXER_OPTIONS_VERSION 1
|
104
|
+
|
105
|
+
/** Static constructor for `git_indexer_options` */
|
89
106
|
#define GIT_INDEXER_OPTIONS_INIT { GIT_INDEXER_OPTIONS_VERSION }
|
90
107
|
|
91
108
|
/**
|
@@ -106,13 +123,12 @@ GIT_EXTERN(int) git_indexer_options_init(
|
|
106
123
|
*
|
107
124
|
* @param out where to store the indexer instance
|
108
125
|
* @param path to the directory where the packfile should be stored
|
109
|
-
* @param
|
126
|
+
* @param opts the options to create the indexer with
|
110
127
|
* @return 0 or an error code.
|
111
128
|
*/
|
112
129
|
GIT_EXTERN(int) git_indexer_new(
|
113
130
|
git_indexer **out,
|
114
131
|
const char *path,
|
115
|
-
git_oid_t oid_type,
|
116
132
|
git_indexer_options *opts);
|
117
133
|
#else
|
118
134
|
/**
|
@@ -190,6 +206,7 @@ GIT_EXTERN(const char *) git_indexer_name(const git_indexer *idx);
|
|
190
206
|
*/
|
191
207
|
GIT_EXTERN(void) git_indexer_free(git_indexer *idx);
|
192
208
|
|
209
|
+
/** @} */
|
193
210
|
GIT_END_DECL
|
194
211
|
|
195
212
|
#endif
|
@@ -13,10 +13,15 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/mailmap.h
|
16
|
-
* @brief
|
16
|
+
* @brief Mailmaps provide alternate email addresses for users
|
17
17
|
* @defgroup git_mailmap Git mailmap routines
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
|
+
*
|
21
|
+
* A mailmap can be used to specify alternate email addresses for
|
22
|
+
* repository committers or authors. This allows systems to map
|
23
|
+
* commits made using different email addresses to the same logical
|
24
|
+
* person.
|
20
25
|
*/
|
21
26
|
GIT_BEGIN_DECL
|
22
27
|
|
@@ -112,4 +117,5 @@ GIT_EXTERN(int) git_mailmap_resolve_signature(
|
|
112
117
|
|
113
118
|
/** @} */
|
114
119
|
GIT_END_DECL
|
120
|
+
|
115
121
|
#endif
|
@@ -17,9 +17,12 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @file git2/merge.h
|
20
|
-
* @brief
|
20
|
+
* @brief Merge re-joins diverging branches of history
|
21
21
|
* @defgroup git_merge Git merge routines
|
22
22
|
* @ingroup Git
|
23
|
+
*
|
24
|
+
* Merge will take two commits and attempt to produce a commit that
|
25
|
+
* includes the changes that were made in both branches.
|
23
26
|
* @{
|
24
27
|
*/
|
25
28
|
GIT_BEGIN_DECL
|
@@ -45,7 +48,10 @@ typedef struct {
|
|
45
48
|
unsigned int mode;
|
46
49
|
} git_merge_file_input;
|
47
50
|
|
51
|
+
/** Current version for the `git_merge_file_input_options` structure */
|
48
52
|
#define GIT_MERGE_FILE_INPUT_VERSION 1
|
53
|
+
|
54
|
+
/** Static constructor for `git_merge_file_input_options` */
|
49
55
|
#define GIT_MERGE_FILE_INPUT_INIT {GIT_MERGE_FILE_INPUT_VERSION}
|
50
56
|
|
51
57
|
/**
|
@@ -180,6 +186,7 @@ typedef enum {
|
|
180
186
|
GIT_MERGE_FILE_ACCEPT_CONFLICTS = (1 << 9)
|
181
187
|
} git_merge_file_flag_t;
|
182
188
|
|
189
|
+
/** Default size for conflict markers */
|
183
190
|
#define GIT_MERGE_CONFLICT_MARKER_SIZE 7
|
184
191
|
|
185
192
|
/**
|
@@ -217,7 +224,10 @@ typedef struct {
|
|
217
224
|
unsigned short marker_size;
|
218
225
|
} git_merge_file_options;
|
219
226
|
|
227
|
+
/** Current version for the `git_merge_file_options` structure */
|
220
228
|
#define GIT_MERGE_FILE_OPTIONS_VERSION 1
|
229
|
+
|
230
|
+
/** Static constructor for `git_merge_file_options` */
|
221
231
|
#define GIT_MERGE_FILE_OPTIONS_INIT {GIT_MERGE_FILE_OPTIONS_VERSION}
|
222
232
|
|
223
233
|
/**
|
@@ -312,7 +322,10 @@ typedef struct {
|
|
312
322
|
uint32_t file_flags;
|
313
323
|
} git_merge_options;
|
314
324
|
|
325
|
+
/** Current version for the `git_merge_options` structure */
|
315
326
|
#define GIT_MERGE_OPTIONS_VERSION 1
|
327
|
+
|
328
|
+
/** Static constructor for `git_merge_options` */
|
316
329
|
#define GIT_MERGE_OPTIONS_INIT { \
|
317
330
|
GIT_MERGE_OPTIONS_VERSION, GIT_MERGE_FIND_RENAMES }
|
318
331
|
|
@@ -471,6 +484,37 @@ GIT_EXTERN(int) git_merge_base_many(
|
|
471
484
|
/**
|
472
485
|
* Find all merge bases given a list of commits
|
473
486
|
*
|
487
|
+
* This behaves similar to [`git merge-base`](https://git-scm.com/docs/git-merge-base#_discussion).
|
488
|
+
*
|
489
|
+
* Given three commits `a`, `b`, and `c`, `merge_base_many`
|
490
|
+
* will compute a hypothetical commit `m`, which is a merge between `b`
|
491
|
+
* and `c`.
|
492
|
+
|
493
|
+
* For example, with the following topology:
|
494
|
+
* ```text
|
495
|
+
* o---o---o---o---C
|
496
|
+
* /
|
497
|
+
* / o---o---o---B
|
498
|
+
* / /
|
499
|
+
* ---2---1---o---o---o---A
|
500
|
+
* ```
|
501
|
+
*
|
502
|
+
* the result of `merge_base_many` given `a`, `b`, and `c` is 1. This is
|
503
|
+
* because the equivalent topology with the imaginary merge commit `m`
|
504
|
+
* between `b` and `c` is:
|
505
|
+
* ```text
|
506
|
+
* o---o---o---o---o
|
507
|
+
* / \
|
508
|
+
* / o---o---o---o---M
|
509
|
+
* / /
|
510
|
+
* ---2---1---o---o---o---A
|
511
|
+
* ```
|
512
|
+
*
|
513
|
+
* and the result of `merge_base_many` given `a` and `m` is 1.
|
514
|
+
*
|
515
|
+
* If you're looking to recieve the common ancestor between all the
|
516
|
+
* given commits, use `merge_base_octopus`.
|
517
|
+
*
|
474
518
|
* @param out array in which to store the resulting ids
|
475
519
|
* @param repo the repository where the commits exist
|
476
520
|
* @param length The number of commits in the provided `input_array`
|
@@ -623,4 +667,5 @@ GIT_EXTERN(int) git_merge(
|
|
623
667
|
|
624
668
|
/** @} */
|
625
669
|
GIT_END_DECL
|
670
|
+
|
626
671
|
#endif
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @file git2/message.h
|
15
|
-
* @brief
|
15
|
+
* @brief Commit messages
|
16
16
|
* @ingroup Git
|
17
17
|
* @{
|
18
18
|
*/
|
@@ -83,4 +83,4 @@ GIT_EXTERN(void) git_message_trailer_array_free(git_message_trailer_array *arr);
|
|
83
83
|
/** @} */
|
84
84
|
GIT_END_DECL
|
85
85
|
|
86
|
-
#endif
|
86
|
+
#endif
|
@@ -13,12 +13,13 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/net.h
|
16
|
-
* @brief
|
16
|
+
* @brief Low-level networking functionality
|
17
17
|
* @ingroup Git
|
18
18
|
* @{
|
19
19
|
*/
|
20
20
|
GIT_BEGIN_DECL
|
21
21
|
|
22
|
+
/** Default git protocol port number */
|
22
23
|
#define GIT_DEFAULT_PORT "9418"
|
23
24
|
|
24
25
|
/**
|
@@ -51,4 +52,5 @@ struct git_remote_head {
|
|
51
52
|
|
52
53
|
/** @} */
|
53
54
|
GIT_END_DECL
|
55
|
+
|
54
56
|
#endif
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* @file git2/notes.h
|
14
|
-
* @brief
|
14
|
+
* @brief Notes are metadata attached to an object
|
15
15
|
* @defgroup git_note Git notes management routines
|
16
16
|
* @ingroup Git
|
17
17
|
* @{
|
@@ -21,13 +21,15 @@ GIT_BEGIN_DECL
|
|
21
21
|
/**
|
22
22
|
* Callback for git_note_foreach.
|
23
23
|
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
* -
|
27
|
-
*
|
24
|
+
* @param blob_id object id of the blob containing the message
|
25
|
+
* @param annotated_object_id the id of the object being annotated
|
26
|
+
* @param payload user-specified data to the foreach function
|
27
|
+
* @return 0 on success, or a negative number on failure
|
28
28
|
*/
|
29
29
|
typedef int GIT_CALLBACK(git_note_foreach_cb)(
|
30
|
-
const git_oid *blob_id,
|
30
|
+
const git_oid *blob_id,
|
31
|
+
const git_oid *annotated_object_id,
|
32
|
+
void *payload);
|
31
33
|
|
32
34
|
/**
|
33
35
|
* note iterator
|
@@ -303,4 +305,5 @@ GIT_EXTERN(int) git_note_foreach(
|
|
303
305
|
|
304
306
|
/** @} */
|
305
307
|
GIT_END_DECL
|
308
|
+
|
306
309
|
#endif
|
@@ -14,13 +14,14 @@
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* @file git2/object.h
|
17
|
-
* @brief
|
17
|
+
* @brief Objects are blobs (files), trees (directories), commits, and annotated tags
|
18
18
|
* @defgroup git_object Git revision object management routines
|
19
19
|
* @ingroup Git
|
20
20
|
* @{
|
21
21
|
*/
|
22
22
|
GIT_BEGIN_DECL
|
23
23
|
|
24
|
+
/** Maximum size of a git object */
|
24
25
|
#define GIT_OBJECT_SIZE_MAX UINT64_MAX
|
25
26
|
|
26
27
|
/**
|
@@ -53,18 +54,18 @@ GIT_EXTERN(int) git_object_lookup(
|
|
53
54
|
*
|
54
55
|
* The object obtained will be so that its identifier
|
55
56
|
* matches the first 'len' hexadecimal characters
|
56
|
-
* (packets of 4 bits) of the given
|
57
|
-
*
|
58
|
-
*
|
59
|
-
* the
|
57
|
+
* (packets of 4 bits) of the given `id`. `len` must be
|
58
|
+
* at least `GIT_OID_MINPREFIXLEN`, and long enough to
|
59
|
+
* identify a unique object matching the prefix; otherwise
|
60
|
+
* the method will fail.
|
60
61
|
*
|
61
62
|
* The generated reference is owned by the repository and
|
62
63
|
* should be closed with the `git_object_free` method
|
63
64
|
* instead of free'd manually.
|
64
65
|
*
|
65
|
-
* The
|
66
|
+
* The `type` parameter must match the type of the object
|
66
67
|
* in the odb; the method will fail otherwise.
|
67
|
-
* The special value
|
68
|
+
* The special value `GIT_OBJECT_ANY` may be passed to let
|
68
69
|
* the method guess the object's type.
|
69
70
|
*
|
70
71
|
* @param object_out pointer where to store the looked-up object
|
@@ -260,7 +261,7 @@ GIT_EXTERN(int) git_object_rawcontent_is_valid(
|
|
260
261
|
* @warning This function is experimental and its signature may change in
|
261
262
|
* the future.
|
262
263
|
*
|
263
|
-
* @param valid Output pointer to set with validity of the object content
|
264
|
+
* @param[out] valid Output pointer to set with validity of the object content
|
264
265
|
* @param buf The contents to validate
|
265
266
|
* @param len The length of the buffer
|
266
267
|
* @param object_type The type of the object in the buffer
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
/**
|
17
17
|
* @file git2/odb.h
|
18
|
-
* @brief
|
18
|
+
* @brief An object database manages the storage of git objects
|
19
19
|
* @defgroup git_odb Git object database routines
|
20
20
|
* @ingroup Git
|
21
21
|
* @{
|
@@ -35,6 +35,10 @@ typedef enum {
|
|
35
35
|
|
36
36
|
/**
|
37
37
|
* Function type for callbacks from git_odb_foreach.
|
38
|
+
*
|
39
|
+
* @param id an id of an object in the object database
|
40
|
+
* @param payload the payload from the initial call to git_odb_foreach
|
41
|
+
* @return 0 on success, or an error code
|
38
42
|
*/
|
39
43
|
typedef int GIT_CALLBACK(git_odb_foreach_cb)(const git_oid *id, void *payload);
|
40
44
|
|
@@ -49,30 +53,53 @@ typedef struct {
|
|
49
53
|
git_oid_t oid_type;
|
50
54
|
} git_odb_options;
|
51
55
|
|
52
|
-
|
56
|
+
/** The current version of the diff options structure */
|
53
57
|
#define GIT_ODB_OPTIONS_VERSION 1
|
54
58
|
|
55
|
-
|
59
|
+
/**
|
60
|
+
* Stack initializer for odb options. Alternatively use
|
56
61
|
* `git_odb_options_init` programmatic initialization.
|
57
62
|
*/
|
58
63
|
#define GIT_ODB_OPTIONS_INIT { GIT_ODB_OPTIONS_VERSION }
|
59
64
|
|
65
|
+
#ifdef GIT_EXPERIMENTAL_SHA256
|
66
|
+
|
60
67
|
/**
|
61
68
|
* Create a new object database with no backends.
|
62
69
|
*
|
63
|
-
*
|
64
|
-
*
|
70
|
+
* @param[out] odb location to store the database pointer, if opened.
|
71
|
+
* @param opts the options for this object database or NULL for defaults
|
72
|
+
* @return 0 or an error code
|
73
|
+
*/
|
74
|
+
GIT_EXTERN(int) git_odb_new(git_odb **odb, const git_odb_options *opts);
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Create a new object database and automatically add loose and packed
|
78
|
+
* backends.
|
65
79
|
*
|
66
|
-
* @param
|
80
|
+
* @param[out] odb_out location to store the database pointer, if opened.
|
67
81
|
* Set to NULL if the open failed.
|
82
|
+
* @param objects_dir path of the backends' "objects" directory.
|
68
83
|
* @param opts the options for this object database or NULL for defaults
|
69
84
|
* @return 0 or an error code
|
70
85
|
*/
|
71
|
-
|
72
|
-
|
86
|
+
GIT_EXTERN(int) git_odb_open(
|
87
|
+
git_odb **odb_out,
|
88
|
+
const char *objects_dir,
|
89
|
+
const git_odb_options *opts);
|
90
|
+
|
73
91
|
#else
|
74
|
-
|
75
|
-
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Create a new object database with no backends.
|
95
|
+
*
|
96
|
+
* Before the ODB can be used for read/writing, a custom database
|
97
|
+
* backend must be manually added using `git_odb_add_backend()`
|
98
|
+
*
|
99
|
+
* @param[out] odb location to store the database pointer, if opened.
|
100
|
+
* @return 0 or an error code
|
101
|
+
*/
|
102
|
+
GIT_EXTERN(int) git_odb_new(git_odb **odb);
|
76
103
|
|
77
104
|
/**
|
78
105
|
* Create a new object database and automatically add
|
@@ -85,19 +112,12 @@ GIT_EXTERN(int) git_odb_new(git_odb **out);
|
|
85
112
|
* assuming `objects_dir` as the Objects folder which
|
86
113
|
* contains a 'pack/' folder with the corresponding data
|
87
114
|
*
|
88
|
-
* @param
|
115
|
+
* @param[out] odb_out location to store the database pointer, if opened.
|
89
116
|
* Set to NULL if the open failed.
|
90
117
|
* @param objects_dir path of the backends' "objects" directory.
|
91
|
-
* @param opts the options for this object database or NULL for defaults
|
92
118
|
* @return 0 or an error code
|
93
119
|
*/
|
94
|
-
|
95
|
-
GIT_EXTERN(int) git_odb_open(
|
96
|
-
git_odb **out,
|
97
|
-
const char *objects_dir,
|
98
|
-
const git_odb_options *opts);
|
99
|
-
#else
|
100
|
-
GIT_EXTERN(int) git_odb_open(git_odb **out, const char *objects_dir);
|
120
|
+
GIT_EXTERN(int) git_odb_open(git_odb **odb_out, const char *objects_dir);
|
101
121
|
#endif
|
102
122
|
|
103
123
|
/**
|
@@ -134,13 +154,13 @@ GIT_EXTERN(void) git_odb_free(git_odb *db);
|
|
134
154
|
* internally cached, so it should be closed
|
135
155
|
* by the user once it's no longer in use.
|
136
156
|
*
|
137
|
-
* @param
|
157
|
+
* @param[out] obj pointer where to store the read object
|
138
158
|
* @param db database to search for the object in.
|
139
159
|
* @param id identity of the object to read.
|
140
160
|
* @return 0 if the object was read, GIT_ENOTFOUND if the object is
|
141
161
|
* not in the database.
|
142
162
|
*/
|
143
|
-
GIT_EXTERN(int) git_odb_read(git_odb_object **
|
163
|
+
GIT_EXTERN(int) git_odb_read(git_odb_object **obj, git_odb *db, const git_oid *id);
|
144
164
|
|
145
165
|
/**
|
146
166
|
* Read an object from the database, given a prefix
|
@@ -160,7 +180,7 @@ GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *i
|
|
160
180
|
* internally cached, so it should be closed
|
161
181
|
* by the user once it's no longer in use.
|
162
182
|
*
|
163
|
-
* @param
|
183
|
+
* @param[out] obj pointer where to store the read object
|
164
184
|
* @param db database to search for the object in.
|
165
185
|
* @param short_id a prefix of the id of the object to read.
|
166
186
|
* @param len the length of the prefix
|
@@ -168,7 +188,7 @@ GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *i
|
|
168
188
|
* database. GIT_EAMBIGUOUS if the prefix is ambiguous
|
169
189
|
* (several objects match the prefix)
|
170
190
|
*/
|
171
|
-
GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **
|
191
|
+
GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **obj, git_odb *db, const git_oid *short_id, size_t len);
|
172
192
|
|
173
193
|
/**
|
174
194
|
* Read the header of an object from the database, without
|
@@ -180,8 +200,8 @@ GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git
|
|
180
200
|
* of an object, so the whole object will be read and then the
|
181
201
|
* header will be returned.
|
182
202
|
*
|
183
|
-
* @param len_out pointer where to store the length
|
184
|
-
* @param type_out pointer where to store the type
|
203
|
+
* @param[out] len_out pointer where to store the length
|
204
|
+
* @param[out] type_out pointer where to store the type
|
185
205
|
* @param db database to search for the object in.
|
186
206
|
* @param id identity of the object to read.
|
187
207
|
* @return 0 if the object was read, GIT_ENOTFOUND if the object is not
|
@@ -286,7 +306,7 @@ GIT_EXTERN(int) git_odb_expand_ids(
|
|
286
306
|
* @param db database to refresh
|
287
307
|
* @return 0 on success, error code otherwise
|
288
308
|
*/
|
289
|
-
GIT_EXTERN(int) git_odb_refresh(
|
309
|
+
GIT_EXTERN(int) git_odb_refresh(git_odb *db);
|
290
310
|
|
291
311
|
/**
|
292
312
|
* List all objects available in the database
|
@@ -301,7 +321,10 @@ GIT_EXTERN(int) git_odb_refresh(struct git_odb *db);
|
|
301
321
|
* @param payload data to pass to the callback
|
302
322
|
* @return 0 on success, non-zero callback return value, or error code
|
303
323
|
*/
|
304
|
-
GIT_EXTERN(int) git_odb_foreach(
|
324
|
+
GIT_EXTERN(int) git_odb_foreach(
|
325
|
+
git_odb *db,
|
326
|
+
git_odb_foreach_cb cb,
|
327
|
+
void *payload);
|
305
328
|
|
306
329
|
/**
|
307
330
|
* Write an object directly into the ODB
|
@@ -316,7 +339,7 @@ GIT_EXTERN(int) git_odb_foreach(git_odb *db, git_odb_foreach_cb cb, void *payloa
|
|
316
339
|
*
|
317
340
|
* @param out pointer to store the OID result of the write
|
318
341
|
* @param odb object database where to store the object
|
319
|
-
* @param data buffer with the data to store
|
342
|
+
* @param data @type `const unsigned char *` buffer with the data to store
|
320
343
|
* @param len size of the buffer
|
321
344
|
* @param type type of the data to store
|
322
345
|
* @return 0 or an error code
|
@@ -382,7 +405,7 @@ GIT_EXTERN(int) git_odb_stream_finalize_write(git_oid *out, git_odb_stream *stre
|
|
382
405
|
* @param stream the stream
|
383
406
|
* @param buffer a user-allocated buffer to store the data in.
|
384
407
|
* @param len the buffer's length
|
385
|
-
* @return
|
408
|
+
* @return the number of bytes read if succeeded, error code otherwise
|
386
409
|
*/
|
387
410
|
GIT_EXTERN(int) git_odb_stream_read(git_odb_stream *stream, char *buffer, size_t len);
|
388
411
|
|
@@ -466,29 +489,54 @@ GIT_EXTERN(int) git_odb_write_pack(
|
|
466
489
|
GIT_EXTERN(int) git_odb_write_multi_pack_index(
|
467
490
|
git_odb *db);
|
468
491
|
|
492
|
+
#ifdef GIT_EXPERIMENTAL_SHA256
|
493
|
+
|
469
494
|
/**
|
470
|
-
*
|
495
|
+
* Generate the object ID (in SHA1 or SHA256 format) for a given data buffer.
|
471
496
|
*
|
472
|
-
*
|
473
|
-
* the data buffer it were to written to the ODB.
|
474
|
-
*
|
475
|
-
* @param out the resulting object-ID.
|
497
|
+
* @param[out] oid the resulting object ID.
|
476
498
|
* @param data data to hash
|
477
499
|
* @param len size of the data
|
478
500
|
* @param object_type of the data to hash
|
479
501
|
* @param oid_type the oid type to hash to
|
480
502
|
* @return 0 or an error code
|
481
503
|
*/
|
482
|
-
#ifdef GIT_EXPERIMENTAL_SHA256
|
483
504
|
GIT_EXTERN(int) git_odb_hash(
|
484
|
-
git_oid *
|
505
|
+
git_oid *oid,
|
485
506
|
const void *data,
|
486
507
|
size_t len,
|
487
508
|
git_object_t object_type,
|
488
509
|
git_oid_t oid_type);
|
510
|
+
|
511
|
+
/**
|
512
|
+
* Determine the object ID of a file on disk.
|
513
|
+
*
|
514
|
+
* @param[out] oid oid structure the result is written into.
|
515
|
+
* @param path file to read and determine object id for
|
516
|
+
* @param object_type of the data to hash
|
517
|
+
* @param oid_type the oid type to hash to
|
518
|
+
* @return 0 or an error code
|
519
|
+
*/
|
520
|
+
GIT_EXTERN(int) git_odb_hashfile(
|
521
|
+
git_oid *oid,
|
522
|
+
const char *path,
|
523
|
+
git_object_t object_type,
|
524
|
+
git_oid_t oid_type);
|
489
525
|
#else
|
490
|
-
|
491
|
-
|
526
|
+
|
527
|
+
/**
|
528
|
+
* Determine the object-ID (sha1 or sha256 hash) of a data buffer
|
529
|
+
*
|
530
|
+
* The resulting OID will be the identifier for the data buffer as if
|
531
|
+
* the data buffer it were to written to the ODB.
|
532
|
+
*
|
533
|
+
* @param[out] oid the resulting object-ID.
|
534
|
+
* @param data data to hash
|
535
|
+
* @param len size of the data
|
536
|
+
* @param object_type of the data to hash
|
537
|
+
* @return 0 or an error code
|
538
|
+
*/
|
539
|
+
GIT_EXTERN(int) git_odb_hash(git_oid *oid, const void *data, size_t len, git_object_t object_type);
|
492
540
|
|
493
541
|
/**
|
494
542
|
* Read a file from disk and fill a git_oid with the object id
|
@@ -498,20 +546,13 @@ GIT_EXTERN(int) git_odb_hash(git_oid *out, const void *data, size_t len, git_obj
|
|
498
546
|
* the `-w` flag, however, with the --no-filters flag.
|
499
547
|
* If you need filters, see git_repository_hashfile.
|
500
548
|
*
|
501
|
-
* @param
|
549
|
+
* @param[out] oid oid structure the result is written into.
|
502
550
|
* @param path file to read and determine object id for
|
503
551
|
* @param object_type of the data to hash
|
504
|
-
* @param oid_type the oid type to hash to
|
505
552
|
* @return 0 or an error code
|
506
553
|
*/
|
507
|
-
|
508
|
-
|
509
|
-
git_oid *out,
|
510
|
-
const char *path,
|
511
|
-
git_object_t object_type,
|
512
|
-
git_oid_t oid_type);
|
513
|
-
#else
|
514
|
-
GIT_EXTERN(int) git_odb_hashfile(git_oid *out, const char *path, git_object_t type);
|
554
|
+
GIT_EXTERN(int) git_odb_hashfile(git_oid *oid, const char *path, git_object_t object_type);
|
555
|
+
|
515
556
|
#endif
|
516
557
|
|
517
558
|
/**
|
@@ -557,7 +598,7 @@ GIT_EXTERN(const git_oid *) git_odb_object_id(git_odb_object *object);
|
|
557
598
|
* This pointer is owned by the object and shall not be free'd.
|
558
599
|
*
|
559
600
|
* @param object the object
|
560
|
-
* @return a pointer to the data
|
601
|
+
* @return @type `const unsigned char *` a pointer to the data
|
561
602
|
*/
|
562
603
|
GIT_EXTERN(const void *) git_odb_object_data(git_odb_object *object);
|
563
604
|
|
@@ -651,4 +692,5 @@ GIT_EXTERN(int) git_odb_set_commit_graph(git_odb *odb, git_commit_graph *cgraph)
|
|
651
692
|
|
652
693
|
/** @} */
|
653
694
|
GIT_END_DECL
|
695
|
+
|
654
696
|
#endif
|