rugged 1.4.3 → 1.5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -2
- data/ext/rugged/extconf.rb +3 -0
- data/ext/rugged/rugged.c +16 -0
- data/ext/rugged/rugged.h +4 -0
- data/ext/rugged/rugged_remote.c +10 -10
- data/ext/rugged/rugged_repo.c +2 -7
- data/ext/rugged/rugged_settings.c +5 -0
- data/lib/rugged/tree.rb +4 -0
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +16 -3
- data/vendor/libgit2/COPYING +40 -0
- data/vendor/libgit2/cmake/AddClarTest.cmake +7 -0
- data/vendor/libgit2/cmake/FindPCRE.cmake +3 -4
- data/vendor/libgit2/cmake/FindPCRE2.cmake +1 -1
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +1 -1
- data/vendor/libgit2/cmake/SelectHashes.cmake +62 -14
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +3 -1
- data/vendor/libgit2/deps/zlib/adler32.c +7 -0
- data/vendor/libgit2/deps/zlib/crc32.c +975 -288
- data/vendor/libgit2/deps/zlib/crc32.h +9441 -436
- data/vendor/libgit2/deps/zlib/deflate.c +83 -31
- data/vendor/libgit2/deps/zlib/deflate.h +12 -15
- data/vendor/libgit2/deps/zlib/gzguts.h +3 -2
- data/vendor/libgit2/deps/zlib/infback.c +2 -1
- data/vendor/libgit2/deps/zlib/inffast.c +14 -14
- data/vendor/libgit2/deps/zlib/inflate.c +39 -8
- data/vendor/libgit2/deps/zlib/inflate.h +3 -2
- data/vendor/libgit2/deps/zlib/inftrees.c +3 -3
- data/vendor/libgit2/deps/zlib/trees.c +27 -48
- data/vendor/libgit2/deps/zlib/zlib.h +126 -100
- data/vendor/libgit2/deps/zlib/zutil.c +2 -2
- data/vendor/libgit2/deps/zlib/zutil.h +12 -9
- data/vendor/libgit2/include/git2/branch.h +2 -2
- data/vendor/libgit2/include/git2/common.h +11 -0
- data/vendor/libgit2/include/git2/config.h +6 -6
- data/vendor/libgit2/include/git2/deprecated.h +2 -0
- data/vendor/libgit2/include/git2/errors.h +17 -3
- data/vendor/libgit2/include/git2/merge.h +1 -1
- data/vendor/libgit2/include/git2/status.h +5 -2
- data/vendor/libgit2/include/git2/sys/remote.h +15 -0
- data/vendor/libgit2/include/git2/sys/transport.h +9 -5
- data/vendor/libgit2/include/git2/version.h +27 -6
- data/vendor/libgit2/src/CMakeLists.txt +104 -214
- data/vendor/libgit2/src/README.md +12 -0
- data/vendor/libgit2/src/cli/CMakeLists.txt +53 -0
- data/vendor/libgit2/src/cli/README.md +26 -0
- data/vendor/libgit2/src/cli/cli.h +20 -0
- data/vendor/libgit2/src/cli/cmd.c +21 -0
- data/vendor/libgit2/src/cli/cmd.h +33 -0
- data/vendor/libgit2/src/cli/cmd_cat_file.c +204 -0
- data/vendor/libgit2/src/cli/cmd_clone.c +176 -0
- data/vendor/libgit2/src/cli/cmd_hash_object.c +135 -0
- data/vendor/libgit2/src/cli/cmd_help.c +86 -0
- data/vendor/libgit2/src/cli/error.h +51 -0
- data/vendor/libgit2/src/cli/main.c +106 -0
- data/vendor/libgit2/src/cli/opt.c +669 -0
- data/vendor/libgit2/src/cli/opt.h +349 -0
- data/vendor/libgit2/src/cli/opt_usage.c +194 -0
- data/vendor/libgit2/src/cli/opt_usage.h +35 -0
- data/vendor/libgit2/src/cli/progress.c +345 -0
- data/vendor/libgit2/src/cli/progress.h +117 -0
- data/vendor/libgit2/src/cli/sighandler.h +20 -0
- data/vendor/libgit2/src/cli/unix/sighandler.c +36 -0
- data/vendor/libgit2/src/{win32 → cli/win32}/precompiled.c +0 -0
- data/vendor/libgit2/src/cli/win32/precompiled.h +3 -0
- data/vendor/libgit2/src/cli/win32/sighandler.c +37 -0
- data/vendor/libgit2/src/features.h.in +9 -0
- data/vendor/libgit2/src/libgit2/CMakeLists.txt +131 -0
- data/vendor/libgit2/src/{annotated_commit.c → libgit2/annotated_commit.c} +0 -0
- data/vendor/libgit2/src/{annotated_commit.h → libgit2/annotated_commit.h} +0 -0
- data/vendor/libgit2/src/{apply.c → libgit2/apply.c} +0 -0
- data/vendor/libgit2/src/{apply.h → libgit2/apply.h} +0 -0
- data/vendor/libgit2/src/{attr.c → libgit2/attr.c} +0 -0
- data/vendor/libgit2/src/{attr.h → libgit2/attr.h} +0 -0
- data/vendor/libgit2/src/{attr_file.c → libgit2/attr_file.c} +0 -0
- data/vendor/libgit2/src/{attr_file.h → libgit2/attr_file.h} +0 -0
- data/vendor/libgit2/src/{attrcache.c → libgit2/attrcache.c} +0 -0
- data/vendor/libgit2/src/{attrcache.h → libgit2/attrcache.h} +0 -0
- data/vendor/libgit2/src/{blame.c → libgit2/blame.c} +0 -0
- data/vendor/libgit2/src/{blame.h → libgit2/blame.h} +0 -0
- data/vendor/libgit2/src/{blame_git.c → libgit2/blame_git.c} +0 -0
- data/vendor/libgit2/src/{blame_git.h → libgit2/blame_git.h} +0 -0
- data/vendor/libgit2/src/{blob.c → libgit2/blob.c} +1 -1
- data/vendor/libgit2/src/{blob.h → libgit2/blob.h} +0 -0
- data/vendor/libgit2/src/{branch.c → libgit2/branch.c} +14 -9
- data/vendor/libgit2/src/{branch.h → libgit2/branch.h} +0 -0
- data/vendor/libgit2/src/{buf.c → libgit2/buf.c} +0 -0
- data/vendor/libgit2/src/{buf.h → libgit2/buf.h} +0 -0
- data/vendor/libgit2/src/{cache.c → libgit2/cache.c} +0 -0
- data/vendor/libgit2/src/{cache.h → libgit2/cache.h} +0 -0
- data/vendor/libgit2/src/{checkout.c → libgit2/checkout.c} +0 -0
- data/vendor/libgit2/src/{checkout.h → libgit2/checkout.h} +0 -0
- data/vendor/libgit2/src/{cherrypick.c → libgit2/cherrypick.c} +0 -0
- data/vendor/libgit2/src/{clone.c → libgit2/clone.c} +0 -0
- data/vendor/libgit2/src/{clone.h → libgit2/clone.h} +0 -0
- data/vendor/libgit2/src/{commit.c → libgit2/commit.c} +0 -0
- data/vendor/libgit2/src/{commit.h → libgit2/commit.h} +0 -0
- data/vendor/libgit2/src/{commit_graph.c → libgit2/commit_graph.c} +20 -17
- data/vendor/libgit2/src/{commit_graph.h → libgit2/commit_graph.h} +1 -1
- data/vendor/libgit2/src/{commit_list.c → libgit2/commit_list.c} +0 -0
- data/vendor/libgit2/src/{commit_list.h → libgit2/commit_list.h} +0 -0
- data/vendor/libgit2/src/libgit2/common.h +55 -0
- data/vendor/libgit2/src/{config.c → libgit2/config.c} +6 -3
- data/vendor/libgit2/src/{config.h → libgit2/config.h} +0 -0
- data/vendor/libgit2/src/{config_backend.h → libgit2/config_backend.h} +0 -0
- data/vendor/libgit2/src/{config_cache.c → libgit2/config_cache.c} +0 -0
- data/vendor/libgit2/src/{config_entries.c → libgit2/config_entries.c} +0 -0
- data/vendor/libgit2/src/{config_entries.h → libgit2/config_entries.h} +0 -0
- data/vendor/libgit2/src/{config_file.c → libgit2/config_file.c} +0 -0
- data/vendor/libgit2/src/{config_mem.c → libgit2/config_mem.c} +0 -0
- data/vendor/libgit2/src/{config_parse.c → libgit2/config_parse.c} +0 -0
- data/vendor/libgit2/src/{config_parse.h → libgit2/config_parse.h} +0 -0
- data/vendor/libgit2/src/{config_snapshot.c → libgit2/config_snapshot.c} +0 -0
- data/vendor/libgit2/src/{crlf.c → libgit2/crlf.c} +0 -0
- data/vendor/libgit2/src/{delta.c → libgit2/delta.c} +0 -0
- data/vendor/libgit2/src/{delta.h → libgit2/delta.h} +0 -0
- data/vendor/libgit2/src/{describe.c → libgit2/describe.c} +0 -0
- data/vendor/libgit2/src/{diff.c → libgit2/diff.c} +0 -0
- data/vendor/libgit2/src/{diff.h → libgit2/diff.h} +0 -0
- data/vendor/libgit2/src/{diff_driver.c → libgit2/diff_driver.c} +0 -0
- data/vendor/libgit2/src/{diff_driver.h → libgit2/diff_driver.h} +0 -0
- data/vendor/libgit2/src/{diff_file.c → libgit2/diff_file.c} +0 -0
- data/vendor/libgit2/src/{diff_file.h → libgit2/diff_file.h} +0 -0
- data/vendor/libgit2/src/{diff_generate.c → libgit2/diff_generate.c} +0 -0
- data/vendor/libgit2/src/{diff_generate.h → libgit2/diff_generate.h} +0 -0
- data/vendor/libgit2/src/{diff_parse.c → libgit2/diff_parse.c} +0 -0
- data/vendor/libgit2/src/{diff_parse.h → libgit2/diff_parse.h} +0 -0
- data/vendor/libgit2/src/{diff_print.c → libgit2/diff_print.c} +0 -0
- data/vendor/libgit2/src/{diff_stats.c → libgit2/diff_stats.c} +0 -0
- data/vendor/libgit2/src/{diff_stats.h → libgit2/diff_stats.h} +0 -0
- data/vendor/libgit2/src/{diff_tform.c → libgit2/diff_tform.c} +0 -0
- data/vendor/libgit2/src/{diff_tform.h → libgit2/diff_tform.h} +0 -0
- data/vendor/libgit2/src/{diff_xdiff.c → libgit2/diff_xdiff.c} +1 -0
- data/vendor/libgit2/src/{diff_xdiff.h → libgit2/diff_xdiff.h} +0 -0
- data/vendor/libgit2/src/{email.c → libgit2/email.c} +0 -0
- data/vendor/libgit2/src/{email.h → libgit2/email.h} +0 -0
- data/vendor/libgit2/src/{errors.c → libgit2/errors.c} +0 -0
- data/vendor/libgit2/src/{errors.h → libgit2/errors.h} +1 -2
- data/vendor/libgit2/src/{fetch.c → libgit2/fetch.c} +0 -0
- data/vendor/libgit2/src/{fetch.h → libgit2/fetch.h} +0 -0
- data/vendor/libgit2/src/{fetchhead.c → libgit2/fetchhead.c} +0 -0
- data/vendor/libgit2/src/{fetchhead.h → libgit2/fetchhead.h} +0 -0
- data/vendor/libgit2/src/{filter.c → libgit2/filter.c} +31 -1
- data/vendor/libgit2/src/{filter.h → libgit2/filter.h} +0 -0
- data/vendor/libgit2/src/{win32 → libgit2}/git2.rc +0 -0
- data/vendor/libgit2/src/{graph.c → libgit2/graph.c} +0 -0
- data/vendor/libgit2/src/{hashsig.c → libgit2/hashsig.c} +0 -0
- data/vendor/libgit2/src/{ident.c → libgit2/ident.c} +0 -0
- data/vendor/libgit2/src/{idxmap.c → libgit2/idxmap.c} +0 -0
- data/vendor/libgit2/src/{idxmap.h → libgit2/idxmap.h} +0 -0
- data/vendor/libgit2/src/{ignore.c → libgit2/ignore.c} +0 -0
- data/vendor/libgit2/src/{ignore.h → libgit2/ignore.h} +0 -0
- data/vendor/libgit2/src/{index.c → libgit2/index.c} +6 -6
- data/vendor/libgit2/src/{index.h → libgit2/index.h} +0 -0
- data/vendor/libgit2/src/{indexer.c → libgit2/indexer.c} +2 -2
- data/vendor/libgit2/src/{indexer.h → libgit2/indexer.h} +0 -0
- data/vendor/libgit2/src/{iterator.c → libgit2/iterator.c} +3 -3
- data/vendor/libgit2/src/{iterator.h → libgit2/iterator.h} +0 -0
- data/vendor/libgit2/src/{libgit2.c → libgit2/libgit2.c} +5 -0
- data/vendor/libgit2/src/{libgit2.h → libgit2/libgit2.h} +0 -0
- data/vendor/libgit2/src/{mailmap.c → libgit2/mailmap.c} +0 -0
- data/vendor/libgit2/src/{mailmap.h → libgit2/mailmap.h} +0 -0
- data/vendor/libgit2/src/{merge.c → libgit2/merge.c} +0 -0
- data/vendor/libgit2/src/{merge.h → libgit2/merge.h} +0 -0
- data/vendor/libgit2/src/{merge_driver.c → libgit2/merge_driver.c} +0 -0
- data/vendor/libgit2/src/{merge_driver.h → libgit2/merge_driver.h} +0 -0
- data/vendor/libgit2/src/{merge_file.c → libgit2/merge_file.c} +0 -0
- data/vendor/libgit2/src/{message.c → libgit2/message.c} +0 -0
- data/vendor/libgit2/src/{midx.c → libgit2/midx.c} +20 -23
- data/vendor/libgit2/src/{midx.h → libgit2/midx.h} +2 -1
- data/vendor/libgit2/src/{mwindow.c → libgit2/mwindow.c} +9 -9
- data/vendor/libgit2/src/{mwindow.h → libgit2/mwindow.h} +1 -1
- data/vendor/libgit2/src/{netops.c → libgit2/netops.c} +0 -1
- data/vendor/libgit2/src/{netops.h → libgit2/netops.h} +0 -0
- data/vendor/libgit2/src/{notes.c → libgit2/notes.c} +0 -0
- data/vendor/libgit2/src/{notes.h → libgit2/notes.h} +0 -0
- data/vendor/libgit2/src/{object.c → libgit2/object.c} +1 -0
- data/vendor/libgit2/src/{object.h → libgit2/object.h} +0 -0
- data/vendor/libgit2/src/{object_api.c → libgit2/object_api.c} +0 -0
- data/vendor/libgit2/src/{odb.c → libgit2/odb.c} +2 -2
- data/vendor/libgit2/src/{odb.h → libgit2/odb.h} +0 -0
- data/vendor/libgit2/src/{odb_loose.c → libgit2/odb_loose.c} +0 -0
- data/vendor/libgit2/src/{odb_mempack.c → libgit2/odb_mempack.c} +0 -0
- data/vendor/libgit2/src/{odb_pack.c → libgit2/odb_pack.c} +0 -0
- data/vendor/libgit2/src/{offmap.c → libgit2/offmap.c} +0 -0
- data/vendor/libgit2/src/{offmap.h → libgit2/offmap.h} +0 -0
- data/vendor/libgit2/src/{oid.c → libgit2/oid.c} +2 -21
- data/vendor/libgit2/src/{oid.h → libgit2/oid.h} +35 -2
- data/vendor/libgit2/src/{oidarray.c → libgit2/oidarray.c} +0 -0
- data/vendor/libgit2/src/{oidarray.h → libgit2/oidarray.h} +0 -0
- data/vendor/libgit2/src/{oidmap.c → libgit2/oidmap.c} +1 -1
- data/vendor/libgit2/src/{oidmap.h → libgit2/oidmap.h} +0 -0
- data/vendor/libgit2/src/{pack-objects.c → libgit2/pack-objects.c} +0 -0
- data/vendor/libgit2/src/{pack-objects.h → libgit2/pack-objects.h} +0 -0
- data/vendor/libgit2/src/{pack.c → libgit2/pack.c} +24 -18
- data/vendor/libgit2/src/{pack.h → libgit2/pack.h} +3 -2
- data/vendor/libgit2/src/{parse.c → libgit2/parse.c} +0 -0
- data/vendor/libgit2/src/{parse.h → libgit2/parse.h} +0 -0
- data/vendor/libgit2/src/{patch.c → libgit2/patch.c} +0 -0
- data/vendor/libgit2/src/{patch.h → libgit2/patch.h} +0 -0
- data/vendor/libgit2/src/{patch_generate.c → libgit2/patch_generate.c} +0 -0
- data/vendor/libgit2/src/{patch_generate.h → libgit2/patch_generate.h} +0 -0
- data/vendor/libgit2/src/{patch_parse.c → libgit2/patch_parse.c} +0 -0
- data/vendor/libgit2/src/{patch_parse.h → libgit2/patch_parse.h} +0 -0
- data/vendor/libgit2/src/{path.c → libgit2/path.c} +1 -0
- data/vendor/libgit2/src/{path.h → libgit2/path.h} +0 -0
- data/vendor/libgit2/src/{pathspec.c → libgit2/pathspec.c} +0 -0
- data/vendor/libgit2/src/{pathspec.h → libgit2/pathspec.h} +0 -0
- data/vendor/libgit2/src/{proxy.c → libgit2/proxy.c} +0 -0
- data/vendor/libgit2/src/{proxy.h → libgit2/proxy.h} +0 -0
- data/vendor/libgit2/src/{push.c → libgit2/push.c} +0 -0
- data/vendor/libgit2/src/{push.h → libgit2/push.h} +0 -0
- data/vendor/libgit2/src/{reader.c → libgit2/reader.c} +0 -0
- data/vendor/libgit2/src/{reader.h → libgit2/reader.h} +0 -0
- data/vendor/libgit2/src/{rebase.c → libgit2/rebase.c} +11 -1
- data/vendor/libgit2/src/{refdb.c → libgit2/refdb.c} +0 -0
- data/vendor/libgit2/src/{refdb.h → libgit2/refdb.h} +0 -0
- data/vendor/libgit2/src/{refdb_fs.c → libgit2/refdb_fs.c} +6 -2
- data/vendor/libgit2/src/{reflog.c → libgit2/reflog.c} +0 -0
- data/vendor/libgit2/src/{reflog.h → libgit2/reflog.h} +0 -0
- data/vendor/libgit2/src/{refs.c → libgit2/refs.c} +0 -0
- data/vendor/libgit2/src/{refs.h → libgit2/refs.h} +0 -0
- data/vendor/libgit2/src/{refspec.c → libgit2/refspec.c} +0 -0
- data/vendor/libgit2/src/{refspec.h → libgit2/refspec.h} +0 -0
- data/vendor/libgit2/src/{remote.c → libgit2/remote.c} +1 -1
- data/vendor/libgit2/src/{remote.h → libgit2/remote.h} +1 -1
- data/vendor/libgit2/src/{repo_template.h → libgit2/repo_template.h} +0 -0
- data/vendor/libgit2/src/{repository.c → libgit2/repository.c} +80 -28
- data/vendor/libgit2/src/{repository.h → libgit2/repository.h} +0 -0
- data/vendor/libgit2/src/{reset.c → libgit2/reset.c} +0 -0
- data/vendor/libgit2/src/{revert.c → libgit2/revert.c} +0 -0
- data/vendor/libgit2/src/{revparse.c → libgit2/revparse.c} +0 -0
- data/vendor/libgit2/src/{revwalk.c → libgit2/revwalk.c} +0 -0
- data/vendor/libgit2/src/{revwalk.h → libgit2/revwalk.h} +0 -0
- data/vendor/libgit2/src/{settings.h → libgit2/settings.h} +0 -0
- data/vendor/libgit2/src/{signature.c → libgit2/signature.c} +0 -0
- data/vendor/libgit2/src/{signature.h → libgit2/signature.h} +0 -0
- data/vendor/libgit2/src/{stash.c → libgit2/stash.c} +0 -0
- data/vendor/libgit2/src/{status.c → libgit2/status.c} +0 -0
- data/vendor/libgit2/src/{status.h → libgit2/status.h} +0 -0
- data/vendor/libgit2/src/{strarray.c → libgit2/strarray.c} +0 -0
- data/vendor/libgit2/src/{stream.h → libgit2/stream.h} +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/mbedtls.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/mbedtls.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_dynamic.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_dynamic.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_legacy.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_legacy.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/registry.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/registry.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/socket.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/socket.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/stransport.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/stransport.h +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/tls.c +0 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/tls.h +0 -0
- data/vendor/libgit2/src/{submodule.c → libgit2/submodule.c} +0 -0
- data/vendor/libgit2/src/{submodule.h → libgit2/submodule.h} +0 -0
- data/vendor/libgit2/src/{sysdir.c → libgit2/sysdir.c} +0 -0
- data/vendor/libgit2/src/{sysdir.h → libgit2/sysdir.h} +0 -0
- data/vendor/libgit2/src/{tag.c → libgit2/tag.c} +15 -5
- data/vendor/libgit2/src/{tag.h → libgit2/tag.h} +0 -0
- data/vendor/libgit2/src/{threadstate.c → libgit2/threadstate.c} +0 -0
- data/vendor/libgit2/src/{threadstate.h → libgit2/threadstate.h} +0 -0
- data/vendor/libgit2/src/{trace.c → libgit2/trace.c} +0 -0
- data/vendor/libgit2/src/{trace.h → libgit2/trace.h} +0 -0
- data/vendor/libgit2/src/{trailer.c → libgit2/trailer.c} +0 -0
- data/vendor/libgit2/src/{transaction.c → libgit2/transaction.c} +0 -0
- data/vendor/libgit2/src/{transaction.h → libgit2/transaction.h} +0 -0
- data/vendor/libgit2/src/{transport.c → libgit2/transport.c} +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_negotiate.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_negotiate.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_ntlm.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_ntlm.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/credential.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/credential_helpers.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/git.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/http.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/http.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/httpclient.c +1 -1
- data/vendor/libgit2/src/{transports → libgit2/transports}/httpclient.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/local.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart.c +12 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart_pkt.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart_protocol.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/ssh.c +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/ssh.h +0 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/winhttp.c +0 -0
- data/vendor/libgit2/src/{tree-cache.c → libgit2/tree-cache.c} +1 -1
- data/vendor/libgit2/src/{tree-cache.h → libgit2/tree-cache.h} +0 -0
- data/vendor/libgit2/src/{tree.c → libgit2/tree.c} +16 -23
- data/vendor/libgit2/src/{tree.h → libgit2/tree.h} +1 -1
- data/vendor/libgit2/src/{userdiff.h → libgit2/userdiff.h} +0 -0
- data/vendor/libgit2/src/{worktree.c → libgit2/worktree.c} +0 -0
- data/vendor/libgit2/src/{worktree.h → libgit2/worktree.h} +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/git-xdiff.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xdiff.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xdiffi.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xdiffi.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xemit.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xemit.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xhistogram.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xinclude.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xmacros.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xmerge.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xpatience.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xprepare.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xprepare.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xtypes.h +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xutils.c +0 -0
- data/vendor/libgit2/src/{xdiff → libgit2/xdiff}/xutils.h +0 -0
- data/vendor/libgit2/src/util/CMakeLists.txt +74 -0
- data/vendor/libgit2/src/{alloc.c → util/alloc.c} +0 -0
- data/vendor/libgit2/src/{alloc.h → util/alloc.h} +0 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/failalloc.c +0 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/failalloc.h +1 -1
- data/vendor/libgit2/src/{allocators → util/allocators}/stdalloc.c +0 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/stdalloc.h +1 -1
- data/vendor/libgit2/src/{allocators → util/allocators}/win32_leakcheck.c +0 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/win32_leakcheck.h +1 -1
- data/vendor/libgit2/src/{array.h → util/array.h} +1 -1
- data/vendor/libgit2/src/{assert_safe.h → util/assert_safe.h} +16 -0
- data/vendor/libgit2/src/{bitvec.h → util/bitvec.h} +0 -0
- data/vendor/libgit2/src/{cc-compat.h → util/cc-compat.h} +0 -0
- data/vendor/libgit2/src/{date.c → util/date.c} +4 -3
- data/vendor/libgit2/src/{date.h → util/date.h} +0 -0
- data/vendor/libgit2/src/{filebuf.c → util/filebuf.c} +1 -1
- data/vendor/libgit2/src/{filebuf.h → util/filebuf.h} +1 -1
- data/vendor/libgit2/src/{fs_path.c → util/fs_path.c} +96 -101
- data/vendor/libgit2/src/{fs_path.h → util/fs_path.h} +33 -15
- data/vendor/libgit2/src/{futils.c → util/futils.c} +44 -2
- data/vendor/libgit2/src/{futils.h → util/futils.h} +2 -1
- data/vendor/libgit2/src/{common.h → util/git2_util.h} +13 -59
- data/vendor/libgit2/src/util/hash/builtin.c +53 -0
- data/vendor/libgit2/src/{hash/sha1/openssl.h → util/hash/builtin.h} +6 -6
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/collisiondetect.c +1 -1
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/collisiondetect.h +3 -3
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/common_crypto.c +55 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/common_crypto.h +11 -3
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/mbedtls.c +46 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/mbedtls.h +14 -4
- data/vendor/libgit2/src/util/hash/openssl.c +194 -0
- data/vendor/libgit2/src/util/hash/openssl.h +45 -0
- data/vendor/libgit2/src/util/hash/rfc6234/sha.h +355 -0
- data/vendor/libgit2/src/util/hash/rfc6234/sha224-256.c +601 -0
- data/vendor/libgit2/src/util/hash/sha.h +70 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/sha1dc/sha1.c +0 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/sha1dc/sha1.h +0 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/sha1dc/ubc_check.c +0 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/sha1dc/ubc_check.h +0 -0
- data/vendor/libgit2/src/util/hash/win32.c +549 -0
- data/vendor/libgit2/src/util/hash/win32.h +60 -0
- data/vendor/libgit2/src/{hash.c → util/hash.c} +17 -1
- data/vendor/libgit2/src/{hash.h → util/hash.h} +5 -3
- data/vendor/libgit2/src/{integer.h → util/integer.h} +0 -0
- data/vendor/libgit2/src/{khash.h → util/khash.h} +0 -0
- data/vendor/libgit2/src/{map.h → util/map.h} +1 -1
- data/vendor/libgit2/src/{net.c → util/net.c} +0 -1
- data/vendor/libgit2/src/{net.h → util/net.h} +1 -1
- data/vendor/libgit2/src/{pool.c → util/pool.c} +0 -0
- data/vendor/libgit2/src/{pool.h → util/pool.h} +1 -1
- data/vendor/libgit2/src/{posix.c → util/posix.c} +0 -0
- data/vendor/libgit2/src/{posix.h → util/posix.h} +1 -1
- data/vendor/libgit2/src/{pqueue.c → util/pqueue.c} +0 -0
- data/vendor/libgit2/src/{pqueue.h → util/pqueue.h} +1 -1
- data/vendor/libgit2/src/{rand.c → util/rand.c} +7 -3
- data/vendor/libgit2/src/{rand.h → util/rand.h} +1 -1
- data/vendor/libgit2/src/{regexp.c → util/regexp.c} +0 -0
- data/vendor/libgit2/src/{regexp.h → util/regexp.h} +1 -1
- data/vendor/libgit2/src/{runtime.c → util/runtime.c} +1 -1
- data/vendor/libgit2/src/{runtime.h → util/runtime.h} +1 -1
- data/vendor/libgit2/src/{sortedcache.c → util/sortedcache.c} +0 -0
- data/vendor/libgit2/src/{sortedcache.h → util/sortedcache.h} +1 -1
- data/vendor/libgit2/src/{str.c → util/str.c} +0 -0
- data/vendor/libgit2/src/{str.h → util/str.h} +1 -1
- data/vendor/libgit2/src/{strmap.c → util/strmap.c} +0 -0
- data/vendor/libgit2/src/{strmap.h → util/strmap.h} +1 -1
- data/vendor/libgit2/src/{strnlen.h → util/strnlen.h} +0 -0
- data/vendor/libgit2/src/{thread.c → util/thread.c} +1 -1
- data/vendor/libgit2/src/{thread.h → util/thread.h} +0 -0
- data/vendor/libgit2/src/{tsort.c → util/tsort.c} +1 -1
- data/vendor/libgit2/src/{unix → util/unix}/map.c +1 -1
- data/vendor/libgit2/src/{unix → util/unix}/posix.h +1 -1
- data/vendor/libgit2/src/{unix → util/unix}/pthread.h +0 -0
- data/vendor/libgit2/src/{unix → util/unix}/realpath.c +1 -1
- data/vendor/libgit2/src/{utf8.c → util/utf8.c} +1 -1
- data/vendor/libgit2/src/{utf8.h → util/utf8.h} +1 -1
- data/vendor/libgit2/src/{util.c → util/util.c} +1 -1
- data/vendor/libgit2/src/{util.h → util/util.h} +1 -1
- data/vendor/libgit2/src/{varint.c → util/varint.c} +0 -0
- data/vendor/libgit2/src/{varint.h → util/varint.h} +1 -1
- data/vendor/libgit2/src/{vector.c → util/vector.c} +0 -0
- data/vendor/libgit2/src/{vector.h → util/vector.h} +1 -1
- data/vendor/libgit2/src/{wildmatch.c → util/wildmatch.c} +0 -0
- data/vendor/libgit2/src/{wildmatch.h → util/wildmatch.h} +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/dir.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/dir.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/error.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/error.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/findfile.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/findfile.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/map.c +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/mingw-compat.h +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/msvc-compat.h +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/path_w32.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/path_w32.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/posix.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/posix_w32.c +1 -1
- data/vendor/libgit2/src/util/win32/precompiled.c +1 -0
- data/vendor/libgit2/src/{win32 → util/win32}/precompiled.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/reparse.h +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/thread.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/thread.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/utf-conv.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/utf-conv.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/version.h +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_buffer.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_buffer.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/w32_common.h +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_leakcheck.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_leakcheck.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/w32_util.c +0 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_util.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/win32-compat.h +0 -0
- data/vendor/libgit2/src/{zstream.c → util/zstream.c} +0 -0
- data/vendor/libgit2/src/{zstream.h → util/zstream.h} +1 -1
- metadata +391 -362
- data/vendor/libgit2/src/hash/sha1/generic.c +0 -300
- data/vendor/libgit2/src/hash/sha1/generic.h +0 -19
- data/vendor/libgit2/src/hash/sha1/openssl.c +0 -59
- data/vendor/libgit2/src/hash/sha1/win32.c +0 -333
- data/vendor/libgit2/src/hash/sha1/win32.h +0 -128
- data/vendor/libgit2/src/hash/sha1.h +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ea6cb574b0ccc0c76c624cae0d3845590b5aef4e1653a604964736f2de1c489
|
4
|
+
data.tar.gz: 0d5bd0607f91187a8c04c0bafa516b5162602d2c29657b5dd1ce6922da06cc22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c15f2a343f085539228baeca8d9ba93fa23fb3cfb22cacc9bc4bb8126f6c9082ee81a24f3b338f2f3685927acf88d86832a1645bd37ddbfa70d142c5a3796c14
|
7
|
+
data.tar.gz: 99cef08979f3931643e93bf12490865ecc365b352511fd2bdd3156d98d2ae6bc52e9ab6e449da1c7841a3335b9f6d41733c6fa6083a3404bd2d1f337110d371a
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rugged [![
|
1
|
+
# Rugged [![Rugged CI](https://github.com/libgit2/rugged/actions/workflows/ci.yml/badge.svg)](https://github.com/libgit2/rugged/actions/workflows/ci.yml)
|
2
2
|
**libgit2 bindings in Ruby**
|
3
3
|
|
4
4
|
Rugged is a library for accessing [libgit2](https://github.com/libgit2/libgit2) in Ruby. It gives you the speed and
|
@@ -17,21 +17,53 @@ Rugged is a self-contained gem. You can install it by running:
|
|
17
17
|
|
18
18
|
$ gem install rugged
|
19
19
|
|
20
|
-
|
20
|
+
## Prerequisites
|
21
|
+
You need to have CMake and `pkg-config` installed on your system to be able to build the included version of `libgit2`.
|
22
|
+
|
23
|
+
### Debian, Including Ubuntu
|
24
|
+
All Debian-derived Linux distros provide `apt`:
|
25
|
+
```bash
|
26
|
+
$ sudo apt install libgit2-dev cmake pkg-config
|
27
|
+
```
|
28
|
+
|
29
|
+
Note that you only need `libgit2-dev` if you want to build with the system
|
30
|
+
libgit2 rather than the vendored version. In this case, note that the major and
|
31
|
+
minor versions of libgit2 and rugged must match.
|
32
|
+
|
33
|
+
### Mac
|
34
|
+
On OS X, after installing [Homebrew](http://brew.sh/), you can get the required packages with:
|
21
35
|
```bash
|
22
36
|
$ brew install cmake pkg-config
|
23
37
|
```
|
24
38
|
|
25
39
|
Please follow the above in case installation of the gem fails with `ERROR: CMake is required to build Rugged.`.
|
26
40
|
|
41
|
+
### Options
|
42
|
+
|
27
43
|
If you want to build Rugged with HTTPS and SSH support, check out the list of optional [libgit2 dependencies](https://github.com/libgit2/libgit2#optional-dependencies).
|
28
44
|
|
45
|
+
To install `rugged` with SSH support ensure you have the `LibSSH2` library present, then pass the required `CMAKE_FLAGS`:
|
46
|
+
```bash
|
47
|
+
CMAKE_FLAGS='-DUSE_SSH=ON' gem install rugged
|
48
|
+
```
|
49
|
+
|
50
|
+
Or pass the `--with-ssh` build option:
|
51
|
+
```bash
|
52
|
+
gem install rugged -- --with-ssh
|
53
|
+
```
|
54
|
+
|
29
55
|
If you're using bundler and want to bundle `libgit2` with Rugged, you can use the `:submodules` option:
|
30
56
|
|
31
57
|
```ruby
|
32
58
|
gem 'rugged', git: 'git://github.com/libgit2/rugged.git', submodules: true
|
33
59
|
```
|
34
60
|
|
61
|
+
If you would like to bundle rugged with SSH support add the `--with-ssh` build option to the bundler config:
|
62
|
+
```bash
|
63
|
+
bundle config build.rugged --with-ssh
|
64
|
+
```
|
65
|
+
|
66
|
+
## Usage
|
35
67
|
To load Rugged, you'll usually want to add something like this:
|
36
68
|
|
37
69
|
```ruby
|
data/ext/rugged/extconf.rb
CHANGED
@@ -14,8 +14,11 @@ $CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
|
|
14
14
|
$CFLAGS << " -Wall -Wno-comment"
|
15
15
|
|
16
16
|
cmake_flags = [ ENV["CMAKE_FLAGS"] ]
|
17
|
+
cmake_flags << "-DBUILD_CLI=OFF"
|
18
|
+
cmake_flags << "-DBUILD_TESTS=OFF"
|
17
19
|
cmake_flags << "-DREGEX_BACKEND=builtin"
|
18
20
|
cmake_flags << "-DUSE_SHA1DC=ON" if with_config("sha1dc")
|
21
|
+
cmake_flags << "-DUSE_SSH=ON" if with_config("ssh")
|
19
22
|
|
20
23
|
def sys(cmd)
|
21
24
|
puts " -- #{cmd}"
|
data/ext/rugged/rugged.c
CHANGED
@@ -75,6 +75,21 @@ static VALUE rb_git_libgit2_version(VALUE self)
|
|
75
75
|
return rb_ary_new3(3, INT2NUM(major), INT2NUM(minor), INT2NUM(rev));
|
76
76
|
}
|
77
77
|
|
78
|
+
/*
|
79
|
+
* call-seq:
|
80
|
+
* Rugged.libgit2_prerelease -> prerelease string
|
81
|
+
*
|
82
|
+
* Returns a string with the prerelease string for libgit2. This will be empty
|
83
|
+
* for tagged releases.
|
84
|
+
*/
|
85
|
+
static VALUE rb_git_libgit2_prerelease(VALUE self)
|
86
|
+
{
|
87
|
+
const char *prerelease;
|
88
|
+
|
89
|
+
prerelease = git_libgit2_prerelease();
|
90
|
+
return rb_str_new_utf8(prerelease ? prerelease : "");
|
91
|
+
}
|
92
|
+
|
78
93
|
/*
|
79
94
|
* call-seq:
|
80
95
|
* Rugged.features -> [feature, ...]
|
@@ -585,6 +600,7 @@ void Init_rugged(void)
|
|
585
600
|
}
|
586
601
|
|
587
602
|
rb_define_module_function(rb_mRugged, "libgit2_version", rb_git_libgit2_version, 0);
|
603
|
+
rb_define_module_function(rb_mRugged, "libgit2_prerelease", rb_git_libgit2_prerelease, 0);
|
588
604
|
rb_define_module_function(rb_mRugged, "features", rb_git_features, 0);
|
589
605
|
rb_define_module_function(rb_mRugged, "valid_full_oid?", rb_git_valid_full_oid, 1);
|
590
606
|
rb_define_module_function(rb_mRugged, "hex_to_raw", rb_git_hex_to_raw, 1);
|
data/ext/rugged/rugged.h
CHANGED
@@ -165,6 +165,10 @@ struct rugged_remote_cb_payload
|
|
165
165
|
int exception;
|
166
166
|
};
|
167
167
|
|
168
|
+
void rugged_remote_init_custom_headers(VALUE rb_options, git_strarray *custom_headers);
|
169
|
+
|
170
|
+
void rugged_remote_init_proxy_options(VALUE rb_options, git_proxy_options *proxy_options);
|
171
|
+
|
168
172
|
void rugged_remote_init_callbacks_and_payload_from_options(
|
169
173
|
VALUE rb_options,
|
170
174
|
git_remote_callbacks *callbacks,
|
data/ext/rugged/rugged_remote.c
CHANGED
@@ -198,7 +198,7 @@ void rugged_remote_init_callbacks_and_payload_from_options(
|
|
198
198
|
}
|
199
199
|
}
|
200
200
|
|
201
|
-
|
201
|
+
void rugged_remote_init_custom_headers(VALUE rb_options, git_strarray *custom_headers)
|
202
202
|
{
|
203
203
|
if (!NIL_P(rb_options))
|
204
204
|
{
|
@@ -207,7 +207,7 @@ static void init_custom_headers(VALUE rb_options, git_strarray *custom_headers)
|
|
207
207
|
}
|
208
208
|
}
|
209
209
|
|
210
|
-
|
210
|
+
void rugged_remote_init_proxy_options(VALUE rb_options, git_proxy_options *proxy_options)
|
211
211
|
{
|
212
212
|
if (NIL_P(rb_options)) return;
|
213
213
|
|
@@ -330,8 +330,8 @@ static VALUE rb_git_remote_ls(int argc, VALUE *argv, VALUE self)
|
|
330
330
|
rb_scan_args(argc, argv, ":", &rb_options);
|
331
331
|
|
332
332
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &callbacks, &payload);
|
333
|
-
|
334
|
-
|
333
|
+
rugged_remote_init_custom_headers(rb_options, &custom_headers);
|
334
|
+
rugged_remote_init_proxy_options(rb_options, &proxy_options);
|
335
335
|
|
336
336
|
if ((error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, &proxy_options, &custom_headers)) ||
|
337
337
|
(error = git_remote_ls(&heads, &heads_len, remote)))
|
@@ -535,8 +535,8 @@ static VALUE rb_git_remote_check_connection(int argc, VALUE *argv, VALUE self)
|
|
535
535
|
rb_raise(rb_eTypeError, "Invalid direction. Expected :fetch or :push");
|
536
536
|
|
537
537
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &callbacks, &payload);
|
538
|
-
|
539
|
-
|
538
|
+
rugged_remote_init_custom_headers(rb_options, &custom_headers);
|
539
|
+
rugged_remote_init_proxy_options(rb_options, &proxy_options);
|
540
540
|
|
541
541
|
error = git_remote_connect(remote, direction, &callbacks, &proxy_options, &custom_headers);
|
542
542
|
git_remote_disconnect(remote);
|
@@ -628,8 +628,8 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
|
|
628
628
|
Data_Get_Struct(self, git_remote, remote);
|
629
629
|
|
630
630
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
|
631
|
-
|
632
|
-
|
631
|
+
rugged_remote_init_custom_headers(rb_options, &opts.custom_headers);
|
632
|
+
rugged_remote_init_proxy_options(rb_options, &opts.proxy_opts);
|
633
633
|
|
634
634
|
if (!NIL_P(rb_options)) {
|
635
635
|
VALUE rb_prune_type;
|
@@ -723,8 +723,8 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
|
|
723
723
|
Data_Get_Struct(self, git_remote, remote);
|
724
724
|
|
725
725
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
|
726
|
-
|
727
|
-
|
726
|
+
rugged_remote_init_custom_headers(rb_options, &opts.custom_headers);
|
727
|
+
rugged_remote_init_proxy_options(rb_options, &opts.proxy_opts);
|
728
728
|
init_pb_parallelism(rb_options, &opts);
|
729
729
|
|
730
730
|
error = git_remote_push(remote, &refspecs, &opts);
|
data/ext/rugged/rugged_repo.c
CHANGED
@@ -528,14 +528,9 @@ static void parse_clone_options(git_clone_options *ret, VALUE rb_options, struct
|
|
528
528
|
ret->checkout_branch = StringValueCStr(val);
|
529
529
|
}
|
530
530
|
|
531
|
-
val = rb_hash_aref(rb_options, CSTR2SYM("proxy_url"));
|
532
|
-
if (!NIL_P(val)) {
|
533
|
-
Check_Type(val, T_STRING);
|
534
|
-
ret->fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED;
|
535
|
-
ret->fetch_opts.proxy_opts.url = StringValueCStr(val);
|
536
|
-
}
|
537
|
-
|
538
531
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &ret->fetch_opts.callbacks, remote_payload);
|
532
|
+
rugged_remote_init_custom_headers(rb_options, &ret->fetch_opts.custom_headers);
|
533
|
+
rugged_remote_init_proxy_options(rb_options, &ret->fetch_opts.proxy_opts);
|
539
534
|
}
|
540
535
|
|
541
536
|
/*
|
@@ -86,6 +86,11 @@ static VALUE rb_git_set_option(VALUE self, VALUE option, VALUE value)
|
|
86
86
|
git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, strict);
|
87
87
|
}
|
88
88
|
|
89
|
+
else if (strcmp(opt, "fsync_gitdir") == 0) {
|
90
|
+
int fsync = RTEST(value) ? 1 : 0;
|
91
|
+
git_libgit2_opts(GIT_OPT_ENABLE_FSYNC_GITDIR, fsync);
|
92
|
+
}
|
93
|
+
|
89
94
|
else {
|
90
95
|
rb_raise(rb_eArgError, "Unknown option specified");
|
91
96
|
}
|
data/lib/rugged/tree.rb
CHANGED
@@ -172,21 +172,25 @@ module Rugged
|
|
172
172
|
|
173
173
|
# Walks the tree but only yields blobs
|
174
174
|
def walk_blobs(mode=:postorder)
|
175
|
+
return to_enum(__method__) unless block_given?
|
175
176
|
self.walk(mode) { |root, e| yield root, e if e[:type] == :blob }
|
176
177
|
end
|
177
178
|
|
178
179
|
# Walks the tree but only yields subtrees
|
179
180
|
def walk_trees(mode=:postorder)
|
181
|
+
return to_enum(__method__) unless block_given?
|
180
182
|
self.walk(mode) { |root, e| yield root, e if e[:type] == :tree }
|
181
183
|
end
|
182
184
|
|
183
185
|
# Iterate over the blobs in this tree
|
184
186
|
def each_blob
|
187
|
+
return to_enum(__method__) unless block_given?
|
185
188
|
self.each { |e| yield e if e[:type] == :blob }
|
186
189
|
end
|
187
190
|
|
188
191
|
# Iterate over the subtrees in this tree
|
189
192
|
def each_tree
|
193
|
+
return to_enum(__method__) unless block_given?
|
190
194
|
self.each { |e| yield e if e[:type] == :tree }
|
191
195
|
end
|
192
196
|
end
|
data/lib/rugged/version.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# libgit2: the cross-platform, linkable library implementation of git.
|
2
2
|
# See `README.md` for build instructions.
|
3
|
+
#
|
4
|
+
# This top-level CMakeLists.txt sets up configuration options and
|
5
|
+
# determines which subprojects to build.
|
3
6
|
|
4
7
|
cmake_minimum_required(VERSION 3.5.1)
|
5
8
|
|
6
|
-
project(libgit2 VERSION "1.
|
9
|
+
project(libgit2 VERSION "1.5.0" LANGUAGES C)
|
7
10
|
|
8
11
|
# Add find modules to the path
|
9
12
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
|
@@ -15,6 +18,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
|
|
15
18
|
# Optional subsystems
|
16
19
|
option(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
|
17
20
|
option(BUILD_TESTS "Build Tests using the Clar suite" ON)
|
21
|
+
option(BUILD_CLI "Build the command-line interface" ON)
|
18
22
|
option(BUILD_EXAMPLES "Build library usage example apps" OFF)
|
19
23
|
option(BUILD_FUZZERS "Build the fuzz targets" OFF)
|
20
24
|
|
@@ -25,7 +29,8 @@ option(USE_NSEC "Support nanosecond precision file mtimes and cti
|
|
25
29
|
# Backend selection
|
26
30
|
option(USE_SSH "Link with libssh2 to enable SSH support" OFF)
|
27
31
|
option(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON)
|
28
|
-
option(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS
|
32
|
+
option(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS" ON)
|
33
|
+
option(USE_SHA256 "Enable SHA256. Can be set to HTTPS/Builtin" ON)
|
29
34
|
option(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
|
30
35
|
set(USE_HTTP_PARSER "" CACHE STRING "Specifies the HTTP Parser implementation; either system or builtin.")
|
31
36
|
set(REGEX_BACKEND "" CACHE STRING "Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin.")
|
@@ -127,6 +132,14 @@ if(BUILD_FUZZERS)
|
|
127
132
|
endif()
|
128
133
|
|
129
134
|
|
135
|
+
# Export for people who use us as a dependency
|
136
|
+
|
137
|
+
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
138
|
+
set(LIBGIT2_DEPENDENCY_OBJECTS ${LIBGIT2_DEPENDENCY_OBJECTS} PARENT_SCOPE)
|
139
|
+
set(LIBGIT2_SYSTEM_LIBS ${LIBGIT2_SYSTEM_LIBS} PARENT_SCOPE)
|
140
|
+
endif()
|
141
|
+
|
142
|
+
|
130
143
|
# Summary
|
131
144
|
|
132
145
|
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
|
data/vendor/libgit2/COPYING
CHANGED
@@ -1144,3 +1144,43 @@ worldwide. This software is distributed without any warranty.
|
|
1144
1144
|
|
1145
1145
|
See <http://creativecommons.org/publicdomain/zero/1.0/>.
|
1146
1146
|
|
1147
|
+
----------------------------------------------------------------------
|
1148
|
+
|
1149
|
+
The built-in SHA256 support (src/hash/rfc6234) is taken from RFC 6234
|
1150
|
+
under the following license:
|
1151
|
+
|
1152
|
+
Copyright (c) 2011 IETF Trust and the persons identified as
|
1153
|
+
authors of the code. All rights reserved.
|
1154
|
+
|
1155
|
+
Redistribution and use in source and binary forms, with or
|
1156
|
+
without modification, are permitted provided that the following
|
1157
|
+
conditions are met:
|
1158
|
+
|
1159
|
+
- Redistributions of source code must retain the above
|
1160
|
+
copyright notice, this list of conditions and
|
1161
|
+
the following disclaimer.
|
1162
|
+
|
1163
|
+
- Redistributions in binary form must reproduce the above
|
1164
|
+
copyright notice, this list of conditions and the following
|
1165
|
+
disclaimer in the documentation and/or other materials provided
|
1166
|
+
with the distribution.
|
1167
|
+
|
1168
|
+
- Neither the name of Internet Society, IETF or IETF Trust, nor
|
1169
|
+
the names of specific contributors, may be used to endorse or
|
1170
|
+
promote products derived from this software without specific
|
1171
|
+
prior written permission.
|
1172
|
+
|
1173
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
1174
|
+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
1175
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
1176
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
1177
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
1178
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
1179
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
1180
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
1181
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
1182
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
1183
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
1184
|
+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
1185
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1186
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
function(ADD_CLAR_TEST project name)
|
2
|
+
if(NOT USE_LEAK_CHECKER STREQUAL "OFF")
|
3
|
+
add_test(${name} "${PROJECT_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${PROJECT_BINARY_DIR}/${project}" ${ARGN})
|
4
|
+
else()
|
5
|
+
add_test(${name} "${PROJECT_BINARY_DIR}/${project}" ${ARGN})
|
6
|
+
endif()
|
7
|
+
endfunction(ADD_CLAR_TEST)
|
@@ -16,19 +16,18 @@
|
|
16
16
|
# PCRE_FOUND - True if pcre found.
|
17
17
|
|
18
18
|
# Look for the header file.
|
19
|
-
find_path(PCRE_INCLUDE_DIR NAMES
|
19
|
+
find_path(PCRE_INCLUDE_DIR NAMES pcre.h)
|
20
20
|
|
21
21
|
# Look for the library.
|
22
22
|
find_library(PCRE_LIBRARY NAMES pcre)
|
23
|
-
find_library(PCRE_POSIX_LIBRARY NAMES pcreposix)
|
24
23
|
|
25
24
|
# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
|
26
25
|
include(FindPackageHandleStandardArgs)
|
27
|
-
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY
|
26
|
+
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
|
28
27
|
|
29
28
|
# Copy the results to the output variables.
|
30
29
|
if(PCRE_FOUND)
|
31
|
-
set(PCRE_LIBRARIES ${PCRE_LIBRARY}
|
30
|
+
set(PCRE_LIBRARIES ${PCRE_LIBRARY})
|
32
31
|
set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
|
33
32
|
else(PCRE_FOUND)
|
34
33
|
set(PCRE_LIBRARIES)
|
@@ -64,7 +64,7 @@ if(USE_HTTPS)
|
|
64
64
|
|
65
65
|
if(NOT CERT_LOCATION)
|
66
66
|
message(STATUS "Auto-detecting default certificates location")
|
67
|
-
if(
|
67
|
+
if(EXISTS "/usr/local/opt/openssl/bin/openssl")
|
68
68
|
# Check for an Homebrew installation
|
69
69
|
set(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl")
|
70
70
|
else()
|
@@ -4,6 +4,9 @@ include(SanitizeBool)
|
|
4
4
|
|
5
5
|
# USE_SHA1=CollisionDetection(ON)/HTTPS/Generic/OFF
|
6
6
|
sanitizebool(USE_SHA1)
|
7
|
+
sanitizebool(USE_SHA256)
|
8
|
+
|
9
|
+
# sha1
|
7
10
|
|
8
11
|
if(USE_SHA1 STREQUAL ON)
|
9
12
|
SET(USE_SHA1 "CollisionDetection")
|
@@ -21,32 +24,77 @@ endif()
|
|
21
24
|
|
22
25
|
if(USE_SHA1 STREQUAL "CollisionDetection")
|
23
26
|
set(GIT_SHA1_COLLISIONDETECT 1)
|
24
|
-
add_definitions(-DSHA1DC_NO_STANDARD_INCLUDES=1)
|
25
|
-
add_definitions(-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\")
|
26
|
-
add_definitions(-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\")
|
27
27
|
elseif(USE_SHA1 STREQUAL "OpenSSL")
|
28
|
-
# OPENSSL_FOUND should already be set, we're checking USE_HTTPS
|
29
|
-
|
30
28
|
set(GIT_SHA1_OPENSSL 1)
|
29
|
+
elseif(USE_SHA1 STREQUAL "OpenSSL-Dynamic")
|
30
|
+
set(GIT_SHA1_OPENSSL 1)
|
31
|
+
set(GIT_SHA1_OPENSSL_DYNAMIC 1)
|
32
|
+
list(APPEND LIBGIT2_SYSTEM_LIBS dl)
|
33
|
+
elseif(USE_SHA1 STREQUAL "CommonCrypto")
|
34
|
+
set(GIT_SHA1_COMMON_CRYPTO 1)
|
35
|
+
elseif(USE_SHA1 STREQUAL "mbedTLS")
|
36
|
+
set(GIT_SHA1_MBEDTLS 1)
|
37
|
+
elseif(USE_SHA1 STREQUAL "Win32")
|
38
|
+
set(GIT_SHA1_WIN32 1)
|
39
|
+
else()
|
40
|
+
message(FATAL_ERROR "Asked for unknown SHA1 backend: ${USE_SHA1}")
|
41
|
+
endif()
|
42
|
+
|
43
|
+
# sha256
|
44
|
+
|
45
|
+
if(USE_SHA256 STREQUAL ON AND USE_HTTPS)
|
46
|
+
SET(USE_SHA256 "HTTPS")
|
47
|
+
elseif(USE_SHA256 STREQUAL ON)
|
48
|
+
SET(USE_SHA256 "Builtin")
|
49
|
+
endif()
|
50
|
+
|
51
|
+
if(USE_SHA256 STREQUAL "HTTPS")
|
52
|
+
if(USE_HTTPS STREQUAL "SecureTransport")
|
53
|
+
set(USE_SHA256 "CommonCrypto")
|
54
|
+
elseif(USE_HTTPS STREQUAL "WinHTTP")
|
55
|
+
set(USE_SHA256 "Win32")
|
56
|
+
elseif(USE_HTTPS)
|
57
|
+
set(USE_SHA256 ${USE_HTTPS})
|
58
|
+
endif()
|
59
|
+
endif()
|
60
|
+
|
61
|
+
if(USE_SHA256 STREQUAL "Builtin")
|
62
|
+
set(GIT_SHA256_BUILTIN 1)
|
63
|
+
elseif(USE_SHA256 STREQUAL "OpenSSL")
|
64
|
+
set(GIT_SHA256_OPENSSL 1)
|
65
|
+
elseif(USE_SHA256 STREQUAL "OpenSSL-Dynamic")
|
66
|
+
set(GIT_SHA256_OPENSSL 1)
|
67
|
+
set(GIT_SHA256_OPENSSL_DYNAMIC 1)
|
68
|
+
list(APPEND LIBGIT2_SYSTEM_LIBS dl)
|
69
|
+
elseif(USE_SHA256 STREQUAL "CommonCrypto")
|
70
|
+
set(GIT_SHA256_COMMON_CRYPTO 1)
|
71
|
+
elseif(USE_SHA256 STREQUAL "mbedTLS")
|
72
|
+
set(GIT_SHA256_MBEDTLS 1)
|
73
|
+
elseif(USE_SHA256 STREQUAL "Win32")
|
74
|
+
set(GIT_SHA256_WIN32 1)
|
75
|
+
else()
|
76
|
+
message(FATAL_ERROR "Asked for unknown SHA256 backend: ${USE_SHA256}")
|
77
|
+
endif()
|
78
|
+
|
79
|
+
# add library requirements
|
80
|
+
if(USE_SHA1 STREQUAL "OpenSSL" OR USE_SHA256 STREQUAL "OpenSSL")
|
31
81
|
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
32
82
|
list(APPEND LIBGIT2_PC_LIBS "-lssl")
|
33
83
|
else()
|
34
84
|
list(APPEND LIBGIT2_PC_REQUIRES "openssl")
|
35
85
|
endif()
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
set(GIT_SHA1_MBEDTLS 1)
|
86
|
+
endif()
|
87
|
+
|
88
|
+
if(USE_SHA1 STREQUAL "mbedTLS" OR USE_SHA256 STREQUAL "mbedTLS")
|
40
89
|
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
|
41
90
|
list(APPEND LIBGIT2_SYSTEM_LIBS ${MBEDTLS_LIBRARIES})
|
42
91
|
# mbedTLS has no pkgconfig file, hence we can't require it
|
43
92
|
# https://github.com/ARMmbed/mbedtls/issues/228
|
44
93
|
# For now, pass its link flags as our own
|
45
94
|
list(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
|
46
|
-
elseif(USE_SHA1 STREQUAL "Win32")
|
47
|
-
set(GIT_SHA1_WIN32 1)
|
48
|
-
elseif(NOT (USE_SHA1 STREQUAL "Generic"))
|
49
|
-
message(FATAL_ERROR "Asked for unknown SHA1 backend: ${USE_SHA1}")
|
50
95
|
endif()
|
51
96
|
|
52
|
-
|
97
|
+
# notify feature enablement
|
98
|
+
|
99
|
+
add_feature_info(SHA1 ON "using ${USE_SHA1}")
|
100
|
+
add_feature_info(SHA256 ON "using ${USE_SHA256}")
|
@@ -44,7 +44,9 @@ static inline void HMAC_CTX_free(HMAC_CTX *ctx)
|
|
44
44
|
|
45
45
|
#endif
|
46
46
|
|
47
|
-
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !LIBRESSL_VERSION_NUMBER) ||
|
47
|
+
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || \
|
48
|
+
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x03050000fL) || \
|
49
|
+
defined(CRYPT_OPENSSL_DYNAMIC)
|
48
50
|
|
49
51
|
static inline void HMAC_CTX_cleanup(HMAC_CTX *ctx)
|
50
52
|
{
|
@@ -177,3 +177,10 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2)
|
|
177
177
|
return adler32_combine_(adler1, adler2, len2);
|
178
178
|
}
|
179
179
|
|
180
|
+
uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
|
181
|
+
uLong adler1;
|
182
|
+
uLong adler2;
|
183
|
+
z_off64_t len2;
|
184
|
+
{
|
185
|
+
return adler32_combine_(adler1, adler2, len2);
|
186
|
+
}
|