rugged 1.7.2 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @file git2/diff.h
|
|
18
|
-
* @brief
|
|
18
|
+
* @brief Indicate the differences between two versions of the repository
|
|
19
19
|
* @ingroup Git
|
|
20
20
|
* @{
|
|
21
21
|
*/
|
|
@@ -342,6 +342,12 @@ typedef struct {
|
|
|
342
342
|
* diff process continues.
|
|
343
343
|
* - returns 0, the delta is inserted into the diff, and the diff process
|
|
344
344
|
* continues.
|
|
345
|
+
*
|
|
346
|
+
* @param diff_so_far the diff structure as it currently exists
|
|
347
|
+
* @param delta_to_add the delta that is to be added
|
|
348
|
+
* @param matched_pathspec the pathspec
|
|
349
|
+
* @param payload the user-specified callback payload
|
|
350
|
+
* @return 0 on success, 1 to skip this delta, or an error code
|
|
345
351
|
*/
|
|
346
352
|
typedef int GIT_CALLBACK(git_diff_notify_cb)(
|
|
347
353
|
const git_diff *diff_so_far,
|
|
@@ -357,7 +363,8 @@ typedef int GIT_CALLBACK(git_diff_notify_cb)(
|
|
|
357
363
|
* @param diff_so_far The diff being generated.
|
|
358
364
|
* @param old_path The path to the old file or NULL.
|
|
359
365
|
* @param new_path The path to the new file or NULL.
|
|
360
|
-
* @
|
|
366
|
+
* @param payload the user-specified callback payload
|
|
367
|
+
* @return 0 or an error code
|
|
361
368
|
*/
|
|
362
369
|
typedef int GIT_CALLBACK(git_diff_progress_cb)(
|
|
363
370
|
const git_diff *diff_so_far,
|
|
@@ -463,10 +470,10 @@ typedef struct {
|
|
|
463
470
|
const char *new_prefix;
|
|
464
471
|
} git_diff_options;
|
|
465
472
|
|
|
466
|
-
|
|
473
|
+
/** The current version of the diff options structure */
|
|
467
474
|
#define GIT_DIFF_OPTIONS_VERSION 1
|
|
468
475
|
|
|
469
|
-
|
|
476
|
+
/** Stack initializer for diff options. Alternatively use
|
|
470
477
|
* `git_diff_options_init` programmatic initialization.
|
|
471
478
|
*/
|
|
472
479
|
#define GIT_DIFF_OPTIONS_INIT \
|
|
@@ -492,12 +499,14 @@ GIT_EXTERN(int) git_diff_options_init(
|
|
|
492
499
|
* @param delta A pointer to the delta data for the file
|
|
493
500
|
* @param progress Goes from 0 to 1 over the diff
|
|
494
501
|
* @param payload User-specified pointer from foreach function
|
|
502
|
+
* @return 0 or an error code
|
|
495
503
|
*/
|
|
496
504
|
typedef int GIT_CALLBACK(git_diff_file_cb)(
|
|
497
505
|
const git_diff_delta *delta,
|
|
498
506
|
float progress,
|
|
499
507
|
void *payload);
|
|
500
508
|
|
|
509
|
+
/** Maximum size of the hunk header */
|
|
501
510
|
#define GIT_DIFF_HUNK_HEADER_SIZE 128
|
|
502
511
|
|
|
503
512
|
/**
|
|
@@ -558,6 +567,11 @@ typedef struct {
|
|
|
558
567
|
/**
|
|
559
568
|
* When iterating over a diff, callback that will be made for
|
|
560
569
|
* binary content within the diff.
|
|
570
|
+
*
|
|
571
|
+
* @param delta the delta
|
|
572
|
+
* @param binary the binary content
|
|
573
|
+
* @param payload the user-specified callback payload
|
|
574
|
+
* @return 0 or an error code
|
|
561
575
|
*/
|
|
562
576
|
typedef int GIT_CALLBACK(git_diff_binary_cb)(
|
|
563
577
|
const git_diff_delta *delta,
|
|
@@ -584,6 +598,11 @@ typedef struct {
|
|
|
584
598
|
|
|
585
599
|
/**
|
|
586
600
|
* When iterating over a diff, callback that will be made per hunk.
|
|
601
|
+
*
|
|
602
|
+
* @param delta the delta
|
|
603
|
+
* @param hunk the hunk
|
|
604
|
+
* @param payload the user-specified callback payload
|
|
605
|
+
* @return 0 or an error code
|
|
587
606
|
*/
|
|
588
607
|
typedef int GIT_CALLBACK(git_diff_hunk_cb)(
|
|
589
608
|
const git_diff_delta *delta,
|
|
@@ -645,6 +664,12 @@ typedef struct {
|
|
|
645
664
|
* When printing a diff, callback that will be made to output each line
|
|
646
665
|
* of text. This uses some extra GIT_DIFF_LINE_... constants for output
|
|
647
666
|
* of lines of file and hunk headers.
|
|
667
|
+
*
|
|
668
|
+
* @param delta the delta that contains the line
|
|
669
|
+
* @param hunk the hunk that contains the line
|
|
670
|
+
* @param line the line in the diff
|
|
671
|
+
* @param payload the user-specified callback payload
|
|
672
|
+
* @return 0 or an error code
|
|
648
673
|
*/
|
|
649
674
|
typedef int GIT_CALLBACK(git_diff_line_cb)(
|
|
650
675
|
const git_diff_delta *delta, /**< delta that contains this data */
|
|
@@ -802,7 +827,10 @@ typedef struct {
|
|
|
802
827
|
git_diff_similarity_metric *metric;
|
|
803
828
|
} git_diff_find_options;
|
|
804
829
|
|
|
830
|
+
/** Current version for the `git_diff_find_options` structure */
|
|
805
831
|
#define GIT_DIFF_FIND_OPTIONS_VERSION 1
|
|
832
|
+
|
|
833
|
+
/** Static constructor for `git_diff_find_options` */
|
|
806
834
|
#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
|
|
807
835
|
|
|
808
836
|
/**
|
|
@@ -1296,10 +1324,10 @@ typedef struct {
|
|
|
1296
1324
|
git_oid_t oid_type;
|
|
1297
1325
|
} git_diff_parse_options;
|
|
1298
1326
|
|
|
1299
|
-
|
|
1327
|
+
/** The current version of the diff parse options structure */
|
|
1300
1328
|
#define GIT_DIFF_PARSE_OPTIONS_VERSION 1
|
|
1301
1329
|
|
|
1302
|
-
|
|
1330
|
+
/** Stack initializer for diff parse options. Alternatively use
|
|
1303
1331
|
* `git_diff_parse_options_init` programmatic initialization.
|
|
1304
1332
|
*/
|
|
1305
1333
|
#define GIT_DIFF_PARSE_OPTIONS_INIT \
|
|
@@ -1432,7 +1460,10 @@ typedef struct git_diff_patchid_options {
|
|
|
1432
1460
|
unsigned int version;
|
|
1433
1461
|
} git_diff_patchid_options;
|
|
1434
1462
|
|
|
1463
|
+
/** Current version for the `git_diff_patchid_options` structure */
|
|
1435
1464
|
#define GIT_DIFF_PATCHID_OPTIONS_VERSION 1
|
|
1465
|
+
|
|
1466
|
+
/** Static constructor for `git_diff_patchid_options` */
|
|
1436
1467
|
#define GIT_DIFF_PATCHID_OPTIONS_INIT { GIT_DIFF_PATCHID_OPTIONS_VERSION }
|
|
1437
1468
|
|
|
1438
1469
|
/**
|
|
@@ -1470,8 +1501,7 @@ GIT_EXTERN(int) git_diff_patchid_options_init(
|
|
|
1470
1501
|
*/
|
|
1471
1502
|
GIT_EXTERN(int) git_diff_patchid(git_oid *out, git_diff *diff, git_diff_patchid_options *opts);
|
|
1472
1503
|
|
|
1473
|
-
GIT_END_DECL
|
|
1474
|
-
|
|
1475
1504
|
/** @} */
|
|
1505
|
+
GIT_END_DECL
|
|
1476
1506
|
|
|
1477
1507
|
#endif
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
#define INCLUDE_git_email_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
|
+
#include "diff.h"
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @file git2/email.h
|
|
14
|
-
* @brief
|
|
15
|
+
* @brief Produce email-ready patches
|
|
15
16
|
* @ingroup Git
|
|
16
17
|
* @{
|
|
17
18
|
*/
|
|
@@ -70,11 +71,14 @@ typedef struct {
|
|
|
70
71
|
size_t reroll_number;
|
|
71
72
|
} git_email_create_options;
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
/** Current version for the `git_email_create_options` structure */
|
|
75
|
+
#define GIT_EMAIL_CREATE_OPTIONS_VERSION 1
|
|
76
|
+
|
|
77
|
+
/** Static constructor for `git_email_create_options`
|
|
78
|
+
*
|
|
74
79
|
* By default, our options include rename detection and binary
|
|
75
80
|
* diffs to match `git format-patch`.
|
|
76
81
|
*/
|
|
77
|
-
#define GIT_EMAIL_CREATE_OPTIONS_VERSION 1
|
|
78
82
|
#define GIT_EMAIL_CREATE_OPTIONS_INIT \
|
|
79
83
|
{ \
|
|
80
84
|
GIT_EMAIL_CREATE_OPTIONS_VERSION, \
|
|
@@ -83,30 +87,6 @@ typedef struct {
|
|
|
83
87
|
GIT_DIFF_FIND_OPTIONS_INIT \
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
/**
|
|
87
|
-
* Create a diff for a commit in mbox format for sending via email.
|
|
88
|
-
*
|
|
89
|
-
* @param out buffer to store the e-mail patch in
|
|
90
|
-
* @param diff the changes to include in the email
|
|
91
|
-
* @param patch_idx the patch index
|
|
92
|
-
* @param patch_count the total number of patches that will be included
|
|
93
|
-
* @param commit_id the commit id for this change
|
|
94
|
-
* @param summary the commit message for this change
|
|
95
|
-
* @param body optional text to include above the diffstat
|
|
96
|
-
* @param author the person who authored this commit
|
|
97
|
-
* @param opts email creation options
|
|
98
|
-
*/
|
|
99
|
-
GIT_EXTERN(int) git_email_create_from_diff(
|
|
100
|
-
git_buf *out,
|
|
101
|
-
git_diff *diff,
|
|
102
|
-
size_t patch_idx,
|
|
103
|
-
size_t patch_count,
|
|
104
|
-
const git_oid *commit_id,
|
|
105
|
-
const char *summary,
|
|
106
|
-
const char *body,
|
|
107
|
-
const git_signature *author,
|
|
108
|
-
const git_email_create_options *opts);
|
|
109
|
-
|
|
110
90
|
/**
|
|
111
91
|
* Create a diff for a commit in mbox format for sending via email.
|
|
112
92
|
* The commit must not be a merge commit.
|
|
@@ -114,14 +94,14 @@ GIT_EXTERN(int) git_email_create_from_diff(
|
|
|
114
94
|
* @param out buffer to store the e-mail patch in
|
|
115
95
|
* @param commit commit to create a patch for
|
|
116
96
|
* @param opts email creation options
|
|
97
|
+
* @return 0 or an error code
|
|
117
98
|
*/
|
|
118
99
|
GIT_EXTERN(int) git_email_create_from_commit(
|
|
119
100
|
git_buf *out,
|
|
120
101
|
git_commit *commit,
|
|
121
102
|
const git_email_create_options *opts);
|
|
122
103
|
|
|
123
|
-
GIT_END_DECL
|
|
124
|
-
|
|
125
104
|
/** @} */
|
|
105
|
+
GIT_END_DECL
|
|
126
106
|
|
|
127
107
|
#endif
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @file git2/errors.h
|
|
14
|
-
* @brief
|
|
14
|
+
* @brief Error handling routines and variables
|
|
15
15
|
* @ingroup Git
|
|
16
16
|
* @{
|
|
17
17
|
*/
|
|
@@ -19,25 +19,32 @@ GIT_BEGIN_DECL
|
|
|
19
19
|
|
|
20
20
|
/** Generic return codes */
|
|
21
21
|
typedef enum {
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* No error occurred; the call was successful.
|
|
24
|
+
*/
|
|
25
|
+
GIT_OK = 0,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error occurred; call `git_error_last` for more information.
|
|
29
|
+
*/
|
|
30
|
+
GIT_ERROR = -1,
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
GIT_EBUFS = -6, /**< Output buffer too short to hold data */
|
|
32
|
+
GIT_ENOTFOUND = -3, /**< Requested object could not be found. */
|
|
33
|
+
GIT_EEXISTS = -4, /**< Object exists preventing operation. */
|
|
34
|
+
GIT_EAMBIGUOUS = -5, /**< More than one object matches. */
|
|
35
|
+
GIT_EBUFS = -6, /**< Output buffer too short to hold data. */
|
|
29
36
|
|
|
30
37
|
/**
|
|
31
38
|
* GIT_EUSER is a special error that is never generated by libgit2
|
|
32
39
|
* code. You can return it from a callback (e.g to stop an iteration)
|
|
33
40
|
* to know that it was generated by the callback and not by libgit2.
|
|
34
41
|
*/
|
|
35
|
-
GIT_EUSER
|
|
42
|
+
GIT_EUSER = -7,
|
|
36
43
|
|
|
37
|
-
GIT_EBAREREPO =
|
|
38
|
-
GIT_EUNBORNBRANCH =
|
|
39
|
-
GIT_EUNMERGED = -10,
|
|
40
|
-
GIT_ENONFASTFORWARD = -11,
|
|
44
|
+
GIT_EBAREREPO = -8, /**< Operation not allowed on bare repository. */
|
|
45
|
+
GIT_EUNBORNBRANCH = -9, /**< HEAD refers to branch with no commits. */
|
|
46
|
+
GIT_EUNMERGED = -10, /**< Merge in progress prevented operation */
|
|
47
|
+
GIT_ENONFASTFORWARD = -11, /**< Reference was not fast-forwardable */
|
|
41
48
|
GIT_EINVALIDSPEC = -12, /**< Name/ref spec was not in a valid format */
|
|
42
49
|
GIT_ECONFLICT = -13, /**< Checkout conflicts prevented operation */
|
|
43
50
|
GIT_ELOCKED = -14, /**< Lock file prevented operation */
|
|
@@ -59,21 +66,16 @@ typedef enum {
|
|
|
59
66
|
GIT_EINDEXDIRTY = -34, /**< Unsaved changes in the index would be overwritten */
|
|
60
67
|
GIT_EAPPLYFAIL = -35, /**< Patch application failed */
|
|
61
68
|
GIT_EOWNER = -36, /**< The object is not owned by the current user */
|
|
62
|
-
GIT_TIMEOUT = -37 /**< The operation timed out */
|
|
69
|
+
GIT_TIMEOUT = -37, /**< The operation timed out */
|
|
70
|
+
GIT_EUNCHANGED = -38, /**< There were no changes */
|
|
71
|
+
GIT_ENOTSUPPORTED = -39, /**< An option is not supported */
|
|
72
|
+
GIT_EREADONLY = -40 /**< The subject is read-only */
|
|
63
73
|
} git_error_code;
|
|
64
74
|
|
|
65
75
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* This is kept on a per-thread basis if GIT_THREADS was defined when the
|
|
69
|
-
* library was build, otherwise one is kept globally for the library
|
|
76
|
+
* Error classes are the category of error. They reflect the area of the
|
|
77
|
+
* code where an error occurred.
|
|
70
78
|
*/
|
|
71
|
-
typedef struct {
|
|
72
|
-
char *message;
|
|
73
|
-
int klass;
|
|
74
|
-
} git_error;
|
|
75
|
-
|
|
76
|
-
/** Error classes */
|
|
77
79
|
typedef enum {
|
|
78
80
|
GIT_ERROR_NONE = 0,
|
|
79
81
|
GIT_ERROR_NOMEMORY,
|
|
@@ -115,67 +117,38 @@ typedef enum {
|
|
|
115
117
|
} git_error_t;
|
|
116
118
|
|
|
117
119
|
/**
|
|
118
|
-
*
|
|
119
|
-
* current thread.
|
|
120
|
-
*
|
|
121
|
-
* The default behaviour of this function is to return NULL if no previous error has occurred.
|
|
122
|
-
* However, libgit2's error strings are not cleared aggressively, so a prior
|
|
123
|
-
* (unrelated) error may be returned. This can be avoided by only calling
|
|
124
|
-
* this function if the prior call to a libgit2 API returned an error.
|
|
120
|
+
* Structure to store extra details of the last error that occurred.
|
|
125
121
|
*
|
|
126
|
-
*
|
|
127
|
-
|
|
128
|
-
GIT_EXTERN(const git_error *) git_error_last(void);
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Clear the last library error that occurred for this thread.
|
|
122
|
+
* This is kept on a per-thread basis if GIT_THREADS was defined when the
|
|
123
|
+
* library was build, otherwise one is kept globally for the library
|
|
132
124
|
*/
|
|
133
|
-
|
|
125
|
+
typedef struct {
|
|
126
|
+
char *message; /**< The error message for the last error. */
|
|
127
|
+
int klass; /**< The category of the last error. @type git_error_t */
|
|
128
|
+
} git_error;
|
|
134
129
|
|
|
135
130
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
131
|
+
* Return the last `git_error` object that was generated for the
|
|
132
|
+
* current thread.
|
|
138
133
|
*
|
|
139
|
-
* This function
|
|
140
|
-
* relay an error message through libgit2. Most regular users of libgit2
|
|
141
|
-
* will never need to call this function -- actually, calling it in most
|
|
142
|
-
* circumstances (for example, calling from within a callback function)
|
|
143
|
-
* will just end up having the value overwritten by libgit2 internals.
|
|
134
|
+
* This function will never return NULL.
|
|
144
135
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
136
|
+
* Callers should not rely on this to determine whether an error has
|
|
137
|
+
* occurred. For error checking, callers should examine the return
|
|
138
|
+
* codes of libgit2 functions.
|
|
147
139
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* be the arguments for the format string.
|
|
152
|
-
*/
|
|
153
|
-
GIT_EXTERN(void) git_error_set(int error_class, const char *fmt, ...)
|
|
154
|
-
GIT_FORMAT_PRINTF(2, 3);
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Set the error message string for this thread. This function is like
|
|
158
|
-
* `git_error_set` but takes a static string instead of a `printf`-style
|
|
159
|
-
* format.
|
|
140
|
+
* This call can only reliably report error messages when an error
|
|
141
|
+
* has occurred. (It may contain stale information if it is called
|
|
142
|
+
* after a different function that succeeds.)
|
|
160
143
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* @param string The error message to keep
|
|
164
|
-
* @return 0 on success or -1 on failure
|
|
165
|
-
*/
|
|
166
|
-
GIT_EXTERN(int) git_error_set_str(int error_class, const char *string);
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Set the error message to a special value for memory allocation failure.
|
|
144
|
+
* The memory for this object is managed by libgit2. It should not
|
|
145
|
+
* be freed.
|
|
170
146
|
*
|
|
171
|
-
*
|
|
172
|
-
* string that is passed in. This is not a good idea when the error in
|
|
173
|
-
* question is a memory allocation failure. That circumstance has a
|
|
174
|
-
* special setter function that sets the error string to a known and
|
|
175
|
-
* statically allocated internal value.
|
|
147
|
+
* @return A pointer to a `git_error` object that describes the error.
|
|
176
148
|
*/
|
|
177
|
-
GIT_EXTERN(
|
|
149
|
+
GIT_EXTERN(const git_error *) git_error_last(void);
|
|
178
150
|
|
|
179
151
|
/** @} */
|
|
180
152
|
GIT_END_DECL
|
|
153
|
+
|
|
181
154
|
#endif
|
|
@@ -14,9 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @file git2/filter.h
|
|
17
|
-
* @brief
|
|
18
|
-
*
|
|
17
|
+
* @brief Filters modify files during checkout or commit
|
|
19
18
|
* @ingroup Git
|
|
19
|
+
*
|
|
20
|
+
* During checkout, filters update a file from a "canonical" state to
|
|
21
|
+
* a format appropriate for the local filesystem; during commit, filters
|
|
22
|
+
* produce the canonical state. For example, on Windows, the line ending
|
|
23
|
+
* filters _may_ take a canonical state (with Unix-style newlines) in
|
|
24
|
+
* the repository, and place the contents on-disk with Windows-style
|
|
25
|
+
* `\r\n` line endings.
|
|
20
26
|
* @{
|
|
21
27
|
*/
|
|
22
28
|
GIT_BEGIN_DECL
|
|
@@ -79,8 +85,11 @@ typedef struct {
|
|
|
79
85
|
git_oid attr_commit_id;
|
|
80
86
|
} git_filter_options;
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
/** Current version for the `git_filter_options` structure */
|
|
89
|
+
#define GIT_FILTER_OPTIONS_VERSION 1
|
|
90
|
+
|
|
91
|
+
/** Static constructor for `git_filter_options` */
|
|
92
|
+
#define GIT_FILTER_OPTIONS_INIT {GIT_FILTER_OPTIONS_VERSION}
|
|
84
93
|
|
|
85
94
|
/**
|
|
86
95
|
* A filter that can transform file data
|
|
@@ -268,9 +277,7 @@ GIT_EXTERN(int) git_filter_list_stream_blob(
|
|
|
268
277
|
*/
|
|
269
278
|
GIT_EXTERN(void) git_filter_list_free(git_filter_list *filters);
|
|
270
279
|
|
|
271
|
-
|
|
272
|
-
GIT_END_DECL
|
|
273
|
-
|
|
274
280
|
/** @} */
|
|
281
|
+
GIT_END_DECL
|
|
275
282
|
|
|
276
283
|
#endif
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @file git2/global.h
|
|
14
|
+
* @brief libgit2 library initializer and shutdown functionality
|
|
15
|
+
* @ingroup Git
|
|
16
|
+
* @{
|
|
17
|
+
*/
|
|
12
18
|
GIT_BEGIN_DECL
|
|
13
19
|
|
|
14
20
|
/**
|
|
@@ -32,7 +38,7 @@ GIT_EXTERN(int) git_libgit2_init(void);
|
|
|
32
38
|
* many times as `git_libgit2_init()` was called - it will return the
|
|
33
39
|
* number of remainining initializations that have not been shutdown
|
|
34
40
|
* (after this one).
|
|
35
|
-
*
|
|
41
|
+
*
|
|
36
42
|
* @return the number of remaining initializations of the library, or an
|
|
37
43
|
* error code.
|
|
38
44
|
*/
|
|
@@ -40,5 +46,6 @@ GIT_EXTERN(int) git_libgit2_shutdown(void);
|
|
|
40
46
|
|
|
41
47
|
/** @} */
|
|
42
48
|
GIT_END_DECL
|
|
49
|
+
|
|
43
50
|
#endif
|
|
44
51
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @file git2/graph.h
|
|
16
|
-
* @brief
|
|
16
|
+
* @brief Graph traversal routines
|
|
17
17
|
* @defgroup git_revwalk Git graph traversal routines
|
|
18
18
|
* @ingroup Git
|
|
19
19
|
* @{
|
|
@@ -61,8 +61,8 @@ GIT_EXTERN(int) git_graph_descendant_of(
|
|
|
61
61
|
*
|
|
62
62
|
* @param repo the repository where the commits exist
|
|
63
63
|
* @param commit a previously loaded commit
|
|
64
|
-
* @param length the number of commits in the provided `descendant_array`
|
|
65
64
|
* @param descendant_array oids of the commits
|
|
65
|
+
* @param length the number of commits in the provided `descendant_array`
|
|
66
66
|
* @return 1 if the given commit is an ancestor of any of the given potential
|
|
67
67
|
* descendants, 0 if not, error code otherwise.
|
|
68
68
|
*/
|
|
@@ -74,4 +74,5 @@ GIT_EXTERN(int) git_graph_reachable_from_any(
|
|
|
74
74
|
|
|
75
75
|
/** @} */
|
|
76
76
|
GIT_END_DECL
|
|
77
|
+
|
|
77
78
|
#endif
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
#include "common.h"
|
|
11
11
|
#include "types.h"
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @file git2/ignore.h
|
|
15
|
+
* @brief Ignore particular untracked files
|
|
16
|
+
* @ingroup Git
|
|
17
|
+
* @{
|
|
18
|
+
*
|
|
19
|
+
* When examining the repository status, git can optionally ignore
|
|
20
|
+
* specified untracked files.
|
|
21
|
+
*/
|
|
13
22
|
GIT_BEGIN_DECL
|
|
14
23
|
|
|
15
24
|
/**
|
|
@@ -73,6 +82,7 @@ GIT_EXTERN(int) git_ignore_path_is_ignored(
|
|
|
73
82
|
git_repository *repo,
|
|
74
83
|
const char *path);
|
|
75
84
|
|
|
85
|
+
/** @} */
|
|
76
86
|
GIT_END_DECL
|
|
77
87
|
|
|
78
88
|
#endif
|
|
@@ -15,9 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @file git2/index.h
|
|
18
|
-
* @brief
|
|
18
|
+
* @brief Index (aka "cache" aka "staging area")
|
|
19
19
|
* @defgroup git_index Git index parsing and manipulation routines
|
|
20
20
|
* @ingroup Git
|
|
21
|
+
*
|
|
22
|
+
* The index (or "cache", or "staging area") is the contents of the
|
|
23
|
+
* next commit. In addition, the index stores other data, such as
|
|
24
|
+
* conflicts that occurred during the last merge operation, and
|
|
25
|
+
* the "treecache" to speed up various on-disk operations.
|
|
21
26
|
* @{
|
|
22
27
|
*/
|
|
23
28
|
GIT_BEGIN_DECL
|
|
@@ -77,8 +82,11 @@ typedef struct git_index_entry {
|
|
|
77
82
|
* data in the `flags`.
|
|
78
83
|
*/
|
|
79
84
|
|
|
85
|
+
/** Mask for name length */
|
|
80
86
|
#define GIT_INDEX_ENTRY_NAMEMASK (0x0fff)
|
|
87
|
+
/** Mask for index entry stage */
|
|
81
88
|
#define GIT_INDEX_ENTRY_STAGEMASK (0x3000)
|
|
89
|
+
/** Shift bits for index entry */
|
|
82
90
|
#define GIT_INDEX_ENTRY_STAGESHIFT 12
|
|
83
91
|
|
|
84
92
|
/**
|
|
@@ -89,9 +97,17 @@ typedef enum {
|
|
|
89
97
|
GIT_INDEX_ENTRY_VALID = (0x8000)
|
|
90
98
|
} git_index_entry_flag_t;
|
|
91
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Macro to get the stage value (0 for the "main index", or a conflict
|
|
102
|
+
* value) from an index entry.
|
|
103
|
+
*/
|
|
92
104
|
#define GIT_INDEX_ENTRY_STAGE(E) \
|
|
93
105
|
(((E)->flags & GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT)
|
|
94
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Macro to set the stage value (0 for the "main index", or a conflict
|
|
109
|
+
* value) for an index entry.
|
|
110
|
+
*/
|
|
95
111
|
#define GIT_INDEX_ENTRY_STAGE_SET(E,S) do { \
|
|
96
112
|
(E)->flags = ((E)->flags & ~GIT_INDEX_ENTRY_STAGEMASK) | \
|
|
97
113
|
(((S) & 0x03) << GIT_INDEX_ENTRY_STAGESHIFT); } while (0)
|
|
@@ -131,7 +147,14 @@ typedef enum {
|
|
|
131
147
|
} git_index_capability_t;
|
|
132
148
|
|
|
133
149
|
|
|
134
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Callback for APIs that add/remove/update files matching pathspec
|
|
152
|
+
*
|
|
153
|
+
* @param path the path
|
|
154
|
+
* @param matched_pathspec the given pathspec
|
|
155
|
+
* @param payload the user-specified payload
|
|
156
|
+
* @return 0 to continue with the index operation, positive number to skip this file for the index operation, negative number on failure
|
|
157
|
+
*/
|
|
135
158
|
typedef int GIT_CALLBACK(git_index_matched_path_cb)(
|
|
136
159
|
const char *path, const char *matched_pathspec, void *payload);
|
|
137
160
|
|
|
@@ -166,6 +189,74 @@ typedef enum {
|
|
|
166
189
|
GIT_INDEX_STAGE_THEIRS = 3
|
|
167
190
|
} git_index_stage_t;
|
|
168
191
|
|
|
192
|
+
#ifdef GIT_EXPERIMENTAL_SHA256
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The options for opening or creating an index.
|
|
196
|
+
*
|
|
197
|
+
* Initialize with `GIT_INDEX_OPTIONS_INIT`. Alternatively, you can
|
|
198
|
+
* use `git_index_options_init`.
|
|
199
|
+
*
|
|
200
|
+
* @options[version] GIT_INDEX_OPTIONS_VERSION
|
|
201
|
+
* @options[init_macro] GIT_INDEX_OPTIONS_INIT
|
|
202
|
+
* @options[init_function] git_index_options_init
|
|
203
|
+
*/
|
|
204
|
+
typedef struct git_index_options {
|
|
205
|
+
unsigned int version; /**< The version */
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The object ID type for the object IDs that exist in the index.
|
|
209
|
+
*
|
|
210
|
+
* If this is not specified, this defaults to `GIT_OID_SHA1`.
|
|
211
|
+
*/
|
|
212
|
+
git_oid_t oid_type;
|
|
213
|
+
} git_index_options;
|
|
214
|
+
|
|
215
|
+
/** Current version for the `git_index_options` structure */
|
|
216
|
+
#define GIT_INDEX_OPTIONS_VERSION 1
|
|
217
|
+
|
|
218
|
+
/** Static constructor for `git_index_options` */
|
|
219
|
+
#define GIT_INDEX_OPTIONS_INIT { GIT_INDEX_OPTIONS_VERSION }
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Initialize git_index_options structure
|
|
223
|
+
*
|
|
224
|
+
* Initializes a `git_index_options` with default values. Equivalent to creating
|
|
225
|
+
* an instance with GIT_INDEX_OPTIONS_INIT.
|
|
226
|
+
*
|
|
227
|
+
* @param opts The `git_index_options` struct to initialize.
|
|
228
|
+
* @param version The struct version; pass `GIT_INDEX_OPTIONS_VERSION`.
|
|
229
|
+
* @return Zero on success; -1 on failure.
|
|
230
|
+
*/
|
|
231
|
+
GIT_EXTERN(int) git_index_options_init(
|
|
232
|
+
git_index_options *opts,
|
|
233
|
+
unsigned int version);
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Creates a new bare Git index object, without a repository to back
|
|
237
|
+
* it. This index object is capable of storing SHA256 objects.
|
|
238
|
+
*
|
|
239
|
+
* @param index_out the pointer for the new index
|
|
240
|
+
* @param index_path the path to the index file in disk
|
|
241
|
+
* @param opts the options for opening the index, or NULL
|
|
242
|
+
* @return 0 or an error code
|
|
243
|
+
*/
|
|
244
|
+
GIT_EXTERN(int) git_index_open(
|
|
245
|
+
git_index **index_out,
|
|
246
|
+
const char *index_path,
|
|
247
|
+
const git_index_options *opts);
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Create an in-memory index object.
|
|
251
|
+
*
|
|
252
|
+
* @param index_out the pointer for the new index
|
|
253
|
+
* @param opts the options for opening the index, or NULL
|
|
254
|
+
* @return 0 or an error code
|
|
255
|
+
*/
|
|
256
|
+
GIT_EXTERN(int) git_index_new(git_index **index_out, const git_index_options *opts);
|
|
257
|
+
|
|
258
|
+
#else
|
|
259
|
+
|
|
169
260
|
/**
|
|
170
261
|
* Create a new bare Git index object as a memory representation
|
|
171
262
|
* of the Git index file in 'index_path', without a repository
|
|
@@ -180,16 +271,11 @@ typedef enum {
|
|
|
180
271
|
*
|
|
181
272
|
* The index must be freed once it's no longer in use.
|
|
182
273
|
*
|
|
183
|
-
* @param
|
|
274
|
+
* @param index_out the pointer for the new index
|
|
184
275
|
* @param index_path the path to the index file in disk
|
|
185
276
|
* @return 0 or an error code
|
|
186
277
|
*/
|
|
187
|
-
|
|
188
|
-
#ifdef GIT_EXPERIMENTAL_SHA256
|
|
189
|
-
GIT_EXTERN(int) git_index_open(git_index **out, const char *index_path, git_oid_t oid_type);
|
|
190
|
-
#else
|
|
191
|
-
GIT_EXTERN(int) git_index_open(git_index **out, const char *index_path);
|
|
192
|
-
#endif
|
|
278
|
+
GIT_EXTERN(int) git_index_open(git_index **index_out, const char *index_path);
|
|
193
279
|
|
|
194
280
|
/**
|
|
195
281
|
* Create an in-memory index object.
|
|
@@ -199,13 +285,11 @@ GIT_EXTERN(int) git_index_open(git_index **out, const char *index_path);
|
|
|
199
285
|
*
|
|
200
286
|
* The index must be freed once it's no longer in use.
|
|
201
287
|
*
|
|
202
|
-
* @param
|
|
288
|
+
* @param index_out the pointer for the new index
|
|
203
289
|
* @return 0 or an error code
|
|
204
290
|
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
#else
|
|
208
|
-
GIT_EXTERN(int) git_index_new(git_index **out);
|
|
291
|
+
GIT_EXTERN(int) git_index_new(git_index **index_out);
|
|
292
|
+
|
|
209
293
|
#endif
|
|
210
294
|
|
|
211
295
|
/**
|
|
@@ -845,4 +929,5 @@ GIT_EXTERN(void) git_index_conflict_iterator_free(
|
|
|
845
929
|
|
|
846
930
|
/** @} */
|
|
847
931
|
GIT_END_DECL
|
|
932
|
+
|
|
848
933
|
#endif
|