rugged 1.7.2 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/rugged/extconf.rb +4 -4
- data/ext/rugged/rugged.c +12 -1
- data/ext/rugged/rugged_blame.c +22 -6
- data/ext/rugged/rugged_blob.c +24 -9
- data/ext/rugged/rugged_branch.c +10 -7
- data/ext/rugged/rugged_branch_collection.c +8 -6
- data/ext/rugged/rugged_commit.c +7 -6
- data/ext/rugged/rugged_config.c +20 -11
- data/ext/rugged/rugged_diff.c +26 -12
- data/ext/rugged/rugged_diff_hunk.c +2 -1
- data/ext/rugged/rugged_index.c +39 -29
- data/ext/rugged/rugged_note.c +7 -6
- data/ext/rugged/rugged_object.c +3 -2
- data/ext/rugged/rugged_patch.c +23 -9
- data/ext/rugged/rugged_rebase.c +22 -10
- data/ext/rugged/rugged_reference.c +22 -13
- data/ext/rugged/rugged_reference_collection.c +9 -7
- data/ext/rugged/rugged_remote.c +23 -12
- data/ext/rugged/rugged_remote_collection.c +11 -9
- data/ext/rugged/rugged_repo.c +60 -45
- data/ext/rugged/rugged_revwalk.c +22 -12
- data/ext/rugged/rugged_submodule.c +23 -20
- data/ext/rugged/rugged_submodule_collection.c +20 -9
- data/ext/rugged/rugged_tag.c +6 -4
- data/ext/rugged/rugged_tag_collection.c +7 -5
- data/ext/rugged/rugged_tree.c +27 -15
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +3 -0
- data/vendor/libgit2/CMakeLists.txt +23 -10
- data/vendor/libgit2/COPYING +195 -1
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +4 -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 +30 -19
- 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 +3 -3
- data/vendor/libgit2/deps/xdiff/CMakeLists.txt +1 -1
- data/vendor/libgit2/deps/xdiff/xmerge.c +16 -12
- 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 +134 -4
- 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 +100 -15
- 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 +50 -3
- 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 -25
- 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 +12 -3
- 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 +113 -25
- 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 +25 -4
- 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 +46 -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 +3 -4
- 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 +31 -5
- 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 +55 -21
- 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 +17 -5
- 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 +192 -166
- data/vendor/libgit2/src/libgit2/clone.h +4 -1
- data/vendor/libgit2/src/libgit2/commit.c +93 -1
- data/vendor/libgit2/src/libgit2/commit_graph.c +68 -58
- data/vendor/libgit2/src/libgit2/commit_graph.h +1 -2
- data/vendor/libgit2/src/libgit2/config.c +390 -299
- 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 +101 -89
- 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 +195 -40
- data/vendor/libgit2/src/libgit2/config_parse.c +12 -10
- data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
- data/vendor/libgit2/src/libgit2/delta.c +5 -1
- 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 +13 -20
- 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_stats.c +19 -12
- 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/fetchhead.c +1 -1
- 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 +76 -98
- data/vendor/libgit2/src/libgit2/index.h +5 -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 +36 -40
- 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 +43 -38
- data/vendor/libgit2/src/libgit2/merge.h +4 -0
- data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
- data/vendor/libgit2/src/libgit2/merge_file.c +43 -30
- data/vendor/libgit2/src/libgit2/message.c +1 -1
- data/vendor/libgit2/src/libgit2/midx.c +30 -18
- 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 +7 -10
- data/vendor/libgit2/src/libgit2/odb_loose.c +24 -14
- 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 +36 -10
- data/vendor/libgit2/src/libgit2/oid.h +11 -0
- data/vendor/libgit2/src/libgit2/pack-objects.c +59 -34
- data/vendor/libgit2/src/libgit2/pack-objects.h +12 -4
- data/vendor/libgit2/src/libgit2/pack.c +33 -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 +41 -13
- 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 +125 -62
- data/vendor/libgit2/src/libgit2/remote.h +0 -1
- data/vendor/libgit2/src/libgit2/repository.c +235 -54
- 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/socket.c +30 -0
- data/vendor/libgit2/src/libgit2/streams/stransport.c +39 -7
- data/vendor/libgit2/src/libgit2/submodule.c +118 -68
- data/vendor/libgit2/src/libgit2/submodule.h +6 -7
- data/vendor/libgit2/src/libgit2/tag.c +4 -2
- 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/auth_sspi.c +2 -0
- data/vendor/libgit2/src/libgit2/transports/credential.c +2 -2
- data/vendor/libgit2/src/libgit2/transports/git.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 +124 -81
- 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 +16 -8
- data/vendor/libgit2/src/libgit2/transports/smart.c +25 -13
- data/vendor/libgit2/src/libgit2/transports/smart.h +4 -2
- data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +5 -5
- 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 +386 -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 +7 -10
- 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 +81 -10
- data/vendor/libgit2/src/util/fs_path.h +29 -0
- data/vendor/libgit2/src/util/futils.c +6 -5
- data/vendor/libgit2/src/util/futils.h +24 -7
- 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/builtin.c +14 -4
- data/vendor/libgit2/src/util/hash/openssl.c +148 -0
- data/vendor/libgit2/src/util/hash/openssl.h +17 -1
- data/vendor/libgit2/src/util/hash/rfc6234/sha224-256.c +8 -6
- data/vendor/libgit2/src/util/hash/sha.h +4 -1
- data/vendor/libgit2/src/util/hashmap.h +425 -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 +17 -11
- 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 +223 -0
- data/vendor/libgit2/src/util/rand.c +1 -7
- data/vendor/libgit2/src/util/regexp.c +1 -1
- data/vendor/libgit2/src/util/runtime.c +2 -2
- 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 +20 -8
- data/vendor/libgit2/src/util/str.h +5 -3
- 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 +706 -0
- data/vendor/libgit2/src/util/unix/realpath.c +23 -5
- data/vendor/libgit2/src/util/util.c +18 -5
- data/vendor/libgit2/src/util/util.h +5 -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/path_w32.c +81 -5
- data/vendor/libgit2/src/util/win32/posix_w32.c +29 -6
- data/vendor/libgit2/src/util/win32/process.c +522 -0
- metadata +60 -32
- 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
|
@@ -45,6 +45,14 @@ int git_refspec__serialize(git_str *out, const git_refspec *refspec);
|
|
|
45
45
|
*/
|
|
46
46
|
int git_refspec_is_wildcard(const git_refspec *spec);
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Determines if a refspec is a negative refspec.
|
|
50
|
+
*
|
|
51
|
+
* @param spec the refspec
|
|
52
|
+
* @return 1 if the refspec is a negative, 0 otherwise
|
|
53
|
+
*/
|
|
54
|
+
int git_refspec_is_negative(const git_refspec *spec);
|
|
55
|
+
|
|
48
56
|
/**
|
|
49
57
|
* DWIM `spec` with `refs` existing on the remote, append the dwim'ed
|
|
50
58
|
* result in `out`.
|
|
@@ -236,6 +236,9 @@ int git_remote_create_with_opts(git_remote **out, const char *url, const git_rem
|
|
|
236
236
|
if (opts->repository) {
|
|
237
237
|
if ((error = git_repository_config_snapshot(&config_ro, opts->repository)) < 0)
|
|
238
238
|
goto on_error;
|
|
239
|
+
} else if (!(opts->flags & GIT_REMOTE_CREATE_SKIP_INSTEADOF)) {
|
|
240
|
+
if ((error = git_config_open_default(&config_ro)) < 0)
|
|
241
|
+
goto on_error;
|
|
239
242
|
}
|
|
240
243
|
|
|
241
244
|
remote = git__calloc(1, sizeof(git_remote));
|
|
@@ -247,7 +250,7 @@ int git_remote_create_with_opts(git_remote **out, const char *url, const git_rem
|
|
|
247
250
|
(error = canonicalize_url(&canonical_url, url)) < 0)
|
|
248
251
|
goto on_error;
|
|
249
252
|
|
|
250
|
-
if (
|
|
253
|
+
if (config_ro && !(opts->flags & GIT_REMOTE_CREATE_SKIP_INSTEADOF)) {
|
|
251
254
|
if ((error = apply_insteadof(&remote->url, config_ro, canonical_url.ptr, GIT_DIRECTION_FETCH, true)) < 0 ||
|
|
252
255
|
(error = apply_insteadof(&remote->pushurl, config_ro, canonical_url.ptr, GIT_DIRECTION_PUSH, false)) < 0)
|
|
253
256
|
goto on_error;
|
|
@@ -1293,9 +1296,9 @@ static int git_remote__download(
|
|
|
1293
1296
|
free_refspecs(&remote->active_refspecs);
|
|
1294
1297
|
error = dwim_refspecs(&remote->active_refspecs, to_active, &refs);
|
|
1295
1298
|
|
|
1296
|
-
|
|
1299
|
+
git_vector_dispose(&refs);
|
|
1297
1300
|
free_refspecs(&specs);
|
|
1298
|
-
|
|
1301
|
+
git_vector_dispose(&specs);
|
|
1299
1302
|
|
|
1300
1303
|
if (error < 0)
|
|
1301
1304
|
goto on_error;
|
|
@@ -1311,9 +1314,9 @@ static int git_remote__download(
|
|
|
1311
1314
|
error = git_fetch_download_pack(remote);
|
|
1312
1315
|
|
|
1313
1316
|
on_error:
|
|
1314
|
-
|
|
1317
|
+
git_vector_dispose(&refs);
|
|
1315
1318
|
free_refspecs(&specs);
|
|
1316
|
-
|
|
1319
|
+
git_vector_dispose(&specs);
|
|
1317
1320
|
return error;
|
|
1318
1321
|
}
|
|
1319
1322
|
|
|
@@ -1339,7 +1342,11 @@ int git_remote_download(
|
|
|
1339
1342
|
if ((error = connect_or_reset_options(remote, GIT_DIRECTION_FETCH, &connect_opts)) < 0)
|
|
1340
1343
|
return error;
|
|
1341
1344
|
|
|
1342
|
-
|
|
1345
|
+
error = git_remote__download(remote, refspecs, opts);
|
|
1346
|
+
|
|
1347
|
+
git_remote_connect_options_dispose(&connect_opts);
|
|
1348
|
+
|
|
1349
|
+
return error;
|
|
1343
1350
|
}
|
|
1344
1351
|
|
|
1345
1352
|
int git_remote_fetch(
|
|
@@ -1348,13 +1355,14 @@ int git_remote_fetch(
|
|
|
1348
1355
|
const git_fetch_options *opts,
|
|
1349
1356
|
const char *reflog_message)
|
|
1350
1357
|
{
|
|
1351
|
-
int error, update_fetchhead = 1;
|
|
1352
1358
|
git_remote_autotag_option_t tagopt = remote->download_tags;
|
|
1353
1359
|
bool prune = false;
|
|
1354
1360
|
git_str reflog_msg_buf = GIT_STR_INIT;
|
|
1355
1361
|
git_remote_connect_options connect_opts = GIT_REMOTE_CONNECT_OPTIONS_INIT;
|
|
1356
1362
|
unsigned int capabilities;
|
|
1357
1363
|
git_oid_t oid_type;
|
|
1364
|
+
unsigned int update_flags = GIT_REMOTE_UPDATE_FETCHHEAD;
|
|
1365
|
+
int error;
|
|
1358
1366
|
|
|
1359
1367
|
GIT_ASSERT_ARG(remote);
|
|
1360
1368
|
|
|
@@ -1371,7 +1379,7 @@ int git_remote_fetch(
|
|
|
1371
1379
|
return error;
|
|
1372
1380
|
|
|
1373
1381
|
if (opts) {
|
|
1374
|
-
|
|
1382
|
+
update_flags = opts->update_fetchhead;
|
|
1375
1383
|
tagopt = opts->download_tags;
|
|
1376
1384
|
}
|
|
1377
1385
|
|
|
@@ -1398,8 +1406,14 @@ int git_remote_fetch(
|
|
|
1398
1406
|
}
|
|
1399
1407
|
|
|
1400
1408
|
/* Create "remote/foo" branches for all remote branches */
|
|
1401
|
-
error = git_remote_update_tips(remote,
|
|
1409
|
+
error = git_remote_update_tips(remote,
|
|
1410
|
+
&connect_opts.callbacks,
|
|
1411
|
+
update_flags,
|
|
1412
|
+
tagopt,
|
|
1413
|
+
git_str_cstr(&reflog_msg_buf));
|
|
1414
|
+
|
|
1402
1415
|
git_str_dispose(&reflog_msg_buf);
|
|
1416
|
+
|
|
1403
1417
|
if (error < 0)
|
|
1404
1418
|
goto done;
|
|
1405
1419
|
|
|
@@ -1578,7 +1592,7 @@ cleanup:
|
|
|
1578
1592
|
for (i = 0; i < fetchhead_refs.length; ++i)
|
|
1579
1593
|
git_fetchhead_ref_free(fetchhead_refs.contents[i]);
|
|
1580
1594
|
|
|
1581
|
-
|
|
1595
|
+
git_vector_dispose(&fetchhead_refs);
|
|
1582
1596
|
git_reference_free(head_ref);
|
|
1583
1597
|
|
|
1584
1598
|
return error;
|
|
@@ -1713,19 +1727,28 @@ int git_remote_prune(git_remote *remote, const git_remote_callbacks *callbacks)
|
|
|
1713
1727
|
git_oid_cpy(&id, git_reference_target(ref));
|
|
1714
1728
|
error = git_reference_delete(ref);
|
|
1715
1729
|
git_reference_free(ref);
|
|
1730
|
+
|
|
1716
1731
|
if (error < 0)
|
|
1717
1732
|
goto cleanup;
|
|
1718
1733
|
|
|
1719
|
-
if (callbacks && callbacks->
|
|
1720
|
-
error = callbacks->
|
|
1734
|
+
if (callbacks && callbacks->update_refs)
|
|
1735
|
+
error = callbacks->update_refs(refname, &id,
|
|
1736
|
+
&zero_id, NULL, callbacks->payload);
|
|
1737
|
+
#ifndef GIT_DEPRECATE_HARD
|
|
1738
|
+
else if (callbacks && callbacks->update_tips)
|
|
1739
|
+
error = callbacks->update_tips(refname, &id,
|
|
1740
|
+
&zero_id, callbacks->payload);
|
|
1741
|
+
#endif
|
|
1721
1742
|
|
|
1722
|
-
if (error < 0)
|
|
1743
|
+
if (error < 0) {
|
|
1744
|
+
git_error_set_after_callback_function(error, "git_remote_fetch");
|
|
1723
1745
|
goto cleanup;
|
|
1746
|
+
}
|
|
1724
1747
|
}
|
|
1725
1748
|
|
|
1726
1749
|
cleanup:
|
|
1727
|
-
|
|
1728
|
-
|
|
1750
|
+
git_vector_dispose(&remote_refs);
|
|
1751
|
+
git_vector_dispose_deep(&candidates);
|
|
1729
1752
|
return error;
|
|
1730
1753
|
}
|
|
1731
1754
|
|
|
@@ -1733,6 +1756,7 @@ static int update_ref(
|
|
|
1733
1756
|
const git_remote *remote,
|
|
1734
1757
|
const char *ref_name,
|
|
1735
1758
|
git_oid *id,
|
|
1759
|
+
git_refspec *spec,
|
|
1736
1760
|
const char *msg,
|
|
1737
1761
|
const git_remote_callbacks *callbacks)
|
|
1738
1762
|
{
|
|
@@ -1761,9 +1785,19 @@ static int update_ref(
|
|
|
1761
1785
|
if (error < 0)
|
|
1762
1786
|
return error;
|
|
1763
1787
|
|
|
1764
|
-
if (callbacks && callbacks->
|
|
1765
|
-
|
|
1788
|
+
if (callbacks && callbacks->update_refs)
|
|
1789
|
+
error = callbacks->update_refs(ref_name, &old_id,
|
|
1790
|
+
id, spec, callbacks->payload);
|
|
1791
|
+
#ifndef GIT_DEPRECATE_HARD
|
|
1792
|
+
else if (callbacks && callbacks->update_tips)
|
|
1793
|
+
error = callbacks->update_tips(ref_name, &old_id,
|
|
1794
|
+
id, callbacks->payload);
|
|
1795
|
+
#endif
|
|
1796
|
+
|
|
1797
|
+
if (error < 0) {
|
|
1798
|
+
git_error_set_after_callback_function(error, "git_remote_fetch");
|
|
1766
1799
|
return error;
|
|
1800
|
+
}
|
|
1767
1801
|
|
|
1768
1802
|
return 0;
|
|
1769
1803
|
}
|
|
@@ -1774,6 +1808,7 @@ static int update_one_tip(
|
|
|
1774
1808
|
git_refspec *spec,
|
|
1775
1809
|
git_remote_head *head,
|
|
1776
1810
|
git_refspec *tagspec,
|
|
1811
|
+
unsigned int update_flags,
|
|
1777
1812
|
git_remote_autotag_option_t tagopt,
|
|
1778
1813
|
const char *log_message,
|
|
1779
1814
|
const git_remote_callbacks *callbacks)
|
|
@@ -1781,7 +1816,7 @@ static int update_one_tip(
|
|
|
1781
1816
|
git_odb *odb;
|
|
1782
1817
|
git_str refname = GIT_STR_INIT;
|
|
1783
1818
|
git_reference *ref = NULL;
|
|
1784
|
-
bool autotag = false;
|
|
1819
|
+
bool autotag = false, updated = false;
|
|
1785
1820
|
git_oid old;
|
|
1786
1821
|
int valid;
|
|
1787
1822
|
int error;
|
|
@@ -1855,22 +1890,33 @@ static int update_one_tip(
|
|
|
1855
1890
|
goto done;
|
|
1856
1891
|
}
|
|
1857
1892
|
|
|
1858
|
-
if (!
|
|
1859
|
-
|
|
1893
|
+
if ((updated = !git_oid_equal(&old, &head->oid))) {
|
|
1894
|
+
/* In autotag mode, don't overwrite any locally-existing tags */
|
|
1895
|
+
error = git_reference_create(&ref, remote->repo, refname.ptr, &head->oid, !autotag,
|
|
1896
|
+
log_message);
|
|
1860
1897
|
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1898
|
+
if (error < 0) {
|
|
1899
|
+
if (error == GIT_EEXISTS)
|
|
1900
|
+
error = 0;
|
|
1864
1901
|
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1902
|
+
goto done;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1868
1905
|
|
|
1906
|
+
if (!callbacks ||
|
|
1907
|
+
(!updated && (update_flags & GIT_REMOTE_UPDATE_REPORT_UNCHANGED) == 0))
|
|
1869
1908
|
goto done;
|
|
1870
|
-
}
|
|
1871
1909
|
|
|
1872
|
-
if (callbacks && callbacks->
|
|
1873
|
-
|
|
1910
|
+
if (callbacks && callbacks->update_refs)
|
|
1911
|
+
error = callbacks->update_refs(refname.ptr, &old,
|
|
1912
|
+
&head->oid, spec, callbacks->payload);
|
|
1913
|
+
#ifndef GIT_DEPRECATE_HARD
|
|
1914
|
+
else if (callbacks && callbacks->update_tips)
|
|
1915
|
+
error = callbacks->update_tips(refname.ptr, &old,
|
|
1916
|
+
&head->oid, callbacks->payload);
|
|
1917
|
+
#endif
|
|
1918
|
+
|
|
1919
|
+
if (error < 0)
|
|
1874
1920
|
git_error_set_after_callback_function(error, "git_remote_fetch");
|
|
1875
1921
|
|
|
1876
1922
|
done:
|
|
@@ -1882,7 +1928,7 @@ done:
|
|
|
1882
1928
|
static int update_tips_for_spec(
|
|
1883
1929
|
git_remote *remote,
|
|
1884
1930
|
const git_remote_callbacks *callbacks,
|
|
1885
|
-
int
|
|
1931
|
+
unsigned int update_flags,
|
|
1886
1932
|
git_remote_autotag_option_t tagopt,
|
|
1887
1933
|
git_refspec *spec,
|
|
1888
1934
|
git_vector *refs,
|
|
@@ -1905,7 +1951,10 @@ static int update_tips_for_spec(
|
|
|
1905
1951
|
|
|
1906
1952
|
/* Update tips based on the remote heads */
|
|
1907
1953
|
git_vector_foreach(refs, i, head) {
|
|
1908
|
-
if (update_one_tip(&update_heads,
|
|
1954
|
+
if (update_one_tip(&update_heads,
|
|
1955
|
+
remote, spec, head, &tagspec,
|
|
1956
|
+
update_flags, tagopt, log_message,
|
|
1957
|
+
callbacks) < 0)
|
|
1909
1958
|
goto on_error;
|
|
1910
1959
|
}
|
|
1911
1960
|
|
|
@@ -1917,7 +1966,7 @@ static int update_tips_for_spec(
|
|
|
1917
1966
|
goto on_error;
|
|
1918
1967
|
|
|
1919
1968
|
if (spec->dst &&
|
|
1920
|
-
(error = update_ref(remote, spec->dst, &id, log_message, callbacks)) < 0)
|
|
1969
|
+
(error = update_ref(remote, spec->dst, &id, spec, log_message, callbacks)) < 0)
|
|
1921
1970
|
goto on_error;
|
|
1922
1971
|
|
|
1923
1972
|
git_oid_cpy(&oid_head.oid, &id);
|
|
@@ -1927,17 +1976,17 @@ static int update_tips_for_spec(
|
|
|
1927
1976
|
goto on_error;
|
|
1928
1977
|
}
|
|
1929
1978
|
|
|
1930
|
-
if (
|
|
1979
|
+
if ((update_flags & GIT_REMOTE_UPDATE_FETCHHEAD) &&
|
|
1931
1980
|
(error = git_remote_write_fetchhead(remote, spec, &update_heads)) < 0)
|
|
1932
1981
|
goto on_error;
|
|
1933
1982
|
|
|
1934
1983
|
git_refspec__dispose(&tagspec);
|
|
1935
|
-
|
|
1984
|
+
git_vector_dispose(&update_heads);
|
|
1936
1985
|
return 0;
|
|
1937
1986
|
|
|
1938
1987
|
on_error:
|
|
1939
1988
|
git_refspec__dispose(&tagspec);
|
|
1940
|
-
|
|
1989
|
+
git_vector_dispose(&update_heads);
|
|
1941
1990
|
return -1;
|
|
1942
1991
|
|
|
1943
1992
|
}
|
|
@@ -2029,7 +2078,7 @@ static int opportunistic_updates(
|
|
|
2029
2078
|
|
|
2030
2079
|
git_str_clear(&refname);
|
|
2031
2080
|
if ((error = git_refspec__transform(&refname, spec, head->name)) < 0 ||
|
|
2032
|
-
(error = update_ref(remote, refname.ptr, &head->oid, msg, callbacks)) < 0)
|
|
2081
|
+
(error = update_ref(remote, refname.ptr, &head->oid, spec, msg, callbacks)) < 0)
|
|
2033
2082
|
goto cleanup;
|
|
2034
2083
|
}
|
|
2035
2084
|
|
|
@@ -2058,11 +2107,11 @@ static int truncate_fetch_head(const char *gitdir)
|
|
|
2058
2107
|
}
|
|
2059
2108
|
|
|
2060
2109
|
int git_remote_update_tips(
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2110
|
+
git_remote *remote,
|
|
2111
|
+
const git_remote_callbacks *callbacks,
|
|
2112
|
+
unsigned int update_flags,
|
|
2113
|
+
git_remote_autotag_option_t download_tags,
|
|
2114
|
+
const char *reflog_message)
|
|
2066
2115
|
{
|
|
2067
2116
|
git_refspec *spec, tagspec;
|
|
2068
2117
|
git_vector refs = GIT_VECTOR_INIT;
|
|
@@ -2091,7 +2140,7 @@ int git_remote_update_tips(
|
|
|
2091
2140
|
goto out;
|
|
2092
2141
|
|
|
2093
2142
|
if (tagopt == GIT_REMOTE_DOWNLOAD_TAGS_ALL) {
|
|
2094
|
-
if ((error = update_tips_for_spec(remote, callbacks,
|
|
2143
|
+
if ((error = update_tips_for_spec(remote, callbacks, update_flags, tagopt, &tagspec, &refs, reflog_message)) < 0)
|
|
2095
2144
|
goto out;
|
|
2096
2145
|
}
|
|
2097
2146
|
|
|
@@ -2099,7 +2148,7 @@ int git_remote_update_tips(
|
|
|
2099
2148
|
if (spec->push)
|
|
2100
2149
|
continue;
|
|
2101
2150
|
|
|
2102
|
-
if ((error = update_tips_for_spec(remote, callbacks,
|
|
2151
|
+
if ((error = update_tips_for_spec(remote, callbacks, update_flags, tagopt, spec, &refs, reflog_message)) < 0)
|
|
2103
2152
|
goto out;
|
|
2104
2153
|
}
|
|
2105
2154
|
|
|
@@ -2108,7 +2157,7 @@ int git_remote_update_tips(
|
|
|
2108
2157
|
error = opportunistic_updates(remote, callbacks, &refs, reflog_message);
|
|
2109
2158
|
|
|
2110
2159
|
out:
|
|
2111
|
-
|
|
2160
|
+
git_vector_dispose(&refs);
|
|
2112
2161
|
git_refspec__dispose(&tagspec);
|
|
2113
2162
|
return error;
|
|
2114
2163
|
}
|
|
@@ -2167,19 +2216,19 @@ void git_remote_free(git_remote *remote)
|
|
|
2167
2216
|
remote->transport = NULL;
|
|
2168
2217
|
}
|
|
2169
2218
|
|
|
2170
|
-
|
|
2219
|
+
git_vector_dispose(&remote->refs);
|
|
2171
2220
|
|
|
2172
2221
|
free_refspecs(&remote->refspecs);
|
|
2173
|
-
|
|
2222
|
+
git_vector_dispose(&remote->refspecs);
|
|
2174
2223
|
|
|
2175
2224
|
free_refspecs(&remote->active_refspecs);
|
|
2176
|
-
|
|
2225
|
+
git_vector_dispose(&remote->active_refspecs);
|
|
2177
2226
|
|
|
2178
2227
|
free_refspecs(&remote->passive_refspecs);
|
|
2179
|
-
|
|
2228
|
+
git_vector_dispose(&remote->passive_refspecs);
|
|
2180
2229
|
|
|
2181
2230
|
free_heads(&remote->local_heads);
|
|
2182
|
-
|
|
2231
|
+
git_vector_dispose(&remote->local_heads);
|
|
2183
2232
|
|
|
2184
2233
|
git_push_free(remote->push);
|
|
2185
2234
|
git__free(remote->url);
|
|
@@ -2222,7 +2271,7 @@ int git_remote_list(git_strarray *remotes_list, git_repository *repo)
|
|
|
2222
2271
|
cfg, "^remote\\..*\\.(push)?url$", remote_list_cb, &list);
|
|
2223
2272
|
|
|
2224
2273
|
if (error < 0) {
|
|
2225
|
-
|
|
2274
|
+
git_vector_dispose_deep(&list);
|
|
2226
2275
|
return error;
|
|
2227
2276
|
}
|
|
2228
2277
|
|
|
@@ -2503,7 +2552,7 @@ static int rename_fetch_refspecs(git_vector *problems, git_remote *remote, const
|
|
|
2503
2552
|
git_vector_foreach(problems, i, str)
|
|
2504
2553
|
git__free(str);
|
|
2505
2554
|
|
|
2506
|
-
|
|
2555
|
+
git_vector_dispose(problems);
|
|
2507
2556
|
}
|
|
2508
2557
|
|
|
2509
2558
|
return error;
|
|
@@ -2543,7 +2592,7 @@ int git_remote_rename(git_strarray *out, git_repository *repo, const char *name,
|
|
|
2543
2592
|
|
|
2544
2593
|
cleanup:
|
|
2545
2594
|
if (error < 0)
|
|
2546
|
-
|
|
2595
|
+
git_vector_dispose(&problem_refspecs);
|
|
2547
2596
|
|
|
2548
2597
|
git_remote_free(remote);
|
|
2549
2598
|
return error;
|
|
@@ -2582,17 +2631,21 @@ done:
|
|
|
2582
2631
|
git_refspec *git_remote__matching_refspec(git_remote *remote, const char *refname)
|
|
2583
2632
|
{
|
|
2584
2633
|
git_refspec *spec;
|
|
2634
|
+
git_refspec *match = NULL;
|
|
2585
2635
|
size_t i;
|
|
2586
2636
|
|
|
2587
2637
|
git_vector_foreach(&remote->active_refspecs, i, spec) {
|
|
2588
2638
|
if (spec->push)
|
|
2589
2639
|
continue;
|
|
2590
2640
|
|
|
2591
|
-
if (
|
|
2592
|
-
return
|
|
2641
|
+
if (git_refspec_src_matches_negative(spec, refname))
|
|
2642
|
+
return NULL;
|
|
2643
|
+
|
|
2644
|
+
if (git_refspec_src_matches(spec, refname) && match == NULL)
|
|
2645
|
+
match = spec;
|
|
2593
2646
|
}
|
|
2594
2647
|
|
|
2595
|
-
return
|
|
2648
|
+
return match;
|
|
2596
2649
|
}
|
|
2597
2650
|
|
|
2598
2651
|
git_refspec *git_remote__matching_dst_refspec(git_remote *remote, const char *refname)
|
|
@@ -2650,7 +2703,7 @@ static int copy_refspecs(git_strarray *array, const git_remote *remote, unsigned
|
|
|
2650
2703
|
return 0;
|
|
2651
2704
|
|
|
2652
2705
|
on_error:
|
|
2653
|
-
|
|
2706
|
+
git_vector_dispose_deep(&refspecs);
|
|
2654
2707
|
|
|
2655
2708
|
return -1;
|
|
2656
2709
|
}
|
|
@@ -2798,7 +2851,7 @@ cleanup:
|
|
|
2798
2851
|
git_vector_foreach(&refs, i, dup) {
|
|
2799
2852
|
git__free(dup);
|
|
2800
2853
|
}
|
|
2801
|
-
|
|
2854
|
+
git_vector_dispose(&refs);
|
|
2802
2855
|
return error;
|
|
2803
2856
|
}
|
|
2804
2857
|
|
|
@@ -2967,12 +3020,22 @@ int git_remote_upload(
|
|
|
2967
3020
|
}
|
|
2968
3021
|
}
|
|
2969
3022
|
|
|
2970
|
-
if (
|
|
2971
|
-
|
|
3023
|
+
if (opts && opts->remote_push_options.count > 0)
|
|
3024
|
+
for (i = 0; i < opts->remote_push_options.count; ++i) {
|
|
3025
|
+
char *optstr = git__strdup(opts->remote_push_options.strings[i]);
|
|
3026
|
+
GIT_ERROR_CHECK_ALLOC(optstr);
|
|
2972
3027
|
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
3028
|
+
if ((error = git_vector_insert(&push->remote_push_options, optstr)) < 0)
|
|
3029
|
+
goto cleanup;
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
error = git_push_finish(push);
|
|
3033
|
+
|
|
3034
|
+
if (connect_opts.callbacks.push_update_reference) {
|
|
3035
|
+
const int cb_error = git_push_status_foreach(push, connect_opts.callbacks.push_update_reference, connect_opts.callbacks.payload);
|
|
3036
|
+
if (!error)
|
|
3037
|
+
error = cb_error;
|
|
3038
|
+
}
|
|
2976
3039
|
|
|
2977
3040
|
cleanup:
|
|
2978
3041
|
git_remote_connect_options_dispose(&connect_opts);
|
|
@@ -58,7 +58,6 @@ int git_remote_connect_options_normalize(
|
|
|
58
58
|
const git_remote_connect_options *src);
|
|
59
59
|
|
|
60
60
|
int git_remote_capabilities(unsigned int *out, git_remote *remote);
|
|
61
|
-
int git_remote_oid_type(git_oid_t *out, git_remote *remote);
|
|
62
61
|
|
|
63
62
|
|
|
64
63
|
#define git_remote_connect_options__copy_opts(out, in) \
|