rugged 1.1.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/README.md +1 -1
- data/ext/rugged/extconf.rb +2 -2
- data/ext/rugged/rugged.c +7 -4
- data/ext/rugged/rugged_config.c +7 -2
- data/ext/rugged/rugged_object.c +1 -1
- data/ext/rugged/rugged_remote.c +17 -0
- data/ext/rugged/rugged_repo.c +3 -3
- data/lib/rugged/repository.rb +2 -2
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +103 -271
- data/vendor/libgit2/COPYING +149 -24
- data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
- data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
- data/vendor/libgit2/cmake/FindCoreFoundation.cmake +13 -13
- data/vendor/libgit2/cmake/FindGSSAPI.cmake +171 -287
- data/vendor/libgit2/cmake/FindGSSFramework.cmake +13 -13
- data/vendor/libgit2/cmake/{FindHTTP_Parser.cmake → FindHTTPParser.cmake} +17 -17
- data/vendor/libgit2/cmake/FindIconv.cmake +27 -27
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
- data/vendor/libgit2/cmake/FindPCRE.cmake +13 -13
- data/vendor/libgit2/cmake/FindPCRE2.cmake +12 -12
- data/vendor/libgit2/cmake/FindPkgLibraries.cmake +19 -19
- data/vendor/libgit2/cmake/FindSecurity.cmake +14 -14
- data/vendor/libgit2/cmake/FindStatNsec.cmake +12 -18
- data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
- data/vendor/libgit2/cmake/FindmbedTLS.cmake +63 -70
- data/vendor/libgit2/cmake/IdeSplitSources.cmake +18 -18
- data/vendor/libgit2/cmake/PkgBuildConfig.cmake +60 -60
- data/vendor/libgit2/cmake/SanitizeBool.cmake +20 -20
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +37 -37
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +19 -0
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +100 -96
- data/vendor/libgit2/cmake/SelectHashes.cmake +39 -48
- data/vendor/libgit2/cmake/SelectRegex.cmake +51 -0
- data/vendor/libgit2/cmake/SelectSSH.cmake +41 -0
- data/vendor/libgit2/cmake/SelectWinHTTP.cmake +17 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +34 -0
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +32 -20
- data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +154 -122
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +17 -13
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +17 -4
- data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +88 -88
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
- data/vendor/libgit2/include/git2/apply.h +16 -2
- data/vendor/libgit2/include/git2/attr.h +106 -2
- data/vendor/libgit2/include/git2/blame.h +97 -43
- data/vendor/libgit2/include/git2/blob.h +33 -2
- data/vendor/libgit2/include/git2/branch.h +27 -0
- data/vendor/libgit2/include/git2/buffer.h +18 -78
- data/vendor/libgit2/include/git2/cert.h +43 -6
- data/vendor/libgit2/include/git2/checkout.h +32 -13
- data/vendor/libgit2/include/git2/clone.h +4 -4
- data/vendor/libgit2/include/git2/commit.h +37 -19
- data/vendor/libgit2/include/git2/common.h +46 -5
- data/vendor/libgit2/include/git2/config.h +19 -3
- data/vendor/libgit2/include/git2/credential.h +2 -1
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +326 -6
- data/vendor/libgit2/include/git2/describe.h +7 -2
- data/vendor/libgit2/include/git2/diff.h +50 -121
- data/vendor/libgit2/include/git2/email.h +127 -0
- data/vendor/libgit2/include/git2/errors.h +7 -6
- data/vendor/libgit2/include/git2/filter.h +69 -18
- data/vendor/libgit2/include/git2/graph.h +21 -2
- data/vendor/libgit2/include/git2/ignore.h +1 -1
- data/vendor/libgit2/include/git2/index.h +13 -7
- data/vendor/libgit2/include/git2/indexer.h +19 -0
- data/vendor/libgit2/include/git2/merge.h +23 -3
- data/vendor/libgit2/include/git2/message.h +2 -0
- data/vendor/libgit2/include/git2/notes.h +2 -2
- data/vendor/libgit2/include/git2/object.h +23 -0
- data/vendor/libgit2/include/git2/odb.h +65 -6
- data/vendor/libgit2/include/git2/odb_backend.h +1 -1
- data/vendor/libgit2/include/git2/oidarray.h +5 -8
- data/vendor/libgit2/include/git2/pack.h +24 -8
- data/vendor/libgit2/include/git2/patch.h +16 -0
- data/vendor/libgit2/include/git2/pathspec.h +1 -1
- data/vendor/libgit2/include/git2/proxy.h +1 -1
- data/vendor/libgit2/include/git2/rebase.h +34 -2
- data/vendor/libgit2/include/git2/refdb.h +3 -0
- data/vendor/libgit2/include/git2/reflog.h +1 -1
- data/vendor/libgit2/include/git2/refs.h +8 -4
- data/vendor/libgit2/include/git2/remote.h +246 -46
- data/vendor/libgit2/include/git2/repository.h +25 -18
- data/vendor/libgit2/include/git2/reset.h +2 -2
- data/vendor/libgit2/include/git2/revparse.h +5 -5
- data/vendor/libgit2/include/git2/revwalk.h +4 -1
- data/vendor/libgit2/include/git2/signature.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +4 -4
- data/vendor/libgit2/include/git2/status.h +124 -62
- data/vendor/libgit2/include/git2/stdint.h +3 -3
- data/vendor/libgit2/include/git2/submodule.h +16 -2
- data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
- data/vendor/libgit2/include/git2/sys/email.h +45 -0
- data/vendor/libgit2/include/git2/sys/filter.h +49 -28
- data/vendor/libgit2/include/git2/sys/midx.h +74 -0
- data/vendor/libgit2/include/git2/sys/odb_backend.h +9 -5
- data/vendor/libgit2/include/git2/sys/remote.h +31 -0
- data/vendor/libgit2/include/git2/sys/stream.h +1 -1
- data/vendor/libgit2/include/git2/sys/transport.h +26 -34
- data/vendor/libgit2/include/git2/tag.h +13 -0
- data/vendor/libgit2/include/git2/tree.h +4 -17
- data/vendor/libgit2/include/git2/types.h +16 -7
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +13 -2
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +192 -290
- data/vendor/libgit2/src/alloc.c +21 -8
- data/vendor/libgit2/src/allocators/failalloc.c +92 -0
- data/vendor/libgit2/src/allocators/failalloc.h +23 -0
- data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
- data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
- data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
- data/vendor/libgit2/src/annotated_commit.c +21 -9
- data/vendor/libgit2/src/annotated_commit.h +1 -1
- data/vendor/libgit2/src/apply.c +34 -25
- data/vendor/libgit2/src/apply.h +2 -2
- data/vendor/libgit2/src/array.h +11 -11
- data/vendor/libgit2/src/attr.c +204 -82
- data/vendor/libgit2/src/attr_file.c +105 -52
- data/vendor/libgit2/src/attr_file.h +36 -15
- data/vendor/libgit2/src/attrcache.c +55 -45
- data/vendor/libgit2/src/attrcache.h +4 -5
- data/vendor/libgit2/src/blame.c +15 -9
- data/vendor/libgit2/src/blame_git.c +2 -2
- data/vendor/libgit2/src/blob.c +76 -52
- data/vendor/libgit2/src/blob.h +1 -1
- data/vendor/libgit2/src/branch.c +203 -110
- data/vendor/libgit2/src/branch.h +15 -3
- data/vendor/libgit2/src/buf.c +126 -0
- data/vendor/libgit2/src/buf.h +50 -0
- data/vendor/libgit2/src/cache.c +2 -2
- data/vendor/libgit2/src/cache.h +7 -7
- data/vendor/libgit2/src/cc-compat.h +11 -9
- data/vendor/libgit2/src/checkout.c +118 -91
- data/vendor/libgit2/src/cherrypick.c +16 -12
- data/vendor/libgit2/src/clone.c +97 -103
- data/vendor/libgit2/src/commit.c +167 -84
- data/vendor/libgit2/src/commit.h +24 -1
- data/vendor/libgit2/src/commit_graph.c +1224 -0
- data/vendor/libgit2/src/commit_graph.h +169 -0
- data/vendor/libgit2/src/commit_list.c +48 -3
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +35 -5
- data/vendor/libgit2/src/config.c +119 -64
- data/vendor/libgit2/src/config.h +15 -2
- data/vendor/libgit2/src/config_cache.c +5 -3
- data/vendor/libgit2/src/config_file.c +120 -100
- data/vendor/libgit2/src/config_mem.c +9 -9
- data/vendor/libgit2/src/config_parse.c +29 -27
- data/vendor/libgit2/src/crlf.c +36 -23
- data/vendor/libgit2/src/date.c +13 -19
- data/vendor/libgit2/src/date.h +33 -0
- data/vendor/libgit2/src/delta.c +1 -1
- data/vendor/libgit2/src/describe.c +32 -21
- data/vendor/libgit2/src/diff.c +71 -183
- data/vendor/libgit2/src/diff.h +2 -4
- data/vendor/libgit2/src/diff_driver.c +53 -51
- data/vendor/libgit2/src/diff_driver.h +3 -3
- data/vendor/libgit2/src/diff_file.c +31 -26
- data/vendor/libgit2/src/diff_generate.c +76 -23
- data/vendor/libgit2/src/diff_generate.h +5 -3
- data/vendor/libgit2/src/diff_print.c +120 -95
- data/vendor/libgit2/src/diff_stats.c +47 -34
- data/vendor/libgit2/src/{message.h → diff_stats.h} +7 -6
- data/vendor/libgit2/src/diff_tform.c +18 -16
- data/vendor/libgit2/src/diff_xdiff.c +7 -10
- data/vendor/libgit2/src/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/email.c +315 -0
- data/vendor/libgit2/src/email.h +25 -0
- data/vendor/libgit2/src/errors.c +37 -32
- data/vendor/libgit2/src/features.h.in +11 -2
- data/vendor/libgit2/src/fetch.c +77 -26
- data/vendor/libgit2/src/fetch.h +1 -1
- data/vendor/libgit2/src/fetchhead.c +27 -23
- data/vendor/libgit2/src/filebuf.c +36 -34
- data/vendor/libgit2/src/filebuf.h +1 -1
- data/vendor/libgit2/src/filter.c +278 -132
- data/vendor/libgit2/src/filter.h +46 -6
- data/vendor/libgit2/src/fs_path.c +2071 -0
- data/vendor/libgit2/src/fs_path.h +772 -0
- data/vendor/libgit2/src/futils.c +96 -90
- data/vendor/libgit2/src/futils.h +27 -15
- data/vendor/libgit2/src/graph.c +64 -9
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +5 -5
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +5 -5
- data/vendor/libgit2/src/hash/sha1/generic.c +2 -2
- data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +13 -13
- data/vendor/libgit2/src/hash/sha1/openssl.c +5 -5
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +9 -11
- data/vendor/libgit2/src/hash/sha1/win32.c +21 -17
- data/vendor/libgit2/src/hash/sha1.h +3 -1
- data/vendor/libgit2/src/hash.c +71 -36
- data/vendor/libgit2/src/hash.h +13 -13
- data/vendor/libgit2/src/hashsig.c +23 -10
- data/vendor/libgit2/src/ident.c +30 -20
- data/vendor/libgit2/src/ignore.c +63 -46
- data/vendor/libgit2/src/ignore.h +2 -2
- data/vendor/libgit2/src/index.c +184 -149
- data/vendor/libgit2/src/index.h +7 -4
- data/vendor/libgit2/src/indexer.c +143 -89
- data/vendor/libgit2/src/integer.h +64 -2
- data/vendor/libgit2/src/iterator.c +93 -73
- data/vendor/libgit2/src/iterator.h +6 -6
- data/vendor/libgit2/src/khash.h +3 -12
- data/vendor/libgit2/src/{settings.c → libgit2.c} +165 -56
- data/vendor/libgit2/src/libgit2.h +15 -0
- data/vendor/libgit2/src/mailmap.c +60 -45
- data/vendor/libgit2/src/map.h +3 -3
- data/vendor/libgit2/src/merge.c +104 -61
- data/vendor/libgit2/src/merge.h +3 -15
- data/vendor/libgit2/src/merge_driver.c +21 -15
- data/vendor/libgit2/src/merge_file.c +24 -6
- data/vendor/libgit2/src/message.c +21 -8
- data/vendor/libgit2/src/midx.c +501 -18
- data/vendor/libgit2/src/midx.h +29 -2
- data/vendor/libgit2/src/mwindow.c +103 -59
- data/vendor/libgit2/src/mwindow.h +3 -3
- data/vendor/libgit2/src/net.c +405 -71
- data/vendor/libgit2/src/net.h +26 -5
- data/vendor/libgit2/src/netops.c +7 -5
- data/vendor/libgit2/src/netops.h +3 -3
- data/vendor/libgit2/src/notes.c +40 -49
- data/vendor/libgit2/src/object.c +68 -20
- data/vendor/libgit2/src/object.h +1 -1
- data/vendor/libgit2/src/odb.c +320 -80
- data/vendor/libgit2/src/odb.h +17 -3
- data/vendor/libgit2/src/odb_loose.c +96 -86
- data/vendor/libgit2/src/odb_mempack.c +19 -6
- data/vendor/libgit2/src/odb_pack.c +402 -125
- data/vendor/libgit2/src/oid.c +16 -8
- data/vendor/libgit2/src/oid.h +15 -0
- data/vendor/libgit2/src/oidarray.c +10 -1
- data/vendor/libgit2/src/pack-objects.c +90 -69
- data/vendor/libgit2/src/pack-objects.h +11 -6
- data/vendor/libgit2/src/pack.c +337 -127
- data/vendor/libgit2/src/pack.h +25 -7
- data/vendor/libgit2/src/patch.c +17 -10
- data/vendor/libgit2/src/patch.h +1 -0
- data/vendor/libgit2/src/patch_generate.c +29 -13
- data/vendor/libgit2/src/patch_generate.h +5 -5
- data/vendor/libgit2/src/patch_parse.c +26 -25
- data/vendor/libgit2/src/path.c +86 -1768
- data/vendor/libgit2/src/path.h +39 -635
- data/vendor/libgit2/src/pathspec.c +12 -12
- data/vendor/libgit2/src/pathspec.h +2 -2
- data/vendor/libgit2/src/pool.c +13 -7
- data/vendor/libgit2/src/posix.c +14 -6
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/pqueue.h +1 -1
- data/vendor/libgit2/src/proxy.c +4 -1
- data/vendor/libgit2/src/proxy.h +1 -1
- data/vendor/libgit2/src/push.c +30 -35
- data/vendor/libgit2/src/push.h +4 -16
- data/vendor/libgit2/src/rand.c +226 -0
- data/vendor/libgit2/src/rand.h +37 -0
- data/vendor/libgit2/src/reader.c +18 -14
- data/vendor/libgit2/src/reader.h +2 -2
- data/vendor/libgit2/src/rebase.c +177 -132
- data/vendor/libgit2/src/refdb.c +30 -13
- data/vendor/libgit2/src/refdb_fs.c +548 -222
- data/vendor/libgit2/src/reflog.c +19 -14
- data/vendor/libgit2/src/refs.c +107 -72
- data/vendor/libgit2/src/refs.h +2 -2
- data/vendor/libgit2/src/refspec.c +53 -38
- data/vendor/libgit2/src/refspec.h +5 -2
- data/vendor/libgit2/src/regexp.c +1 -1
- data/vendor/libgit2/src/remote.c +960 -486
- data/vendor/libgit2/src/remote.h +16 -10
- data/vendor/libgit2/src/repository.c +702 -422
- data/vendor/libgit2/src/repository.h +26 -8
- data/vendor/libgit2/src/reset.c +16 -12
- data/vendor/libgit2/src/revert.c +16 -12
- data/vendor/libgit2/src/revparse.c +66 -48
- data/vendor/libgit2/src/revwalk.c +39 -22
- data/vendor/libgit2/src/runtime.c +162 -0
- data/vendor/libgit2/src/runtime.h +62 -0
- data/vendor/libgit2/src/settings.h +11 -0
- data/vendor/libgit2/src/signature.c +18 -11
- data/vendor/libgit2/src/signature.h +1 -1
- data/vendor/libgit2/src/sortedcache.c +1 -1
- data/vendor/libgit2/src/sortedcache.h +10 -8
- data/vendor/libgit2/src/stash.c +39 -38
- data/vendor/libgit2/src/status.c +11 -5
- data/vendor/libgit2/src/{buffer.c → str.c} +459 -136
- data/vendor/libgit2/src/str.h +357 -0
- data/vendor/libgit2/src/strarray.c +2 -1
- data/vendor/libgit2/src/streams/mbedtls.c +22 -23
- data/vendor/libgit2/src/streams/mbedtls.h +1 -1
- data/vendor/libgit2/src/streams/openssl.c +101 -201
- data/vendor/libgit2/src/streams/openssl.h +9 -1
- data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
- data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
- data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
- data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
- data/vendor/libgit2/src/streams/registry.c +5 -6
- data/vendor/libgit2/src/streams/socket.c +6 -2
- data/vendor/libgit2/src/streams/stransport.c +6 -3
- data/vendor/libgit2/src/streams/tls.c +5 -3
- data/vendor/libgit2/src/submodule.c +290 -212
- data/vendor/libgit2/src/submodule.h +10 -10
- data/vendor/libgit2/src/sysdir.c +70 -56
- data/vendor/libgit2/src/sysdir.h +15 -10
- data/vendor/libgit2/src/tag.c +72 -34
- data/vendor/libgit2/src/thread.c +140 -0
- data/vendor/libgit2/src/thread.h +479 -0
- data/vendor/libgit2/src/threadstate.c +84 -0
- data/vendor/libgit2/src/threadstate.h +24 -0
- data/vendor/libgit2/src/trace.c +3 -16
- data/vendor/libgit2/src/trace.h +17 -30
- data/vendor/libgit2/src/trailer.c +2 -2
- data/vendor/libgit2/src/transaction.c +20 -9
- data/vendor/libgit2/src/transport.c +13 -13
- data/vendor/libgit2/src/transports/auth.c +8 -10
- data/vendor/libgit2/src/transports/auth.h +2 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +23 -17
- data/vendor/libgit2/src/transports/auth_ntlm.c +20 -16
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -1
- data/vendor/libgit2/src/transports/credential.c +15 -7
- data/vendor/libgit2/src/transports/git.c +10 -14
- data/vendor/libgit2/src/transports/http.c +56 -34
- data/vendor/libgit2/src/transports/http.h +3 -3
- data/vendor/libgit2/src/transports/httpclient.c +106 -79
- data/vendor/libgit2/src/transports/httpclient.h +1 -1
- data/vendor/libgit2/src/transports/local.c +127 -119
- data/vendor/libgit2/src/transports/smart.c +61 -144
- data/vendor/libgit2/src/transports/smart.h +26 -32
- data/vendor/libgit2/src/transports/smart_pkt.c +33 -33
- data/vendor/libgit2/src/transports/smart_protocol.c +68 -44
- data/vendor/libgit2/src/transports/ssh.c +100 -131
- data/vendor/libgit2/src/transports/winhttp.c +86 -82
- data/vendor/libgit2/src/tree-cache.c +5 -5
- data/vendor/libgit2/src/tree-cache.h +2 -2
- data/vendor/libgit2/src/tree.c +150 -116
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/tsort.c +0 -2
- data/vendor/libgit2/src/unix/map.c +3 -3
- data/vendor/libgit2/src/unix/posix.h +1 -4
- data/vendor/libgit2/src/unix/pthread.h +2 -1
- data/vendor/libgit2/src/unix/realpath.c +0 -2
- data/vendor/libgit2/src/utf8.c +150 -0
- data/vendor/libgit2/src/utf8.h +52 -0
- data/vendor/libgit2/src/util.c +68 -144
- data/vendor/libgit2/src/util.h +36 -68
- data/vendor/libgit2/src/vector.c +23 -19
- data/vendor/libgit2/src/vector.h +5 -3
- data/vendor/libgit2/src/win32/findfile.c +172 -114
- data/vendor/libgit2/src/win32/findfile.h +7 -4
- data/vendor/libgit2/src/win32/map.c +1 -1
- data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
- data/vendor/libgit2/src/win32/path_w32.c +162 -33
- data/vendor/libgit2/src/win32/path_w32.h +2 -1
- data/vendor/libgit2/src/win32/posix.h +6 -7
- data/vendor/libgit2/src/win32/posix_w32.c +26 -33
- data/vendor/libgit2/src/win32/precompiled.h +0 -1
- data/vendor/libgit2/src/win32/reparse.h +4 -4
- data/vendor/libgit2/src/win32/thread.c +24 -15
- data/vendor/libgit2/src/win32/thread.h +1 -1
- data/vendor/libgit2/src/win32/w32_buffer.c +5 -6
- data/vendor/libgit2/src/win32/w32_buffer.h +2 -3
- data/vendor/libgit2/src/win32/w32_common.h +18 -9
- data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
- data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
- data/vendor/libgit2/src/win32/w32_util.h +6 -6
- data/vendor/libgit2/src/worktree.c +138 -105
- data/vendor/libgit2/src/worktree.h +1 -1
- data/vendor/libgit2/src/xdiff/git-xdiff.h +53 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +15 -15
- data/vendor/libgit2/src/xdiff/xdiffi.c +134 -108
- data/vendor/libgit2/src/xdiff/xemit.c +23 -7
- data/vendor/libgit2/src/xdiff/xhistogram.c +87 -78
- data/vendor/libgit2/src/xdiff/xinclude.h +1 -12
- data/vendor/libgit2/src/xdiff/xmerge.c +104 -117
- data/vendor/libgit2/src/xdiff/xpatience.c +6 -17
- data/vendor/libgit2/src/xdiff/xprepare.c +15 -20
- data/vendor/libgit2/src/xdiff/xutils.c +18 -7
- data/vendor/libgit2/src/zstream.c +6 -6
- data/vendor/libgit2/src/zstream.h +4 -4
- metadata +60 -24
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/buf_text.c +0 -316
- data/vendor/libgit2/src/buf_text.h +0 -122
- data/vendor/libgit2/src/buffer.h +0 -222
- data/vendor/libgit2/src/global.c +0 -363
- data/vendor/libgit2/src/global.h +0 -41
- data/vendor/libgit2/src/thread-utils.c +0 -58
- data/vendor/libgit2/src/thread-utils.h +0 -369
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
- data/vendor/libgit2/src/win32/w32_stack.c +0 -188
- data/vendor/libgit2/src/win32/w32_stack.h +0 -140
@@ -57,7 +57,7 @@ GIT_EXTERN(int) git_reference_name_to_id(
|
|
57
57
|
/**
|
58
58
|
* Lookup a reference by DWIMing its short name
|
59
59
|
*
|
60
|
-
* Apply the git
|
60
|
+
* Apply the git precedence rules to the given shorthand to determine
|
61
61
|
* which reference the user is referring to.
|
62
62
|
*
|
63
63
|
* @param out pointer in which to store the reference
|
@@ -97,6 +97,9 @@ GIT_EXTERN(int) git_reference_dwim(git_reference **out, git_repository *repo, co
|
|
97
97
|
* of updating does not match the one passed through `current_value`
|
98
98
|
* (i.e. if the ref has changed since the user read it).
|
99
99
|
*
|
100
|
+
* If `current_value` is all zeros, this function will return GIT_EMODIFIED
|
101
|
+
* if the ref already exists.
|
102
|
+
*
|
100
103
|
* @param out Pointer to the newly created reference
|
101
104
|
* @param repo Repository where that reference will live
|
102
105
|
* @param name The name of the reference
|
@@ -683,7 +686,7 @@ typedef enum {
|
|
683
686
|
* so the `ONELEVEL` naming rules aren't enforced and 'master'
|
684
687
|
* becomes a valid name.
|
685
688
|
*/
|
686
|
-
GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND = (1u << 2)
|
689
|
+
GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND = (1u << 2)
|
687
690
|
} git_reference_format_t;
|
688
691
|
|
689
692
|
/**
|
@@ -743,10 +746,11 @@ GIT_EXTERN(int) git_reference_peel(
|
|
743
746
|
* the characters '~', '^', ':', '\\', '?', '[', and '*', and the
|
744
747
|
* sequences ".." and "@{" which have special meaning to revparse.
|
745
748
|
*
|
749
|
+
* @param valid output pointer to set with validity of given reference name
|
746
750
|
* @param refname name to be checked.
|
747
|
-
* @return
|
751
|
+
* @return 0 on success or an error code
|
748
752
|
*/
|
749
|
-
GIT_EXTERN(int)
|
753
|
+
GIT_EXTERN(int) git_reference_name_is_valid(int *valid, const char *refname);
|
750
754
|
|
751
755
|
/**
|
752
756
|
* Get the reference's short name
|
@@ -41,6 +41,30 @@ GIT_EXTERN(int) git_remote_create(
|
|
41
41
|
const char *name,
|
42
42
|
const char *url);
|
43
43
|
|
44
|
+
/**
|
45
|
+
* Remote redirection settings; whether redirects to another host
|
46
|
+
* are permitted. By default, git will follow a redirect on the
|
47
|
+
* initial request (`/info/refs`), but not subsequent requests.
|
48
|
+
*/
|
49
|
+
typedef enum {
|
50
|
+
/**
|
51
|
+
* Do not follow any off-site redirects at any stage of
|
52
|
+
* the fetch or push.
|
53
|
+
*/
|
54
|
+
GIT_REMOTE_REDIRECT_NONE = (1 << 0),
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Allow off-site redirects only upon the initial request.
|
58
|
+
* This is the default.
|
59
|
+
*/
|
60
|
+
GIT_REMOTE_REDIRECT_INITIAL = (1 << 1),
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Allow redirects at any stage in the fetch or push.
|
64
|
+
*/
|
65
|
+
GIT_REMOTE_REDIRECT_ALL = (1 << 2)
|
66
|
+
} git_remote_redirect_t;
|
67
|
+
|
44
68
|
/**
|
45
69
|
* Remote creation options flags
|
46
70
|
*/
|
@@ -49,7 +73,7 @@ typedef enum {
|
|
49
73
|
GIT_REMOTE_CREATE_SKIP_INSTEADOF = (1 << 0),
|
50
74
|
|
51
75
|
/** Don't build a fetchspec from the name if none is set */
|
52
|
-
GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC = (1 << 1)
|
76
|
+
GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC = (1 << 1)
|
53
77
|
} git_remote_create_flags;
|
54
78
|
|
55
79
|
/**
|
@@ -212,7 +236,8 @@ GIT_EXTERN(const char *) git_remote_name(const git_remote *remote);
|
|
212
236
|
* Get the remote's url
|
213
237
|
*
|
214
238
|
* If url.*.insteadOf has been configured for this URL, it will
|
215
|
-
* return the modified URL.
|
239
|
+
* return the modified URL. If `git_remote_set_instance_pushurl`
|
240
|
+
* has been called for this remote, then that URL will be returned.
|
216
241
|
*
|
217
242
|
* @param remote the remote
|
218
243
|
* @return a pointer to the url
|
@@ -220,10 +245,11 @@ GIT_EXTERN(const char *) git_remote_name(const git_remote *remote);
|
|
220
245
|
GIT_EXTERN(const char *) git_remote_url(const git_remote *remote);
|
221
246
|
|
222
247
|
/**
|
223
|
-
* Get the remote's url for pushing
|
248
|
+
* Get the remote's url for pushing.
|
224
249
|
*
|
225
250
|
* If url.*.pushInsteadOf has been configured for this URL, it
|
226
|
-
* will return the modified URL.
|
251
|
+
* will return the modified URL. If `git_remote_set_instance_pushurl`
|
252
|
+
* has been called for this remote, then that URL will be returned.
|
227
253
|
*
|
228
254
|
* @param remote the remote
|
229
255
|
* @return a pointer to the url or NULL if no special url for pushing is set
|
@@ -241,7 +267,7 @@ GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote);
|
|
241
267
|
* @param url the url to set
|
242
268
|
* @return 0 or an error value
|
243
269
|
*/
|
244
|
-
GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, const char*
|
270
|
+
GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, const char *url);
|
245
271
|
|
246
272
|
/**
|
247
273
|
* Set the remote's url for pushing in the configuration.
|
@@ -253,8 +279,29 @@ GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, con
|
|
253
279
|
* @param repo the repository in which to perform the change
|
254
280
|
* @param remote the remote's name
|
255
281
|
* @param url the url to set
|
282
|
+
* @return 0, or an error code
|
283
|
+
*/
|
284
|
+
GIT_EXTERN(int) git_remote_set_pushurl(git_repository *repo, const char *remote, const char *url);
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Set the url for this particular url instance. The URL in the
|
288
|
+
* configuration will be ignored, and will not be changed.
|
289
|
+
*
|
290
|
+
* @param remote the remote's name
|
291
|
+
* @param url the url to set
|
292
|
+
* @return 0 or an error value
|
293
|
+
*/
|
294
|
+
GIT_EXTERN(int) git_remote_set_instance_url(git_remote *remote, const char *url);
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Set the push url for this particular url instance. The URL in the
|
298
|
+
* configuration will be ignored, and will not be changed.
|
299
|
+
*
|
300
|
+
* @param remote the remote's name
|
301
|
+
* @param url the url to set
|
302
|
+
* @return 0 or an error value
|
256
303
|
*/
|
257
|
-
GIT_EXTERN(int)
|
304
|
+
GIT_EXTERN(int) git_remote_set_instance_pushurl(git_remote *remote, const char *url);
|
258
305
|
|
259
306
|
/**
|
260
307
|
* Add a fetch refspec to the remote's configuration
|
@@ -277,6 +324,7 @@ GIT_EXTERN(int) git_remote_add_fetch(git_repository *repo, const char *remote, c
|
|
277
324
|
*
|
278
325
|
* @param array pointer to the array in which to store the strings
|
279
326
|
* @param remote the remote to query
|
327
|
+
* @return 0 or an error code.
|
280
328
|
*/
|
281
329
|
GIT_EXTERN(int) git_remote_get_fetch_refspecs(git_strarray *array, const git_remote *remote);
|
282
330
|
|
@@ -301,6 +349,7 @@ GIT_EXTERN(int) git_remote_add_push(git_repository *repo, const char *remote, co
|
|
301
349
|
*
|
302
350
|
* @param array pointer to the array in which to store the strings
|
303
351
|
* @param remote the remote to query
|
352
|
+
* @return 0 or an error code.
|
304
353
|
*/
|
305
354
|
GIT_EXTERN(int) git_remote_get_push_refspecs(git_strarray *array, const git_remote *remote);
|
306
355
|
|
@@ -321,23 +370,6 @@ GIT_EXTERN(size_t) git_remote_refspec_count(const git_remote *remote);
|
|
321
370
|
*/
|
322
371
|
GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote, size_t n);
|
323
372
|
|
324
|
-
/**
|
325
|
-
* Open a connection to a remote
|
326
|
-
*
|
327
|
-
* The transport is selected based on the URL. The direction argument
|
328
|
-
* is due to a limitation of the git protocol (over TCP or SSH) which
|
329
|
-
* starts up a specific binary which can only do the one or the other.
|
330
|
-
*
|
331
|
-
* @param remote the remote to connect to
|
332
|
-
* @param direction GIT_DIRECTION_FETCH if you want to fetch or
|
333
|
-
* GIT_DIRECTION_PUSH if you want to push
|
334
|
-
* @param callbacks the callbacks to use for this connection
|
335
|
-
* @param proxy_opts proxy settings
|
336
|
-
* @param custom_headers extra HTTP headers to use in this connection
|
337
|
-
* @return 0 or an error code
|
338
|
-
*/
|
339
|
-
GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_proxy_options *proxy_opts, const git_strarray *custom_headers);
|
340
|
-
|
341
373
|
/**
|
342
374
|
* Get the remote repository's reference advertisement list
|
343
375
|
*
|
@@ -420,7 +452,7 @@ GIT_EXTERN(int) git_remote_list(git_strarray *out, git_repository *repo);
|
|
420
452
|
typedef enum git_remote_completion_t {
|
421
453
|
GIT_REMOTE_COMPLETION_DOWNLOAD,
|
422
454
|
GIT_REMOTE_COMPLETION_INDEXING,
|
423
|
-
GIT_REMOTE_COMPLETION_ERROR
|
455
|
+
GIT_REMOTE_COMPLETION_ERROR
|
424
456
|
} git_remote_completion_t;
|
425
457
|
|
426
458
|
/** Push network progress notification function */
|
@@ -428,7 +460,7 @@ typedef int GIT_CALLBACK(git_push_transfer_progress_cb)(
|
|
428
460
|
unsigned int current,
|
429
461
|
unsigned int total,
|
430
462
|
size_t bytes,
|
431
|
-
void*
|
463
|
+
void *payload);
|
432
464
|
|
433
465
|
/**
|
434
466
|
* Represents an update which will be performed on the remote during push
|
@@ -476,6 +508,7 @@ typedef int GIT_CALLBACK(git_push_negotiation)(const git_push_update **updates,
|
|
476
508
|
*/
|
477
509
|
typedef int GIT_CALLBACK(git_push_update_reference_cb)(const char *refname, const char *status, void *data);
|
478
510
|
|
511
|
+
#ifndef GIT_DEPRECATE_HARD
|
479
512
|
/**
|
480
513
|
* Callback to resolve URLs before connecting to remote
|
481
514
|
*
|
@@ -487,8 +520,22 @@ typedef int GIT_CALLBACK(git_push_update_reference_cb)(const char *refname, cons
|
|
487
520
|
* @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
|
488
521
|
* @param payload Payload provided by the caller
|
489
522
|
* @return 0 on success, GIT_PASSTHROUGH or an error
|
523
|
+
* @deprecated Use `git_remote_set_instance_url`
|
490
524
|
*/
|
491
525
|
typedef int GIT_CALLBACK(git_url_resolve_cb)(git_buf *url_resolved, const char *url, int direction, void *payload);
|
526
|
+
#endif
|
527
|
+
|
528
|
+
/**
|
529
|
+
* Callback invoked immediately before we attempt to connect to the
|
530
|
+
* given url. Callers may change the URL before the connection by
|
531
|
+
* calling `git_remote_set_instance_url` in the callback.
|
532
|
+
*
|
533
|
+
* @param remote The remote to be connected
|
534
|
+
* @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
|
535
|
+
* @param payload Payload provided by the caller
|
536
|
+
* @return 0 on success, or an error
|
537
|
+
*/
|
538
|
+
typedef int GIT_CALLBACK(git_remote_ready_cb)(git_remote *remote, int direction, void *payload);
|
492
539
|
|
493
540
|
/**
|
494
541
|
* The callback settings structure
|
@@ -574,17 +621,29 @@ struct git_remote_callbacks {
|
|
574
621
|
*/
|
575
622
|
git_transport_cb transport;
|
576
623
|
|
624
|
+
/**
|
625
|
+
* Callback when the remote is ready to connect.
|
626
|
+
*/
|
627
|
+
git_remote_ready_cb remote_ready;
|
628
|
+
|
577
629
|
/**
|
578
630
|
* This will be passed to each of the callbacks in this struct
|
579
631
|
* as the last parameter.
|
580
632
|
*/
|
581
633
|
void *payload;
|
582
634
|
|
635
|
+
#ifdef GIT_DEPRECATE_HARD
|
636
|
+
void *reserved;
|
637
|
+
#else
|
583
638
|
/**
|
584
639
|
* Resolve URL before connecting to remote.
|
585
640
|
* The returned URL will be used to connect to the remote instead.
|
641
|
+
*
|
642
|
+
* This callback is deprecated; users should use
|
643
|
+
* git_remote_ready_cb and configure the instance URL instead.
|
586
644
|
*/
|
587
645
|
git_url_resolve_cb resolve_url;
|
646
|
+
#endif
|
588
647
|
};
|
589
648
|
|
590
649
|
#define GIT_REMOTE_CALLBACKS_VERSION 1
|
@@ -615,7 +674,7 @@ typedef enum {
|
|
615
674
|
/**
|
616
675
|
* Force pruning off
|
617
676
|
*/
|
618
|
-
GIT_FETCH_NO_PRUNE
|
677
|
+
GIT_FETCH_NO_PRUNE
|
619
678
|
} git_fetch_prune_t;
|
620
679
|
|
621
680
|
/**
|
@@ -640,7 +699,7 @@ typedef enum {
|
|
640
699
|
/**
|
641
700
|
* Ask for the all the tags.
|
642
701
|
*/
|
643
|
-
GIT_REMOTE_DOWNLOAD_TAGS_ALL
|
702
|
+
GIT_REMOTE_DOWNLOAD_TAGS_ALL
|
644
703
|
} git_remote_autotag_option_t;
|
645
704
|
|
646
705
|
/**
|
@@ -684,6 +743,13 @@ typedef struct {
|
|
684
743
|
*/
|
685
744
|
git_proxy_options proxy_opts;
|
686
745
|
|
746
|
+
/**
|
747
|
+
* Whether to allow off-site redirects. If this is not
|
748
|
+
* specified, the `http.followRedirects` configuration setting
|
749
|
+
* will be consulted.
|
750
|
+
*/
|
751
|
+
git_remote_redirect_t follow_redirects;
|
752
|
+
|
687
753
|
/**
|
688
754
|
* Extra headers for this fetch operation
|
689
755
|
*/
|
@@ -735,6 +801,13 @@ typedef struct {
|
|
735
801
|
*/
|
736
802
|
git_proxy_options proxy_opts;
|
737
803
|
|
804
|
+
/**
|
805
|
+
* Whether to allow off-site redirects. If this is not
|
806
|
+
* specified, the `http.followRedirects` configuration setting
|
807
|
+
* will be consulted.
|
808
|
+
*/
|
809
|
+
git_remote_redirect_t follow_redirects;
|
810
|
+
|
738
811
|
/**
|
739
812
|
* Extra headers for this push operation
|
740
813
|
*/
|
@@ -759,7 +832,100 @@ GIT_EXTERN(int) git_push_options_init(
|
|
759
832
|
unsigned int version);
|
760
833
|
|
761
834
|
/**
|
762
|
-
*
|
835
|
+
* Remote creation options structure
|
836
|
+
*
|
837
|
+
* Initialize with `GIT_REMOTE_CREATE_OPTIONS_INIT`. Alternatively, you can
|
838
|
+
* use `git_remote_create_options_init`.
|
839
|
+
*
|
840
|
+
*/
|
841
|
+
typedef struct {
|
842
|
+
unsigned int version;
|
843
|
+
|
844
|
+
/** Callbacks to use for this connection */
|
845
|
+
git_remote_callbacks callbacks;
|
846
|
+
|
847
|
+
/** HTTP Proxy settings */
|
848
|
+
git_proxy_options proxy_opts;
|
849
|
+
|
850
|
+
/**
|
851
|
+
* Whether to allow off-site redirects. If this is not
|
852
|
+
* specified, the `http.followRedirects` configuration setting
|
853
|
+
* will be consulted.
|
854
|
+
*/
|
855
|
+
git_remote_redirect_t follow_redirects;
|
856
|
+
|
857
|
+
/** Extra HTTP headers to use in this connection */
|
858
|
+
git_strarray custom_headers;
|
859
|
+
} git_remote_connect_options;
|
860
|
+
|
861
|
+
#define GIT_REMOTE_CONNECT_OPTIONS_VERSION 1
|
862
|
+
#define GIT_REMOTE_CONNECT_OPTIONS_INIT { \
|
863
|
+
GIT_REMOTE_CONNECT_OPTIONS_VERSION, \
|
864
|
+
GIT_REMOTE_CALLBACKS_INIT, \
|
865
|
+
GIT_PROXY_OPTIONS_INIT }
|
866
|
+
|
867
|
+
/**
|
868
|
+
* Initialize git_remote_connect_options structure.
|
869
|
+
*
|
870
|
+
* Initializes a `git_remote_connect_options` with default values.
|
871
|
+
* Equivalent to creating an instance with
|
872
|
+
* `GIT_REMOTE_CONNECT_OPTIONS_INIT`.
|
873
|
+
*
|
874
|
+
* @param opts The `git_remote_connect_options` struct to initialize.
|
875
|
+
* @param version The struct version; pass `GIT_REMOTE_CONNECT_OPTIONS_VERSION`.
|
876
|
+
* @return Zero on success; -1 on failure.
|
877
|
+
*/
|
878
|
+
GIT_EXTERN(int) git_remote_connect_options_init(
|
879
|
+
git_remote_connect_options *opts,
|
880
|
+
unsigned int version);
|
881
|
+
|
882
|
+
/**
|
883
|
+
* Open a connection to a remote.
|
884
|
+
*
|
885
|
+
* The transport is selected based on the URL; the direction argument
|
886
|
+
* is due to a limitation of the git protocol which starts up a
|
887
|
+
* specific binary which can only do the one or the other.
|
888
|
+
*
|
889
|
+
* @param remote the remote to connect to
|
890
|
+
* @param direction GIT_DIRECTION_FETCH if you want to fetch or
|
891
|
+
* GIT_DIRECTION_PUSH if you want to push
|
892
|
+
* @param callbacks the callbacks to use for this connection
|
893
|
+
* @param proxy_opts proxy settings
|
894
|
+
* @param custom_headers extra HTTP headers to use in this connection
|
895
|
+
* @return 0 or an error code
|
896
|
+
*/
|
897
|
+
GIT_EXTERN(int) git_remote_connect(
|
898
|
+
git_remote *remote,
|
899
|
+
git_direction direction,
|
900
|
+
const git_remote_callbacks *callbacks,
|
901
|
+
const git_proxy_options *proxy_opts,
|
902
|
+
const git_strarray *custom_headers);
|
903
|
+
|
904
|
+
/**
|
905
|
+
* Open a connection to a remote with extended options.
|
906
|
+
*
|
907
|
+
* The transport is selected based on the URL; the direction argument
|
908
|
+
* is due to a limitation of the git protocol which starts up a
|
909
|
+
* specific binary which can only do the one or the other.
|
910
|
+
*
|
911
|
+
* The given options structure will form the defaults for connection
|
912
|
+
* options and callback setup. Callers may override these defaults
|
913
|
+
* by specifying `git_fetch_options` or `git_push_options` in
|
914
|
+
* subsequent calls.
|
915
|
+
*
|
916
|
+
* @param remote the remote to connect to
|
917
|
+
* @param direction GIT_DIRECTION_FETCH if you want to fetch or
|
918
|
+
* GIT_DIRECTION_PUSH if you want to push
|
919
|
+
* @param opts the remote connection options
|
920
|
+
* @return 0 or an error code
|
921
|
+
*/
|
922
|
+
GIT_EXTERN(int) git_remote_connect_ext(
|
923
|
+
git_remote *remote,
|
924
|
+
git_direction direction,
|
925
|
+
const git_remote_connect_options *opts);
|
926
|
+
|
927
|
+
/**
|
928
|
+
* Download and index the packfile.
|
763
929
|
*
|
764
930
|
* Connect to the remote if it hasn't been done yet, negotiate with
|
765
931
|
* the remote git which objects are missing, download and index the
|
@@ -768,19 +934,31 @@ GIT_EXTERN(int) git_push_options_init(
|
|
768
934
|
* The .idx file will be created and both it and the packfile with be
|
769
935
|
* renamed to their final name.
|
770
936
|
*
|
937
|
+
* If options are specified and this remote is already connected then
|
938
|
+
* the existing remote connection options will be discarded and the
|
939
|
+
* remote will now use the new options.
|
940
|
+
*
|
771
941
|
* @param remote the remote
|
772
942
|
* @param refspecs the refspecs to use for this negotiation and
|
773
943
|
* download. Use NULL or an empty array to use the base refspecs
|
774
|
-
* @param opts the options to use for this fetch
|
944
|
+
* @param opts the options to use for this fetch or NULL
|
775
945
|
* @return 0 or an error code
|
776
946
|
*/
|
777
|
-
GIT_EXTERN(int) git_remote_download(
|
947
|
+
GIT_EXTERN(int) git_remote_download(
|
948
|
+
git_remote *remote,
|
949
|
+
const git_strarray *refspecs,
|
950
|
+
const git_fetch_options *opts);
|
778
951
|
|
779
952
|
/**
|
780
953
|
* Create a packfile and send it to the server
|
781
954
|
*
|
782
955
|
* Connect to the remote if it hasn't been done yet, negotiate with
|
783
|
-
* the remote git which objects are missing, create a packfile with
|
956
|
+
* the remote git which objects are missing, create a packfile with
|
957
|
+
* the missing objects and send it.
|
958
|
+
*
|
959
|
+
* If options are specified and this remote is already connected then
|
960
|
+
* the existing remote connection options will be discarded and the
|
961
|
+
* remote will now use the new options.
|
784
962
|
*
|
785
963
|
* @param remote the remote
|
786
964
|
* @param refspecs the refspecs to use for this negotiation and
|
@@ -788,17 +966,23 @@ GIT_EXTERN(int) git_push_options_init(
|
|
788
966
|
* @param opts the options to use for this push
|
789
967
|
* @return 0 or an error code
|
790
968
|
*/
|
791
|
-
GIT_EXTERN(int) git_remote_upload(
|
969
|
+
GIT_EXTERN(int) git_remote_upload(
|
970
|
+
git_remote *remote,
|
971
|
+
const git_strarray *refspecs,
|
972
|
+
const git_push_options *opts);
|
792
973
|
|
793
974
|
/**
|
794
|
-
* Update the tips to the new state
|
975
|
+
* Update the tips to the new state.
|
976
|
+
*
|
977
|
+
* If callbacks are not specified then the callbacks specified to
|
978
|
+
* `git_remote_connect` will be used (if it was called).
|
795
979
|
*
|
796
980
|
* @param remote the remote to update
|
797
981
|
* @param reflog_message The message to insert into the reflogs. If
|
798
982
|
* NULL and fetching, the default is "fetch <name>", where <name> is
|
799
983
|
* the name of the remote (or its url, for in-memory remotes). This
|
800
984
|
* parameter is ignored when pushing.
|
801
|
-
* @param callbacks pointer to the callback structure to use
|
985
|
+
* @param callbacks pointer to the callback structure to use or NULL
|
802
986
|
* @param update_fetchhead whether to write to FETCH_HEAD. Pass 1 to behave like git.
|
803
987
|
* @param download_tags what the behaviour for downloading tags is for this fetch. This is
|
804
988
|
* ignored for push. This must be the same value passed to `git_remote_download()`.
|
@@ -812,15 +996,19 @@ GIT_EXTERN(int) git_remote_update_tips(
|
|
812
996
|
const char *reflog_message);
|
813
997
|
|
814
998
|
/**
|
815
|
-
* Download new data and update tips
|
999
|
+
* Download new data and update tips.
|
816
1000
|
*
|
817
1001
|
* Convenience function to connect to a remote, download the data,
|
818
1002
|
* disconnect and update the remote-tracking branches.
|
819
1003
|
*
|
1004
|
+
* If options are specified and this remote is already connected then
|
1005
|
+
* the existing remote connection options will be discarded and the
|
1006
|
+
* remote will now use the new options.
|
1007
|
+
*
|
820
1008
|
* @param remote the remote to fetch from
|
821
1009
|
* @param refspecs the refspecs to use for this fetch. Pass NULL or an
|
822
1010
|
* empty array to use the base refspecs.
|
823
|
-
* @param opts options to use for this fetch
|
1011
|
+
* @param opts options to use for this fetch or NULL
|
824
1012
|
* @param reflog_message The message to insert into the reflogs. If NULL, the
|
825
1013
|
* default is "fetch"
|
826
1014
|
* @return 0 or an error code
|
@@ -832,27 +1020,36 @@ GIT_EXTERN(int) git_remote_fetch(
|
|
832
1020
|
const char *reflog_message);
|
833
1021
|
|
834
1022
|
/**
|
835
|
-
* Prune tracking refs that are no longer present on remote
|
1023
|
+
* Prune tracking refs that are no longer present on remote.
|
1024
|
+
*
|
1025
|
+
* If callbacks are not specified then the callbacks specified to
|
1026
|
+
* `git_remote_connect` will be used (if it was called).
|
836
1027
|
*
|
837
1028
|
* @param remote the remote to prune
|
838
1029
|
* @param callbacks callbacks to use for this prune
|
839
1030
|
* @return 0 or an error code
|
840
1031
|
*/
|
841
|
-
GIT_EXTERN(int) git_remote_prune(
|
1032
|
+
GIT_EXTERN(int) git_remote_prune(
|
1033
|
+
git_remote *remote,
|
1034
|
+
const git_remote_callbacks *callbacks);
|
842
1035
|
|
843
1036
|
/**
|
844
|
-
* Perform a push
|
1037
|
+
* Perform a push.
|
845
1038
|
*
|
846
|
-
*
|
1039
|
+
* If options are specified and this remote is already connected then
|
1040
|
+
* the existing remote connection options will be discarded and the
|
1041
|
+
* remote will now use the new options.
|
847
1042
|
*
|
848
1043
|
* @param remote the remote to push to
|
849
1044
|
* @param refspecs the refspecs to use for pushing. If NULL or an empty
|
850
1045
|
* array, the configured refspecs will be used
|
851
1046
|
* @param opts options to use for this push
|
1047
|
+
* @return 0 or an error code.
|
852
1048
|
*/
|
853
|
-
GIT_EXTERN(int) git_remote_push(
|
854
|
-
|
855
|
-
|
1049
|
+
GIT_EXTERN(int) git_remote_push(
|
1050
|
+
git_remote *remote,
|
1051
|
+
const git_strarray *refspecs,
|
1052
|
+
const git_push_options *opts);
|
856
1053
|
|
857
1054
|
/**
|
858
1055
|
* Get the statistics structure that is filled in by the fetch operation.
|
@@ -876,8 +1073,10 @@ GIT_EXTERN(git_remote_autotag_option_t) git_remote_autotag(const git_remote *rem
|
|
876
1073
|
* @param repo the repository in which to make the change
|
877
1074
|
* @param remote the name of the remote
|
878
1075
|
* @param value the new value to take.
|
1076
|
+
* @return 0, or an error code.
|
879
1077
|
*/
|
880
1078
|
GIT_EXTERN(int) git_remote_set_autotag(git_repository *repo, const char *remote, git_remote_autotag_option_t value);
|
1079
|
+
|
881
1080
|
/**
|
882
1081
|
* Retrieve the ref-prune setting
|
883
1082
|
*
|
@@ -915,10 +1114,11 @@ GIT_EXTERN(int) git_remote_rename(
|
|
915
1114
|
/**
|
916
1115
|
* Ensure the remote name is well-formed.
|
917
1116
|
*
|
1117
|
+
* @param valid output pointer to set with validity of given remote name
|
918
1118
|
* @param remote_name name to be checked.
|
919
|
-
* @return
|
1119
|
+
* @return 0 on success or an error code
|
920
1120
|
*/
|
921
|
-
GIT_EXTERN(int)
|
1121
|
+
GIT_EXTERN(int) git_remote_name_is_valid(int *valid, const char *remote_name);
|
922
1122
|
|
923
1123
|
/**
|
924
1124
|
* Delete an existing persisted remote.
|
@@ -943,7 +1143,7 @@ GIT_EXTERN(int) git_remote_delete(git_repository *repo, const char *name);
|
|
943
1143
|
*
|
944
1144
|
* This function must only be called after connecting.
|
945
1145
|
*
|
946
|
-
* @param out the
|
1146
|
+
* @param out the buffer in which to store the reference name
|
947
1147
|
* @param remote the remote
|
948
1148
|
* @return 0, GIT_ENOTFOUND if the remote does not have any references
|
949
1149
|
* or none of them point to HEAD's commit, or an error message.
|