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
@@ -19,8 +19,8 @@
|
|
19
19
|
|
20
20
|
/**
|
21
21
|
* @file git2/remote.h
|
22
|
-
* @brief
|
23
|
-
* @defgroup git_remote
|
22
|
+
* @brief Remotes are where local repositories fetch from and push to
|
23
|
+
* @defgroup git_remote Remotes are where local repositories fetch from and push to
|
24
24
|
* @ingroup Git
|
25
25
|
* @{
|
26
26
|
*/
|
@@ -76,6 +76,17 @@ typedef enum {
|
|
76
76
|
GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC = (1 << 1)
|
77
77
|
} git_remote_create_flags;
|
78
78
|
|
79
|
+
/**
|
80
|
+
* How to handle reference updates.
|
81
|
+
*/
|
82
|
+
typedef enum {
|
83
|
+
/* Write the fetch results to FETCH_HEAD. */
|
84
|
+
GIT_REMOTE_UPDATE_FETCHHEAD = (1 << 0),
|
85
|
+
|
86
|
+
/* Report unchanged tips in the update_refs callback. */
|
87
|
+
GIT_REMOTE_UPDATE_REPORT_UNCHANGED = (1 << 1)
|
88
|
+
} git_remote_update_flags;
|
89
|
+
|
79
90
|
/**
|
80
91
|
* Remote creation options structure
|
81
92
|
*
|
@@ -105,7 +116,10 @@ typedef struct git_remote_create_options {
|
|
105
116
|
unsigned int flags;
|
106
117
|
} git_remote_create_options;
|
107
118
|
|
119
|
+
/** Current version for the `git_remote_create_options` structure */
|
108
120
|
#define GIT_REMOTE_CREATE_OPTIONS_VERSION 1
|
121
|
+
|
122
|
+
/** Static constructor for `git_remote_create_options` */
|
109
123
|
#define GIT_REMOTE_CREATE_OPTIONS_INIT {GIT_REMOTE_CREATE_OPTIONS_VERSION}
|
110
124
|
|
111
125
|
/**
|
@@ -455,7 +469,15 @@ typedef enum git_remote_completion_t {
|
|
455
469
|
GIT_REMOTE_COMPLETION_ERROR
|
456
470
|
} git_remote_completion_t;
|
457
471
|
|
458
|
-
/**
|
472
|
+
/**
|
473
|
+
* Push network progress notification callback.
|
474
|
+
*
|
475
|
+
* @param current The number of objects pushed so far
|
476
|
+
* @param total The total number of objects to push
|
477
|
+
* @param bytes The number of bytes pushed
|
478
|
+
* @param payload The user-specified payload callback
|
479
|
+
* @return 0 or an error code to stop the transfer
|
480
|
+
*/
|
459
481
|
typedef int GIT_CALLBACK(git_push_transfer_progress_cb)(
|
460
482
|
unsigned int current,
|
461
483
|
unsigned int total,
|
@@ -491,8 +513,12 @@ typedef struct {
|
|
491
513
|
* as commands to the destination.
|
492
514
|
* @param len number of elements in `updates`
|
493
515
|
* @param payload Payload provided by the caller
|
516
|
+
* @return 0 or an error code to stop the push
|
494
517
|
*/
|
495
|
-
typedef int GIT_CALLBACK(git_push_negotiation)(
|
518
|
+
typedef int GIT_CALLBACK(git_push_negotiation)(
|
519
|
+
const git_push_update **updates,
|
520
|
+
size_t len,
|
521
|
+
void *payload);
|
496
522
|
|
497
523
|
/**
|
498
524
|
* Callback used to inform of the update status from the remote.
|
@@ -557,7 +583,8 @@ struct git_remote_callbacks {
|
|
557
583
|
* Completion is called when different parts of the download
|
558
584
|
* process are done (currently unused).
|
559
585
|
*/
|
560
|
-
int GIT_CALLBACK(completion)(git_remote_completion_t type,
|
586
|
+
int GIT_CALLBACK(completion)(git_remote_completion_t type,
|
587
|
+
void *data);
|
561
588
|
|
562
589
|
/**
|
563
590
|
* This will be called if the remote host requires
|
@@ -583,11 +610,22 @@ struct git_remote_callbacks {
|
|
583
610
|
*/
|
584
611
|
git_indexer_progress_cb transfer_progress;
|
585
612
|
|
613
|
+
#ifdef GIT_DEPRECATE_HARD
|
614
|
+
void *reserved_update_tips;
|
615
|
+
#else
|
586
616
|
/**
|
587
|
-
*
|
588
|
-
*
|
617
|
+
* Deprecated callback for reference updates, callers should
|
618
|
+
* set `update_refs` instead. This is retained for backward
|
619
|
+
* compatibility; if you specify both `update_refs` and
|
620
|
+
* `update_tips`, then only the `update_refs` function will
|
621
|
+
* be called.
|
622
|
+
*
|
623
|
+
* @deprecated the `update_refs` callback in this structure
|
624
|
+
* should be preferred
|
589
625
|
*/
|
590
|
-
int GIT_CALLBACK(update_tips)(const char *refname,
|
626
|
+
int GIT_CALLBACK(update_tips)(const char *refname,
|
627
|
+
const git_oid *a, const git_oid *b, void *data);
|
628
|
+
#endif
|
591
629
|
|
592
630
|
/**
|
593
631
|
* Function to call with progress information during pack
|
@@ -644,9 +682,25 @@ struct git_remote_callbacks {
|
|
644
682
|
*/
|
645
683
|
git_url_resolve_cb resolve_url;
|
646
684
|
#endif
|
685
|
+
|
686
|
+
/**
|
687
|
+
* Each time a reference is updated locally, this function
|
688
|
+
* will be called with information about it. This should be
|
689
|
+
* preferred over the `update_tips` callback in this
|
690
|
+
* structure.
|
691
|
+
*/
|
692
|
+
int GIT_CALLBACK(update_refs)(
|
693
|
+
const char *refname,
|
694
|
+
const git_oid *a,
|
695
|
+
const git_oid *b,
|
696
|
+
git_refspec *spec,
|
697
|
+
void *data);
|
647
698
|
};
|
648
699
|
|
700
|
+
/** Current version for the `git_remote_callbacks_options` structure */
|
649
701
|
#define GIT_REMOTE_CALLBACKS_VERSION 1
|
702
|
+
|
703
|
+
/** Static constructor for `git_remote_callbacks_options` */
|
650
704
|
#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION}
|
651
705
|
|
652
706
|
/**
|
@@ -733,10 +787,9 @@ typedef struct {
|
|
733
787
|
git_fetch_prune_t prune;
|
734
788
|
|
735
789
|
/**
|
736
|
-
*
|
737
|
-
* on. Leave this default in order to behave like git.
|
790
|
+
* How to handle reference updates; see `git_remote_update_flags`.
|
738
791
|
*/
|
739
|
-
int update_fetchhead;
|
792
|
+
unsigned int update_fetchhead;
|
740
793
|
|
741
794
|
/**
|
742
795
|
* Determines how to behave regarding tags on the remote, such
|
@@ -774,9 +827,17 @@ typedef struct {
|
|
774
827
|
git_strarray custom_headers;
|
775
828
|
} git_fetch_options;
|
776
829
|
|
830
|
+
/** Current version for the `git_fetch_options` structure */
|
777
831
|
#define GIT_FETCH_OPTIONS_VERSION 1
|
778
|
-
|
779
|
-
|
832
|
+
|
833
|
+
/** Static constructor for `git_fetch_options` */
|
834
|
+
#define GIT_FETCH_OPTIONS_INIT { \
|
835
|
+
GIT_FETCH_OPTIONS_VERSION, \
|
836
|
+
GIT_REMOTE_CALLBACKS_INIT, \
|
837
|
+
GIT_FETCH_PRUNE_UNSPECIFIED, \
|
838
|
+
GIT_REMOTE_UPDATE_FETCHHEAD, \
|
839
|
+
GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, \
|
840
|
+
GIT_PROXY_OPTIONS_INIT }
|
780
841
|
|
781
842
|
/**
|
782
843
|
* Initialize git_fetch_options structure
|
@@ -830,9 +891,17 @@ typedef struct {
|
|
830
891
|
* Extra headers for this push operation
|
831
892
|
*/
|
832
893
|
git_strarray custom_headers;
|
894
|
+
|
895
|
+
/**
|
896
|
+
* "Push options" to deliver to the remote.
|
897
|
+
*/
|
898
|
+
git_strarray remote_push_options;
|
833
899
|
} git_push_options;
|
834
900
|
|
901
|
+
/** Current version for the `git_push_options` structure */
|
835
902
|
#define GIT_PUSH_OPTIONS_VERSION 1
|
903
|
+
|
904
|
+
/** Static constructor for `git_push_options` */
|
836
905
|
#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 1, GIT_REMOTE_CALLBACKS_INIT, GIT_PROXY_OPTIONS_INIT }
|
837
906
|
|
838
907
|
/**
|
@@ -876,7 +945,10 @@ typedef struct {
|
|
876
945
|
git_strarray custom_headers;
|
877
946
|
} git_remote_connect_options;
|
878
947
|
|
948
|
+
/** Current version for the `git_remote_connect_options` structure */
|
879
949
|
#define GIT_REMOTE_CONNECT_OPTIONS_VERSION 1
|
950
|
+
|
951
|
+
/** Static constructor for `git_remote_connect_options` */
|
880
952
|
#define GIT_REMOTE_CONNECT_OPTIONS_INIT { \
|
881
953
|
GIT_REMOTE_CONNECT_OPTIONS_VERSION, \
|
882
954
|
GIT_REMOTE_CALLBACKS_INIT, \
|
@@ -996,20 +1068,20 @@ GIT_EXTERN(int) git_remote_upload(
|
|
996
1068
|
* `git_remote_connect` will be used (if it was called).
|
997
1069
|
*
|
998
1070
|
* @param remote the remote to update
|
1071
|
+
* @param callbacks pointer to the callback structure to use or NULL
|
1072
|
+
* @param update_flags the git_remote_update_flags for these tips.
|
1073
|
+
* @param download_tags what the behaviour for downloading tags is for this fetch. This is
|
1074
|
+
* ignored for push. This must be the same value passed to `git_remote_download()`.
|
999
1075
|
* @param reflog_message The message to insert into the reflogs. If
|
1000
1076
|
* NULL and fetching, the default is "fetch <name>", where <name> is
|
1001
1077
|
* the name of the remote (or its url, for in-memory remotes). This
|
1002
1078
|
* parameter is ignored when pushing.
|
1003
|
-
* @param callbacks pointer to the callback structure to use or NULL
|
1004
|
-
* @param update_fetchhead whether to write to FETCH_HEAD. Pass 1 to behave like git.
|
1005
|
-
* @param download_tags what the behaviour for downloading tags is for this fetch. This is
|
1006
|
-
* ignored for push. This must be the same value passed to `git_remote_download()`.
|
1007
1079
|
* @return 0 or an error code
|
1008
1080
|
*/
|
1009
1081
|
GIT_EXTERN(int) git_remote_update_tips(
|
1010
1082
|
git_remote *remote,
|
1011
1083
|
const git_remote_callbacks *callbacks,
|
1012
|
-
int
|
1084
|
+
unsigned int update_flags,
|
1013
1085
|
git_remote_autotag_option_t download_tags,
|
1014
1086
|
const char *reflog_message);
|
1015
1087
|
|
@@ -1071,6 +1143,9 @@ GIT_EXTERN(int) git_remote_push(
|
|
1071
1143
|
|
1072
1144
|
/**
|
1073
1145
|
* Get the statistics structure that is filled in by the fetch operation.
|
1146
|
+
*
|
1147
|
+
* @param remote the remote to get statistics for
|
1148
|
+
* @return the git_indexer_progress for the remote
|
1074
1149
|
*/
|
1075
1150
|
GIT_EXTERN(const git_indexer_progress *) git_remote_stats(git_remote *remote);
|
1076
1151
|
|
@@ -1170,4 +1245,5 @@ GIT_EXTERN(int) git_remote_default_branch(git_buf *out, git_remote *remote);
|
|
1170
1245
|
|
1171
1246
|
/** @} */
|
1172
1247
|
GIT_END_DECL
|
1248
|
+
|
1173
1249
|
#endif
|
@@ -10,12 +10,14 @@
|
|
10
10
|
#include "common.h"
|
11
11
|
#include "types.h"
|
12
12
|
#include "oid.h"
|
13
|
+
#include "odb.h"
|
13
14
|
#include "buffer.h"
|
15
|
+
#include "commit.h"
|
14
16
|
|
15
17
|
/**
|
16
18
|
* @file git2/repository.h
|
17
|
-
* @brief
|
18
|
-
* @defgroup git_repository
|
19
|
+
* @brief The repository stores revisions for a source tree
|
20
|
+
* @defgroup git_repository The repository stores revisions for a source tree
|
19
21
|
* @ingroup Git
|
20
22
|
* @{
|
21
23
|
*/
|
@@ -30,7 +32,11 @@ GIT_BEGIN_DECL
|
|
30
32
|
* The method will automatically detect if 'path' is a normal
|
31
33
|
* or bare repository or fail is 'path' is neither.
|
32
34
|
*
|
33
|
-
*
|
35
|
+
* Note that the libgit2 library _must_ be initialized using
|
36
|
+
* `git_libgit2_init` before any APIs can be called, including
|
37
|
+
* this one.
|
38
|
+
*
|
39
|
+
* @param[out] out pointer to the repo which will be opened
|
34
40
|
* @param path the path to the repository
|
35
41
|
* @return 0 or an error code
|
36
42
|
*/
|
@@ -56,19 +62,11 @@ GIT_EXTERN(int) git_repository_open_from_worktree(git_repository **out, git_work
|
|
56
62
|
*
|
57
63
|
* @param out pointer to the repo
|
58
64
|
* @param odb the object database to wrap
|
59
|
-
* @param oid_type the oid type of the object database
|
60
65
|
* @return 0 or an error code
|
61
66
|
*/
|
62
|
-
#ifdef GIT_EXPERIMENTAL_SHA256
|
63
|
-
GIT_EXTERN(int) git_repository_wrap_odb(
|
64
|
-
git_repository **out,
|
65
|
-
git_odb *odb,
|
66
|
-
git_oid_t oid_type);
|
67
|
-
#else
|
68
67
|
GIT_EXTERN(int) git_repository_wrap_odb(
|
69
68
|
git_repository **out,
|
70
69
|
git_odb *odb);
|
71
|
-
#endif
|
72
70
|
|
73
71
|
/**
|
74
72
|
* Look for a git repository and copy its path in the given buffer.
|
@@ -80,6 +78,10 @@ GIT_EXTERN(int) git_repository_wrap_odb(
|
|
80
78
|
* The method will automatically detect if the repository is bare
|
81
79
|
* (if there is a repository).
|
82
80
|
*
|
81
|
+
* Note that the libgit2 library _must_ be initialized using
|
82
|
+
* `git_libgit2_init` before any APIs can be called, including
|
83
|
+
* this one.
|
84
|
+
*
|
83
85
|
* @param out A pointer to a user-allocated git_buf which will contain
|
84
86
|
* the found path.
|
85
87
|
*
|
@@ -157,7 +159,11 @@ typedef enum {
|
|
157
159
|
/**
|
158
160
|
* Find and open a repository with extended controls.
|
159
161
|
*
|
160
|
-
*
|
162
|
+
* Note that the libgit2 library _must_ be initialized using
|
163
|
+
* `git_libgit2_init` before any APIs can be called, including
|
164
|
+
* this one.
|
165
|
+
*
|
166
|
+
* @param[out] out Pointer to the repo which will be opened. This can
|
161
167
|
* actually be NULL if you only want to use the error code to
|
162
168
|
* see if a repo at this path could be opened.
|
163
169
|
* @param path Path to open as git repository. If the flags
|
@@ -185,7 +191,11 @@ GIT_EXTERN(int) git_repository_open_ext(
|
|
185
191
|
* if you're e.g. hosting git repositories and need to access them
|
186
192
|
* efficiently
|
187
193
|
*
|
188
|
-
*
|
194
|
+
* Note that the libgit2 library _must_ be initialized using
|
195
|
+
* `git_libgit2_init` before any APIs can be called, including
|
196
|
+
* this one.
|
197
|
+
*
|
198
|
+
* @param[out] out Pointer to the repo which will be opened.
|
189
199
|
* @param bare_path Direct path to the bare repository
|
190
200
|
* @return 0 on success, or an error code
|
191
201
|
*/
|
@@ -210,7 +220,11 @@ GIT_EXTERN(void) git_repository_free(git_repository *repo);
|
|
210
220
|
* TODO:
|
211
221
|
* - Reinit the repository
|
212
222
|
*
|
213
|
-
*
|
223
|
+
* Note that the libgit2 library _must_ be initialized using
|
224
|
+
* `git_libgit2_init` before any APIs can be called, including
|
225
|
+
* this one.
|
226
|
+
*
|
227
|
+
* @param[out] out pointer to the repo which will be created or reinitialized
|
214
228
|
* @param path the path to the repository
|
215
229
|
* @param is_bare if true, a Git repository without a working directory is
|
216
230
|
* created at the pointed path. If false, provided path will be
|
@@ -372,7 +386,10 @@ typedef struct {
|
|
372
386
|
#endif
|
373
387
|
} git_repository_init_options;
|
374
388
|
|
389
|
+
/** Current version for the `git_repository_init_options` structure */
|
375
390
|
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
|
391
|
+
|
392
|
+
/** Static constructor for `git_repository_init_options` */
|
376
393
|
#define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
|
377
394
|
|
378
395
|
/**
|
@@ -397,6 +414,10 @@ GIT_EXTERN(int) git_repository_init_options_init(
|
|
397
414
|
* auto-detect the case sensitivity of the file system and if the
|
398
415
|
* file system supports file mode bits correctly.
|
399
416
|
*
|
417
|
+
* Note that the libgit2 library _must_ be initialized using
|
418
|
+
* `git_libgit2_init` before any APIs can be called, including
|
419
|
+
* this one.
|
420
|
+
*
|
400
421
|
* @param out Pointer to the repo which will be created or reinitialized.
|
401
422
|
* @param repo_path The path to the repository.
|
402
423
|
* @param opts Pointer to git_repository_init_options struct.
|
@@ -414,7 +435,7 @@ GIT_EXTERN(int) git_repository_init_ext(
|
|
414
435
|
* `git_reference_free()` must be called when done with it to release the
|
415
436
|
* allocated memory and prevent a leak.
|
416
437
|
*
|
417
|
-
* @param out pointer to the reference which will be retrieved
|
438
|
+
* @param[out] out pointer to the reference which will be retrieved
|
418
439
|
* @param repo a repository object
|
419
440
|
*
|
420
441
|
* @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
|
@@ -503,6 +524,7 @@ typedef enum {
|
|
503
524
|
GIT_REPOSITORY_ITEM_LOGS,
|
504
525
|
GIT_REPOSITORY_ITEM_MODULES,
|
505
526
|
GIT_REPOSITORY_ITEM_WORKTREES,
|
527
|
+
GIT_REPOSITORY_ITEM_WORKTREE_CONFIG,
|
506
528
|
GIT_REPOSITORY_ITEM__LAST
|
507
529
|
} git_repository_item_t;
|
508
530
|
|
@@ -634,7 +656,7 @@ GIT_EXTERN(int) git_repository_config_snapshot(git_config **out, git_repository
|
|
634
656
|
* The ODB must be freed once it's no longer being used by
|
635
657
|
* the user.
|
636
658
|
*
|
637
|
-
* @param out Pointer to store the loaded ODB
|
659
|
+
* @param[out] out Pointer to store the loaded ODB
|
638
660
|
* @param repo A repository object
|
639
661
|
* @return 0, or an error code
|
640
662
|
*/
|
@@ -650,7 +672,7 @@ GIT_EXTERN(int) git_repository_odb(git_odb **out, git_repository *repo);
|
|
650
672
|
* The refdb must be freed once it's no longer being used by
|
651
673
|
* the user.
|
652
674
|
*
|
653
|
-
* @param out Pointer to store the loaded refdb
|
675
|
+
* @param[out] out Pointer to store the loaded refdb
|
654
676
|
* @param repo A repository object
|
655
677
|
* @return 0, or an error code
|
656
678
|
*/
|
@@ -666,7 +688,7 @@ GIT_EXTERN(int) git_repository_refdb(git_refdb **out, git_repository *repo);
|
|
666
688
|
* The index must be freed once it's no longer being used by
|
667
689
|
* the user.
|
668
690
|
*
|
669
|
-
* @param out Pointer to store the loaded index
|
691
|
+
* @param[out] out Pointer to store the loaded index
|
670
692
|
* @param repo A repository object
|
671
693
|
* @return 0, or an error code
|
672
694
|
*/
|
@@ -856,7 +878,9 @@ GIT_EXTERN(int) git_repository_set_head_detached(
|
|
856
878
|
*
|
857
879
|
* See the documentation for `git_repository_set_head_detached()`.
|
858
880
|
*
|
859
|
-
* @
|
881
|
+
* @param repo Repository pointer
|
882
|
+
* @param committish annotated commit to point HEAD to
|
883
|
+
* @return 0 on success, or an error code
|
860
884
|
*/
|
861
885
|
GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
|
862
886
|
git_repository *repo,
|
@@ -949,8 +973,8 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
|
|
949
973
|
* The memory is owned by the repository and must not be freed by the
|
950
974
|
* user.
|
951
975
|
*
|
952
|
-
* @param name where to store the pointer to the name
|
953
|
-
* @param email where to store the pointer to the email
|
976
|
+
* @param[out] name where to store the pointer to the name
|
977
|
+
* @param[out] email where to store the pointer to the email
|
954
978
|
* @param repo the repository
|
955
979
|
* @return 0 or an error code
|
956
980
|
*/
|
@@ -978,6 +1002,18 @@ GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name,
|
|
978
1002
|
*/
|
979
1003
|
GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo);
|
980
1004
|
|
1005
|
+
/**
|
1006
|
+
* Gets the parents of the next commit, given the current repository state.
|
1007
|
+
* Generally, this is the HEAD commit, except when performing a merge, in
|
1008
|
+
* which case it is two or more commits.
|
1009
|
+
*
|
1010
|
+
* @param commits a `git_commitarray` that will contain the commit parents
|
1011
|
+
* @param repo the repository
|
1012
|
+
* @return 0 or an error code
|
1013
|
+
*/
|
1014
|
+
GIT_EXTERN(int) git_repository_commit_parents(git_commitarray *commits, git_repository *repo);
|
1015
|
+
|
981
1016
|
/** @} */
|
982
1017
|
GIT_END_DECL
|
1018
|
+
|
983
1019
|
#endif
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* @file git2/reset.h
|
17
|
-
* @brief
|
17
|
+
* @brief Reset will update the local repository to a prior state
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -75,11 +75,23 @@ GIT_EXTERN(int) git_reset(
|
|
75
75
|
*
|
76
76
|
* See the documentation for `git_reset()`.
|
77
77
|
*
|
78
|
-
* @
|
78
|
+
* @param repo Repository where to perform the reset operation.
|
79
|
+
*
|
80
|
+
* @param target Annotated commit to which the Head should be moved to.
|
81
|
+
* This object must belong to the given `repo`, it will be dereferenced
|
82
|
+
* to a git_commit which oid will be used as the target of the branch.
|
83
|
+
*
|
84
|
+
* @param reset_type Kind of reset operation to perform.
|
85
|
+
*
|
86
|
+
* @param checkout_opts Optional checkout options to be used for a HARD reset.
|
87
|
+
* The checkout_strategy field will be overridden (based on reset_type).
|
88
|
+
* This parameter can be used to propagate notify and progress callbacks.
|
89
|
+
*
|
90
|
+
* @return 0 on success or an error code
|
79
91
|
*/
|
80
92
|
GIT_EXTERN(int) git_reset_from_annotated(
|
81
93
|
git_repository *repo,
|
82
|
-
const git_annotated_commit *
|
94
|
+
const git_annotated_commit *target,
|
83
95
|
git_reset_t reset_type,
|
84
96
|
const git_checkout_options *checkout_opts);
|
85
97
|
|
@@ -108,4 +120,5 @@ GIT_EXTERN(int) git_reset_default(
|
|
108
120
|
|
109
121
|
/** @} */
|
110
122
|
GIT_END_DECL
|
123
|
+
|
111
124
|
#endif
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/revert.h
|
16
|
-
* @brief
|
17
|
-
* @defgroup git_revert
|
16
|
+
* @brief Cherry-pick the inverse of a change to "undo" its effects
|
17
|
+
* @defgroup git_revert Cherry-pick the inverse of a change to "undo" its effects
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -33,8 +33,13 @@ typedef struct {
|
|
33
33
|
git_checkout_options checkout_opts; /**< Options for the checkout */
|
34
34
|
} git_revert_options;
|
35
35
|
|
36
|
+
/** Current version for the `git_revert_options` structure */
|
36
37
|
#define GIT_REVERT_OPTIONS_VERSION 1
|
37
|
-
|
38
|
+
|
39
|
+
/** Static constructor for `git_revert_options` */
|
40
|
+
#define GIT_REVERT_OPTIONS_INIT { \
|
41
|
+
GIT_REVERT_OPTIONS_VERSION, 0, \
|
42
|
+
GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT }
|
38
43
|
|
39
44
|
/**
|
40
45
|
* Initialize git_revert_options structure
|
@@ -87,5 +92,5 @@ GIT_EXTERN(int) git_revert(
|
|
87
92
|
|
88
93
|
/** @} */
|
89
94
|
GIT_END_DECL
|
90
|
-
#endif
|
91
95
|
|
96
|
+
#endif
|
@@ -12,8 +12,8 @@
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @file git2/revparse.h
|
15
|
-
* @brief
|
16
|
-
* @defgroup git_revparse
|
15
|
+
* @brief Parse the textual revision information
|
16
|
+
* @defgroup git_revparse Parse the textual revision information
|
17
17
|
* @ingroup Git
|
18
18
|
* @{
|
19
19
|
*/
|
@@ -107,7 +107,7 @@ GIT_EXTERN(int) git_revparse(
|
|
107
107
|
git_repository *repo,
|
108
108
|
const char *spec);
|
109
109
|
|
110
|
-
|
111
110
|
/** @} */
|
112
111
|
GIT_END_DECL
|
112
|
+
|
113
113
|
#endif
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/revwalk.h
|
16
|
-
* @brief
|
17
|
-
* @defgroup git_revwalk
|
16
|
+
* @brief Traverse (walk) the commit graph (revision history)
|
17
|
+
* @defgroup git_revwalk Traverse (walk) the commit graph (revision history)
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -299,4 +299,5 @@ GIT_EXTERN(int) git_revwalk_add_hide_cb(
|
|
299
299
|
|
300
300
|
/** @} */
|
301
301
|
GIT_END_DECL
|
302
|
+
|
302
303
|
#endif
|
@@ -12,9 +12,13 @@
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @file git2/signature.h
|
15
|
-
* @brief
|
15
|
+
* @brief Signatures are the actor in a repository and when they acted
|
16
16
|
* @defgroup git_signature Git signature creation
|
17
17
|
* @ingroup Git
|
18
|
+
*
|
19
|
+
* Signatures contain the information about the actor (committer or
|
20
|
+
* author) in a repository, and the time that they performed the
|
21
|
+
* commit, or authoring.
|
18
22
|
* @{
|
19
23
|
*/
|
20
24
|
GIT_BEGIN_DECL
|
@@ -48,6 +52,42 @@ GIT_EXTERN(int) git_signature_new(git_signature **out, const char *name, const c
|
|
48
52
|
*/
|
49
53
|
GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const char *email);
|
50
54
|
|
55
|
+
/**
|
56
|
+
* Create a new author and/or committer signatures with default
|
57
|
+
* information based on the configuration and environment variables.
|
58
|
+
*
|
59
|
+
* If `author_out` is set, it will be populated with the author
|
60
|
+
* information. The `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`
|
61
|
+
* environment variables will be honored, and `user.name` and
|
62
|
+
* `user.email` configuration options will be honored if the
|
63
|
+
* environment variables are unset. For timestamps, `GIT_AUTHOR_DATE`
|
64
|
+
* will be used, otherwise the current time will be used.
|
65
|
+
*
|
66
|
+
* If `committer_out` is set, it will be populated with the
|
67
|
+
* committer information. The `GIT_COMMITTER_NAME` and
|
68
|
+
* `GIT_COMMITTER_EMAIL` environment variables will be honored,
|
69
|
+
* and `user.name` and `user.email` configuration options will
|
70
|
+
* be honored if the environment variables are unset. For timestamps,
|
71
|
+
* `GIT_COMMITTER_DATE` will be used, otherwise the current time will
|
72
|
+
* be used.
|
73
|
+
*
|
74
|
+
* If neither `GIT_AUTHOR_DATE` nor `GIT_COMMITTER_DATE` are set,
|
75
|
+
* both timestamps will be set to the same time.
|
76
|
+
*
|
77
|
+
* It will return `GIT_ENOTFOUND` if either the `user.name` or
|
78
|
+
* `user.email` are not set and there is no fallback from an environment
|
79
|
+
* variable. One of `author_out` or `committer_out` must be set.
|
80
|
+
*
|
81
|
+
* @param author_out pointer to set the author signature, or NULL
|
82
|
+
* @param committer_out pointer to set the committer signature, or NULL
|
83
|
+
* @param repo repository pointer
|
84
|
+
* @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
|
85
|
+
*/
|
86
|
+
GIT_EXTERN(int) git_signature_default_from_env(
|
87
|
+
git_signature **author_out,
|
88
|
+
git_signature **committer_out,
|
89
|
+
git_repository *repo);
|
90
|
+
|
51
91
|
/**
|
52
92
|
* Create a new action signature with default user and now timestamp.
|
53
93
|
*
|
@@ -56,6 +96,10 @@ GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const c
|
|
56
96
|
* based on that information. It will return GIT_ENOTFOUND if either the
|
57
97
|
* user.name or user.email are not set.
|
58
98
|
*
|
99
|
+
* Note that these do not examine environment variables, only the
|
100
|
+
* configuration files. Use `git_signature_default_from_env` to
|
101
|
+
* consider the environment variables.
|
102
|
+
*
|
59
103
|
* @param out new signature
|
60
104
|
* @param repo repository pointer
|
61
105
|
* @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
|
@@ -100,4 +144,5 @@ GIT_EXTERN(void) git_signature_free(git_signature *sig);
|
|
100
144
|
|
101
145
|
/** @} */
|
102
146
|
GIT_END_DECL
|
147
|
+
|
103
148
|
#endif
|
@@ -13,8 +13,13 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/stash.h
|
16
|
-
* @brief
|
16
|
+
* @brief Stashes stores some uncommitted state in the repository
|
17
17
|
* @ingroup Git
|
18
|
+
*
|
19
|
+
* Stashes stores some uncommitted state in the repository; generally
|
20
|
+
* this allows a user to stash some changes so that they can restore
|
21
|
+
* the working directory to an unmodified state. This can allow a
|
22
|
+
* developer to work on two different changes in parallel.
|
18
23
|
* @{
|
19
24
|
*/
|
20
25
|
GIT_BEGIN_DECL
|
@@ -94,7 +99,10 @@ typedef struct git_stash_save_options {
|
|
94
99
|
git_strarray paths;
|
95
100
|
} git_stash_save_options;
|
96
101
|
|
102
|
+
/** Current version for the `git_stash_save_options` structure */
|
97
103
|
#define GIT_STASH_SAVE_OPTIONS_VERSION 1
|
104
|
+
|
105
|
+
/** Static constructor for `git_stash_save_options` */
|
98
106
|
#define GIT_STASH_SAVE_OPTIONS_INIT { GIT_STASH_SAVE_OPTIONS_VERSION }
|
99
107
|
|
100
108
|
/**
|
@@ -165,6 +173,10 @@ typedef enum {
|
|
165
173
|
* Stash application progress notification function.
|
166
174
|
* Return 0 to continue processing, or a negative value to
|
167
175
|
* abort the stash application.
|
176
|
+
*
|
177
|
+
* @param progress the progress information
|
178
|
+
* @param payload the user-specified payload to the apply function
|
179
|
+
* @return 0 on success, -1 on error
|
168
180
|
*/
|
169
181
|
typedef int GIT_CALLBACK(git_stash_apply_progress_cb)(
|
170
182
|
git_stash_apply_progress_t progress,
|
@@ -191,7 +203,10 @@ typedef struct git_stash_apply_options {
|
|
191
203
|
void *progress_payload;
|
192
204
|
} git_stash_apply_options;
|
193
205
|
|
206
|
+
/** Current version for the `git_stash_apply_options` structure */
|
194
207
|
#define GIT_STASH_APPLY_OPTIONS_VERSION 1
|
208
|
+
|
209
|
+
/** Static constructor for `git_stash_apply_options` */
|
195
210
|
#define GIT_STASH_APPLY_OPTIONS_INIT { \
|
196
211
|
GIT_STASH_APPLY_OPTIONS_VERSION, \
|
197
212
|
GIT_STASH_APPLY_DEFAULT, \
|
@@ -225,8 +240,6 @@ GIT_EXTERN(int) git_stash_apply_options_init(
|
|
225
240
|
* GIT_EMERGECONFLICT and both the working directory and index will be left
|
226
241
|
* unmodified.
|
227
242
|
*
|
228
|
-
* Note that a minimum checkout strategy of `GIT_CHECKOUT_SAFE` is implied.
|
229
|
-
*
|
230
243
|
* @param repo The owning repository.
|
231
244
|
* @param index The position within the stash list. 0 points to the
|
232
245
|
* most recent stashed state.
|
@@ -311,4 +324,5 @@ GIT_EXTERN(int) git_stash_pop(
|
|
311
324
|
|
312
325
|
/** @} */
|
313
326
|
GIT_END_DECL
|
327
|
+
|
314
328
|
#endif
|