rugged 1.3.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +34 -2
- data/ext/rugged/extconf.rb +6 -3
- data/ext/rugged/rugged.c +16 -0
- data/ext/rugged/rugged.h +4 -0
- data/ext/rugged/rugged_allocator.c +0 -54
- data/ext/rugged/rugged_blame.c +2 -0
- data/ext/rugged/rugged_blob.c +3 -0
- data/ext/rugged/rugged_commit.c +1 -0
- data/ext/rugged/rugged_config.c +9 -2
- data/ext/rugged/rugged_diff.c +1 -0
- data/ext/rugged/rugged_index.c +2 -0
- data/ext/rugged/rugged_patch.c +1 -0
- data/ext/rugged/rugged_rebase.c +1 -0
- data/ext/rugged/rugged_reference.c +1 -0
- data/ext/rugged/rugged_remote.c +28 -10
- data/ext/rugged/rugged_repo.c +7 -9
- data/ext/rugged/rugged_revwalk.c +5 -1
- data/ext/rugged/rugged_settings.c +5 -0
- data/ext/rugged/rugged_submodule.c +1 -0
- data/ext/rugged/rugged_tag.c +1 -0
- data/ext/rugged/rugged_tree.c +4 -0
- data/lib/rugged/index.rb +1 -1
- data/lib/rugged/tree.rb +5 -1
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +141 -289
- data/vendor/libgit2/COPYING +301 -20
- data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
- data/vendor/libgit2/cmake/AddClarTest.cmake +7 -0
- data/vendor/libgit2/cmake/CheckPrototypeDefinitionSafe.cmake +16 -0
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
- data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
- data/vendor/libgit2/cmake/ExperimentalFeatures.cmake +23 -0
- 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 +17 -17
- data/vendor/libgit2/cmake/FindIntlIconv.cmake +51 -0
- data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +5 -5
- data/vendor/libgit2/cmake/FindPCRE.cmake +12 -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 +8 -8
- 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 +34 -0
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +129 -101
- data/vendor/libgit2/cmake/SelectHashes.cmake +113 -54
- data/vendor/libgit2/cmake/SelectRegex.cmake +56 -0
- data/vendor/libgit2/cmake/SelectSSH.cmake +46 -0
- data/vendor/libgit2/cmake/SelectXdiff.cmake +9 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +38 -0
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +6 -6
- 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 +33 -31
- 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 +7 -5
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +25 -25
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +2 -2
- 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 +89 -88
- data/vendor/libgit2/deps/pcre/LICENCE +5 -5
- data/vendor/libgit2/deps/pcre/pcre.h +2 -2
- data/vendor/libgit2/deps/pcre/pcre_compile.c +6 -3
- data/vendor/libgit2/deps/pcre/pcre_exec.c +2 -2
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
- data/vendor/libgit2/deps/xdiff/CMakeLists.txt +28 -0
- data/vendor/libgit2/deps/xdiff/git-xdiff.h +56 -0
- data/vendor/libgit2/{src → deps}/xdiff/xdiff.h +15 -15
- data/vendor/libgit2/{src → deps}/xdiff/xdiffi.c +152 -125
- data/vendor/libgit2/{src → deps}/xdiff/xdiffi.h +2 -4
- data/vendor/libgit2/{src → deps}/xdiff/xemit.c +26 -10
- data/vendor/libgit2/{src → deps}/xdiff/xhistogram.c +92 -94
- data/vendor/libgit2/{src → deps}/xdiff/xinclude.h +1 -12
- data/vendor/libgit2/{src → deps}/xdiff/xmacros.h +18 -1
- data/vendor/libgit2/{src → deps}/xdiff/xmerge.c +126 -137
- data/vendor/libgit2/{src → deps}/xdiff/xpatience.c +26 -46
- data/vendor/libgit2/{src → deps}/xdiff/xprepare.c +24 -46
- data/vendor/libgit2/{src → deps}/xdiff/xutils.c +36 -8
- data/vendor/libgit2/{src → deps}/xdiff/xutils.h +2 -1
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
- data/vendor/libgit2/deps/zlib/LICENSE +22 -0
- data/vendor/libgit2/deps/zlib/adler32.c +7 -22
- data/vendor/libgit2/deps/zlib/crc32.c +931 -317
- data/vendor/libgit2/deps/zlib/crc32.h +9441 -436
- data/vendor/libgit2/deps/zlib/deflate.c +428 -453
- data/vendor/libgit2/deps/zlib/deflate.h +51 -23
- data/vendor/libgit2/deps/zlib/gzguts.h +15 -19
- data/vendor/libgit2/deps/zlib/infback.c +19 -31
- data/vendor/libgit2/deps/zlib/inffast.c +15 -18
- data/vendor/libgit2/deps/zlib/inffast.h +1 -1
- data/vendor/libgit2/deps/zlib/inflate.c +75 -110
- data/vendor/libgit2/deps/zlib/inflate.h +3 -2
- 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 +294 -380
- data/vendor/libgit2/deps/zlib/zconf.h +23 -14
- data/vendor/libgit2/deps/zlib/zlib.h +310 -284
- data/vendor/libgit2/deps/zlib/zutil.c +20 -46
- data/vendor/libgit2/deps/zlib/zutil.h +24 -41
- data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
- data/vendor/libgit2/include/git2/apply.h +43 -8
- data/vendor/libgit2/include/git2/attr.h +28 -6
- data/vendor/libgit2/include/git2/blame.h +137 -29
- data/vendor/libgit2/include/git2/blob.h +85 -29
- data/vendor/libgit2/include/git2/branch.h +25 -16
- data/vendor/libgit2/include/git2/buffer.h +24 -82
- data/vendor/libgit2/include/git2/cert.h +4 -3
- data/vendor/libgit2/include/git2/checkout.h +88 -34
- data/vendor/libgit2/include/git2/cherrypick.h +10 -3
- data/vendor/libgit2/include/git2/clone.h +28 -12
- data/vendor/libgit2/include/git2/commit.h +134 -3
- data/vendor/libgit2/include/git2/common.h +172 -59
- data/vendor/libgit2/include/git2/config.h +118 -32
- data/vendor/libgit2/include/git2/credential.h +32 -3
- data/vendor/libgit2/include/git2/credential_helpers.h +2 -0
- data/vendor/libgit2/include/git2/deprecated.h +141 -3
- data/vendor/libgit2/include/git2/describe.h +20 -3
- data/vendor/libgit2/include/git2/diff.h +95 -19
- data/vendor/libgit2/include/git2/email.h +10 -30
- data/vendor/libgit2/include/git2/errors.h +51 -61
- data/vendor/libgit2/include/git2/experimental.h +20 -0
- data/vendor/libgit2/include/git2/filter.h +21 -9
- data/vendor/libgit2/include/git2/global.h +8 -1
- data/vendor/libgit2/include/git2/graph.h +4 -2
- data/vendor/libgit2/include/git2/ignore.h +11 -1
- data/vendor/libgit2/include/git2/index.h +111 -11
- data/vendor/libgit2/include/git2/indexer.h +67 -2
- data/vendor/libgit2/include/git2/mailmap.h +7 -1
- data/vendor/libgit2/include/git2/merge.h +70 -5
- data/vendor/libgit2/include/git2/message.h +4 -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 +57 -7
- data/vendor/libgit2/include/git2/odb.h +156 -33
- data/vendor/libgit2/include/git2/odb_backend.h +132 -16
- data/vendor/libgit2/include/git2/oid.h +116 -17
- data/vendor/libgit2/include/git2/oidarray.h +7 -1
- data/vendor/libgit2/include/git2/pack.h +37 -9
- data/vendor/libgit2/include/git2/patch.h +10 -3
- data/vendor/libgit2/include/git2/pathspec.h +10 -1
- data/vendor/libgit2/include/git2/proxy.h +11 -1
- data/vendor/libgit2/include/git2/rebase.h +18 -7
- data/vendor/libgit2/include/git2/refdb.h +5 -2
- data/vendor/libgit2/include/git2/reflog.h +4 -3
- data/vendor/libgit2/include/git2/refs.h +11 -8
- data/vendor/libgit2/include/git2/refspec.h +14 -4
- data/vendor/libgit2/include/git2/remote.h +295 -54
- data/vendor/libgit2/include/git2/repository.h +95 -25
- data/vendor/libgit2/include/git2/reset.h +18 -5
- data/vendor/libgit2/include/git2/revert.h +9 -4
- data/vendor/libgit2/include/git2/revparse.h +4 -4
- data/vendor/libgit2/include/git2/revwalk.h +7 -3
- data/vendor/libgit2/include/git2/signature.h +47 -2
- data/vendor/libgit2/include/git2/stash.h +78 -10
- data/vendor/libgit2/include/git2/status.h +24 -11
- data/vendor/libgit2/include/git2/stdint.h +87 -85
- data/vendor/libgit2/include/git2/strarray.h +2 -16
- data/vendor/libgit2/include/git2/submodule.h +27 -11
- data/vendor/libgit2/include/git2/sys/alloc.h +12 -34
- data/vendor/libgit2/include/git2/sys/commit.h +77 -3
- data/vendor/libgit2/include/git2/sys/commit_graph.h +110 -59
- 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 +47 -4
- data/vendor/libgit2/include/git2/sys/odb_backend.h +10 -9
- 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 +53 -0
- data/vendor/libgit2/include/git2/sys/repository.h +63 -3
- data/vendor/libgit2/include/git2/sys/stream.h +26 -3
- data/vendor/libgit2/include/git2/sys/transport.h +87 -41
- data/vendor/libgit2/include/git2/tag.h +4 -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 +20 -8
- data/vendor/libgit2/include/git2/types.h +26 -10
- data/vendor/libgit2/include/git2/version.h +63 -6
- data/vendor/libgit2/include/git2/worktree.h +30 -8
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +203 -420
- data/vendor/libgit2/src/README.md +12 -0
- data/vendor/libgit2/src/cli/CMakeLists.txt +56 -0
- data/vendor/libgit2/src/cli/README.md +26 -0
- data/vendor/libgit2/src/{branch.h → cli/cmd.c} +10 -8
- data/vendor/libgit2/src/cli/cmd.h +37 -0
- data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
- data/vendor/libgit2/src/cli/cmd_cat_file.c +202 -0
- data/vendor/libgit2/src/cli/cmd_clone.c +190 -0
- data/vendor/libgit2/src/cli/cmd_config.c +241 -0
- data/vendor/libgit2/src/cli/cmd_hash_object.c +152 -0
- data/vendor/libgit2/src/cli/cmd_help.c +85 -0
- 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 +51 -0
- data/vendor/libgit2/src/cli/main.c +134 -0
- data/vendor/libgit2/src/cli/opt.c +695 -0
- data/vendor/libgit2/src/cli/opt.h +367 -0
- data/vendor/libgit2/src/cli/opt_usage.c +263 -0
- data/vendor/libgit2/src/cli/opt_usage.h +40 -0
- data/vendor/libgit2/src/cli/progress.c +395 -0
- data/vendor/libgit2/src/cli/progress.h +129 -0
- data/vendor/libgit2/src/cli/sighandler.h +20 -0
- data/vendor/libgit2/src/cli/unix/sighandler.c +37 -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/libgit2/CMakeLists.txt +140 -0
- data/vendor/libgit2/src/{annotated_commit.c → libgit2/annotated_commit.c} +2 -2
- data/vendor/libgit2/src/{annotated_commit.h → libgit2/annotated_commit.h} +2 -2
- data/vendor/libgit2/src/{apply.c → libgit2/apply.c} +32 -34
- data/vendor/libgit2/src/{apply.h → libgit2/apply.h} +2 -2
- data/vendor/libgit2/src/{attr.c → libgit2/attr.c} +48 -31
- data/vendor/libgit2/src/{attr_file.c → libgit2/attr_file.c} +25 -20
- data/vendor/libgit2/src/{attr_file.h → libgit2/attr_file.h} +6 -4
- data/vendor/libgit2/src/{attrcache.c → libgit2/attrcache.c} +87 -46
- data/vendor/libgit2/src/{attrcache.h → libgit2/attrcache.h} +5 -9
- data/vendor/libgit2/src/{blame.c → libgit2/blame.c} +152 -57
- data/vendor/libgit2/src/{blame.h → libgit2/blame.h} +1 -0
- data/vendor/libgit2/src/{blame_git.c → libgit2/blame_git.c} +1 -2
- data/vendor/libgit2/src/{blob.c → libgit2/blob.c} +38 -29
- data/vendor/libgit2/src/{blob.h → libgit2/blob.h} +3 -3
- data/vendor/libgit2/src/{branch.c → libgit2/branch.c} +164 -118
- data/vendor/libgit2/src/libgit2/branch.h +31 -0
- data/vendor/libgit2/src/libgit2/buf.c +126 -0
- data/vendor/libgit2/src/libgit2/buf.h +50 -0
- data/vendor/libgit2/src/{cache.c → libgit2/cache.c} +22 -17
- data/vendor/libgit2/src/{cache.h → libgit2/cache.h} +7 -9
- data/vendor/libgit2/src/{checkout.c → libgit2/checkout.c} +107 -91
- data/vendor/libgit2/src/{checkout.h → libgit2/checkout.h} +0 -2
- data/vendor/libgit2/src/{cherrypick.c → libgit2/cherrypick.c} +14 -15
- data/vendor/libgit2/src/{clone.c → libgit2/clone.c} +254 -203
- data/vendor/libgit2/src/{clone.h → libgit2/clone.h} +4 -1
- data/vendor/libgit2/src/{commit.c → libgit2/commit.c} +296 -77
- data/vendor/libgit2/src/libgit2/commit.h +87 -0
- data/vendor/libgit2/src/{commit_graph.c → libgit2/commit_graph.c} +246 -135
- data/vendor/libgit2/src/{commit_graph.h → libgit2/commit_graph.h} +33 -8
- data/vendor/libgit2/src/{commit_list.c → libgit2/commit_list.c} +17 -7
- data/vendor/libgit2/src/{commit_list.h → libgit2/commit_list.h} +1 -0
- data/vendor/libgit2/src/libgit2/common.h +55 -0
- data/vendor/libgit2/src/{config.c → libgit2/config.c} +490 -360
- data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
- data/vendor/libgit2/src/{config.h → libgit2/config.h} +24 -6
- data/vendor/libgit2/src/{config_backend.h → libgit2/config_backend.h} +8 -10
- data/vendor/libgit2/src/{config_cache.c → libgit2/config_cache.c} +4 -5
- data/vendor/libgit2/src/{config_file.c → libgit2/config_file.c} +212 -183
- 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 +374 -0
- data/vendor/libgit2/src/{config_parse.c → libgit2/config_parse.c} +37 -32
- data/vendor/libgit2/src/{config_snapshot.c → libgit2/config_snapshot.c} +24 -31
- data/vendor/libgit2/src/{crlf.c → libgit2/crlf.c} +24 -21
- data/vendor/libgit2/src/{describe.c → libgit2/describe.c} +62 -51
- data/vendor/libgit2/src/{diff.c → libgit2/diff.c} +44 -14
- data/vendor/libgit2/src/{diff.h → libgit2/diff.h} +8 -10
- data/vendor/libgit2/src/{diff_driver.c → libgit2/diff_driver.c} +46 -55
- data/vendor/libgit2/src/{diff_driver.h → libgit2/diff_driver.h} +5 -5
- data/vendor/libgit2/src/{diff_file.c → libgit2/diff_file.c} +45 -27
- data/vendor/libgit2/src/{diff_generate.c → libgit2/diff_generate.c} +70 -20
- data/vendor/libgit2/src/{diff_generate.h → libgit2/diff_generate.h} +5 -3
- data/vendor/libgit2/src/{diff_parse.c → libgit2/diff_parse.c} +22 -6
- data/vendor/libgit2/src/{diff_print.c → libgit2/diff_print.c} +192 -105
- data/vendor/libgit2/src/{diff_stats.c → libgit2/diff_stats.c} +40 -29
- data/vendor/libgit2/src/libgit2/diff_stats.h +18 -0
- data/vendor/libgit2/src/{diff_tform.c → libgit2/diff_tform.c} +49 -16
- data/vendor/libgit2/src/{diff_xdiff.c → libgit2/diff_xdiff.c} +4 -8
- data/vendor/libgit2/src/{diff_xdiff.h → libgit2/diff_xdiff.h} +1 -1
- data/vendor/libgit2/src/{email.c → libgit2/email.c} +58 -40
- data/vendor/libgit2/src/{email.h → libgit2/email.h} +1 -1
- data/vendor/libgit2/src/{transports/ssh.h → libgit2/experimental.h.in} +3 -4
- data/vendor/libgit2/src/{fetch.c → libgit2/fetch.c} +105 -30
- data/vendor/libgit2/src/{fetch.h → libgit2/fetch.h} +1 -3
- data/vendor/libgit2/src/{fetchhead.c → libgit2/fetchhead.c} +30 -28
- data/vendor/libgit2/src/{filter.c → libgit2/filter.c} +132 -58
- data/vendor/libgit2/src/{filter.h → libgit2/filter.h} +26 -5
- data/vendor/libgit2/src/{win32 → libgit2}/git2.rc +3 -3
- data/vendor/libgit2/src/libgit2/grafts.c +270 -0
- data/vendor/libgit2/src/libgit2/grafts.h +35 -0
- data/vendor/libgit2/src/{graph.c → libgit2/graph.c} +1 -1
- data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
- data/vendor/libgit2/src/{ident.c → libgit2/ident.c} +20 -20
- data/vendor/libgit2/src/{ignore.c → libgit2/ignore.c} +44 -39
- data/vendor/libgit2/src/{ignore.h → libgit2/ignore.h} +2 -2
- data/vendor/libgit2/src/{index.c → libgit2/index.c} +460 -276
- data/vendor/libgit2/src/{index.h → libgit2/index.h} +21 -5
- data/vendor/libgit2/src/libgit2/index_map.c +95 -0
- data/vendor/libgit2/src/libgit2/index_map.h +28 -0
- data/vendor/libgit2/src/{indexer.c → libgit2/indexer.c} +208 -124
- data/vendor/libgit2/src/{iterator.c → libgit2/iterator.c} +102 -71
- data/vendor/libgit2/src/{iterator.h → libgit2/iterator.h} +8 -5
- data/vendor/libgit2/src/libgit2/libgit2.c +268 -0
- data/vendor/libgit2/src/{mailmap.c → libgit2/mailmap.c} +39 -37
- data/vendor/libgit2/src/{merge.c → libgit2/merge.c} +83 -73
- data/vendor/libgit2/src/{merge.h → libgit2/merge.h} +1 -14
- data/vendor/libgit2/src/{merge_driver.c → libgit2/merge_driver.c} +4 -4
- data/vendor/libgit2/src/{merge_file.c → libgit2/merge_file.c} +13 -5
- data/vendor/libgit2/src/{message.c → libgit2/message.c} +21 -10
- data/vendor/libgit2/src/{midx.c → libgit2/midx.c} +174 -112
- data/vendor/libgit2/src/{midx.h → libgit2/midx.h} +17 -6
- data/vendor/libgit2/src/{mwindow.c → libgit2/mwindow.c} +53 -57
- data/vendor/libgit2/src/{mwindow.h → libgit2/mwindow.h} +9 -2
- data/vendor/libgit2/src/{notes.c → libgit2/notes.c} +29 -37
- data/vendor/libgit2/src/{object.c → libgit2/object.c} +166 -35
- data/vendor/libgit2/src/{object.h → libgit2/object.h} +17 -2
- data/vendor/libgit2/src/{odb.c → libgit2/odb.c} +261 -88
- data/vendor/libgit2/src/{odb.h → libgit2/odb.h} +44 -5
- data/vendor/libgit2/src/{odb_loose.c → libgit2/odb_loose.c} +192 -134
- data/vendor/libgit2/src/{odb_mempack.c → libgit2/odb_mempack.c} +67 -22
- data/vendor/libgit2/src/{odb_pack.c → libgit2/odb_pack.c} +162 -89
- data/vendor/libgit2/src/{oid.c → libgit2/oid.c} +171 -92
- data/vendor/libgit2/src/libgit2/oid.h +284 -0
- data/vendor/libgit2/src/libgit2/oidarray.c +89 -0
- data/vendor/libgit2/src/{oidarray.h → libgit2/oidarray.h} +5 -1
- data/vendor/libgit2/src/{pack-objects.c → libgit2/pack-objects.c} +126 -66
- data/vendor/libgit2/src/{pack-objects.h → libgit2/pack-objects.h} +28 -12
- data/vendor/libgit2/src/{pack.c → libgit2/pack.c} +146 -111
- data/vendor/libgit2/src/{pack.h → libgit2/pack.h} +45 -25
- data/vendor/libgit2/src/{parse.c → libgit2/parse.c} +8 -4
- data/vendor/libgit2/src/{parse.h → libgit2/parse.h} +1 -1
- data/vendor/libgit2/src/{patch.c → libgit2/patch.c} +3 -3
- data/vendor/libgit2/src/{patch.h → libgit2/patch.h} +8 -1
- data/vendor/libgit2/src/{patch_generate.c → libgit2/patch_generate.c} +51 -16
- data/vendor/libgit2/src/{patch_generate.h → libgit2/patch_generate.h} +5 -5
- data/vendor/libgit2/src/{patch_parse.c → libgit2/patch_parse.c} +42 -34
- data/vendor/libgit2/src/libgit2/path.c +375 -0
- data/vendor/libgit2/src/libgit2/path.h +68 -0
- data/vendor/libgit2/src/{pathspec.c → libgit2/pathspec.c} +7 -7
- data/vendor/libgit2/src/{pathspec.h → libgit2/pathspec.h} +2 -2
- data/vendor/libgit2/src/{proxy.c → libgit2/proxy.c} +4 -1
- data/vendor/libgit2/src/{proxy.h → libgit2/proxy.h} +1 -1
- data/vendor/libgit2/src/{push.c → libgit2/push.c} +116 -60
- data/vendor/libgit2/src/{push.h → libgit2/push.h} +5 -16
- data/vendor/libgit2/src/{reader.c → libgit2/reader.c} +9 -9
- data/vendor/libgit2/src/{reader.h → libgit2/reader.h} +2 -2
- data/vendor/libgit2/src/{rebase.c → libgit2/rebase.c} +147 -147
- data/vendor/libgit2/src/{refdb_fs.c → libgit2/refdb_fs.c} +639 -254
- data/vendor/libgit2/src/{reflog.c → libgit2/reflog.c} +8 -7
- data/vendor/libgit2/src/{reflog.h → libgit2/reflog.h} +3 -2
- data/vendor/libgit2/src/{refs.c → libgit2/refs.c} +67 -39
- data/vendor/libgit2/src/{refs.h → libgit2/refs.h} +8 -3
- data/vendor/libgit2/src/{refspec.c → libgit2/refspec.c} +60 -38
- data/vendor/libgit2/src/{refspec.h → libgit2/refspec.h} +13 -2
- data/vendor/libgit2/src/{remote.c → libgit2/remote.c} +821 -454
- data/vendor/libgit2/src/libgit2/remote.h +101 -0
- data/vendor/libgit2/src/{repository.c → libgit2/repository.c} +1377 -594
- data/vendor/libgit2/src/{repository.h → libgit2/repository.h} +43 -12
- data/vendor/libgit2/src/{reset.c → libgit2/reset.c} +8 -5
- data/vendor/libgit2/src/{revert.c → libgit2/revert.c} +18 -22
- data/vendor/libgit2/src/{revparse.c → libgit2/revparse.c} +76 -44
- data/vendor/libgit2/src/{revwalk.c → libgit2/revwalk.c} +48 -19
- data/vendor/libgit2/src/{revwalk.h → libgit2/revwalk.h} +3 -3
- data/vendor/libgit2/src/{libgit2.c → libgit2/settings.c} +162 -95
- data/vendor/libgit2/src/{settings.h → libgit2/settings.h} +6 -2
- data/vendor/libgit2/src/{signature.c → libgit2/signature.c} +144 -21
- data/vendor/libgit2/src/{signature.h → libgit2/signature.h} +1 -2
- data/vendor/libgit2/src/{stash.c → libgit2/stash.c} +243 -68
- data/vendor/libgit2/src/{status.c → libgit2/status.c} +5 -2
- data/vendor/libgit2/src/{strarray.c → libgit2/strarray.c} +1 -0
- data/vendor/libgit2/src/libgit2/strarray.h +25 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/mbedtls.c +62 -67
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl.c +41 -24
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl.h +2 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_dynamic.c +11 -3
- data/vendor/libgit2/src/{streams → libgit2/streams}/openssl_dynamic.h +6 -3
- data/vendor/libgit2/src/libgit2/streams/schannel.c +715 -0
- data/vendor/libgit2/src/libgit2/streams/schannel.h +28 -0
- data/vendor/libgit2/src/libgit2/streams/socket.c +428 -0
- data/vendor/libgit2/src/{streams → libgit2/streams}/socket.h +3 -1
- data/vendor/libgit2/src/{streams → libgit2/streams}/stransport.c +79 -19
- data/vendor/libgit2/src/{streams → libgit2/streams}/tls.c +5 -0
- data/vendor/libgit2/src/{submodule.c → libgit2/submodule.c} +279 -220
- data/vendor/libgit2/src/{submodule.h → libgit2/submodule.h} +10 -11
- data/vendor/libgit2/src/libgit2/sysdir.c +650 -0
- data/vendor/libgit2/src/{sysdir.h → libgit2/sysdir.h} +55 -18
- data/vendor/libgit2/src/{tag.c → libgit2/tag.c} +74 -43
- data/vendor/libgit2/src/{tag.h → libgit2/tag.h} +2 -2
- data/vendor/libgit2/src/{trace.c → libgit2/trace.c} +1 -14
- data/vendor/libgit2/src/{trace.h → libgit2/trace.h} +5 -22
- data/vendor/libgit2/src/{trailer.c → libgit2/trailer.c} +7 -7
- data/vendor/libgit2/src/{transaction.c → libgit2/transaction.c} +27 -21
- data/vendor/libgit2/src/{transaction.h → libgit2/transaction.h} +4 -1
- data/vendor/libgit2/src/{transport.c → libgit2/transport.c} +14 -11
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth.c +7 -9
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth.h +3 -5
- data/vendor/libgit2/src/{transports/auth_negotiate.c → libgit2/transports/auth_gssapi.c} +44 -45
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_negotiate.h +1 -1
- data/vendor/libgit2/src/{transports → libgit2/transports}/auth_ntlm.h +1 -2
- data/vendor/libgit2/src/{transports/auth_ntlm.c → libgit2/transports/auth_ntlmclient.c} +22 -22
- data/vendor/libgit2/src/libgit2/transports/auth_sspi.c +341 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/credential.c +1 -1
- data/vendor/libgit2/src/{transports → libgit2/transports}/git.c +16 -19
- data/vendor/libgit2/src/{transports → libgit2/transports}/http.c +49 -24
- data/vendor/libgit2/src/{transports → libgit2/transports}/http.h +0 -11
- data/vendor/libgit2/src/{transports → libgit2/transports}/httpclient.c +188 -134
- data/vendor/libgit2/src/{transports → libgit2/transports}/httpclient.h +10 -0
- data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
- data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/local.c +159 -127
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart.c +142 -165
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart.h +56 -36
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart_pkt.c +307 -74
- data/vendor/libgit2/src/{transports → libgit2/transports}/smart_protocol.c +297 -97
- data/vendor/libgit2/src/libgit2/transports/ssh.c +85 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +347 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
- data/vendor/libgit2/src/{transports/ssh.c → libgit2/transports/ssh_libssh2.c} +414 -268
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
- data/vendor/libgit2/src/{transports → libgit2/transports}/winhttp.c +101 -75
- data/vendor/libgit2/src/{tree-cache.c → libgit2/tree-cache.c} +30 -20
- data/vendor/libgit2/src/{tree-cache.h → libgit2/tree-cache.h} +7 -5
- data/vendor/libgit2/src/{tree.c → libgit2/tree.c} +128 -110
- data/vendor/libgit2/src/{tree.h → libgit2/tree.h} +7 -6
- data/vendor/libgit2/src/{worktree.c → libgit2/worktree.c} +160 -121
- data/vendor/libgit2/src/{worktree.h → libgit2/worktree.h} +1 -1
- data/vendor/libgit2/src/util/CMakeLists.txt +77 -0
- data/vendor/libgit2/src/{alloc.c → util/alloc.c} +69 -7
- data/vendor/libgit2/src/util/alloc.h +65 -0
- data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
- data/vendor/libgit2/src/util/allocators/debugalloc.h +17 -0
- data/vendor/libgit2/src/util/allocators/failalloc.c +32 -0
- data/vendor/libgit2/src/util/allocators/failalloc.h +17 -0
- data/vendor/libgit2/src/util/allocators/stdalloc.c +37 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/stdalloc.h +1 -1
- data/vendor/libgit2/src/util/allocators/win32_leakcheck.c +50 -0
- data/vendor/libgit2/src/{allocators → util/allocators}/win32_leakcheck.h +1 -1
- data/vendor/libgit2/src/{array.h → util/array.h} +25 -19
- data/vendor/libgit2/src/{assert_safe.h → util/assert_safe.h} +16 -0
- data/vendor/libgit2/src/{cc-compat.h → util/cc-compat.h} +5 -1
- data/vendor/libgit2/src/util/ctype_compat.h +70 -0
- data/vendor/libgit2/src/{date.c → util/date.c} +35 -33
- data/vendor/libgit2/src/util/date.h +45 -0
- data/vendor/libgit2/src/util/errors.c +401 -0
- data/vendor/libgit2/src/{errors.h → util/errors.h} +22 -19
- data/vendor/libgit2/src/{filebuf.c → util/filebuf.c} +35 -30
- data/vendor/libgit2/src/{filebuf.h → util/filebuf.h} +21 -8
- data/vendor/libgit2/src/{path.c → util/fs_path.c} +591 -615
- data/vendor/libgit2/src/{path.h → util/fs_path.h} +257 -181
- data/vendor/libgit2/src/{futils.c → util/futils.c} +144 -95
- data/vendor/libgit2/src/{futils.h → util/futils.h} +40 -18
- data/vendor/libgit2/src/{features.h.in → util/git2_features.h.in} +33 -2
- data/vendor/libgit2/src/{common.h → util/git2_util.h} +26 -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 +3 -3
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/collisiondetect.h +3 -3
- data/vendor/libgit2/src/util/hash/common_crypto.c +112 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/common_crypto.h +11 -3
- data/vendor/libgit2/src/util/hash/mbedtls.c +92 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/mbedtls.h +14 -4
- data/vendor/libgit2/src/util/hash/openssl.c +347 -0
- data/vendor/libgit2/src/util/hash/openssl.h +61 -0
- data/vendor/libgit2/src/util/hash/rfc6234/sha.h +243 -0
- data/vendor/libgit2/src/util/hash/rfc6234/sha224-256.c +601 -0
- data/vendor/libgit2/src/util/hash/sha.h +73 -0
- data/vendor/libgit2/src/{hash/sha1 → util/hash}/sha1dc/sha1.c +1 -1
- data/vendor/libgit2/src/util/hash/win32.c +549 -0
- data/vendor/libgit2/src/util/hash/win32.h +60 -0
- data/vendor/libgit2/src/util/hash.c +158 -0
- data/vendor/libgit2/src/util/hash.h +61 -0
- data/vendor/libgit2/src/util/hashmap.h +424 -0
- data/vendor/libgit2/src/util/hashmap_str.h +43 -0
- data/vendor/libgit2/src/{integer.h → util/integer.h} +3 -1
- data/vendor/libgit2/src/{map.h → util/map.h} +1 -1
- data/vendor/libgit2/src/util/net.c +1160 -0
- data/vendor/libgit2/src/{net.h → util/net.h} +45 -4
- data/vendor/libgit2/src/{pool.c → util/pool.c} +1 -1
- data/vendor/libgit2/src/{pool.h → util/pool.h} +6 -1
- data/vendor/libgit2/src/{posix.c → util/posix.c} +57 -3
- data/vendor/libgit2/src/{posix.h → util/posix.h} +26 -1
- data/vendor/libgit2/src/{pqueue.h → util/pqueue.h} +3 -3
- data/vendor/libgit2/src/util/process.h +222 -0
- data/vendor/libgit2/src/util/rand.c +230 -0
- data/vendor/libgit2/src/util/rand.h +37 -0
- data/vendor/libgit2/src/{regexp.c → util/regexp.c} +5 -5
- 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} +15 -14
- data/vendor/libgit2/src/{sortedcache.h → util/sortedcache.h} +5 -5
- data/vendor/libgit2/src/util/staticstr.h +66 -0
- data/vendor/libgit2/src/{buffer.c → util/str.c} +159 -153
- data/vendor/libgit2/src/util/str.h +357 -0
- data/vendor/libgit2/src/util/strlist.c +108 -0
- data/vendor/libgit2/src/util/strlist.h +36 -0
- data/vendor/libgit2/src/{thread.c → util/thread.c} +1 -1
- data/vendor/libgit2/src/{thread.h → util/thread.h} +23 -22
- data/vendor/libgit2/src/{tsort.c → util/tsort.c} +1 -1
- data/vendor/libgit2/src/{unix → util/unix}/map.c +1 -3
- data/vendor/libgit2/src/{unix → util/unix}/posix.h +1 -6
- data/vendor/libgit2/src/util/unix/process.c +629 -0
- data/vendor/libgit2/src/{unix → util/unix}/realpath.c +24 -8
- 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} +24 -19
- data/vendor/libgit2/src/{util.h → util/util.h} +30 -81
- data/vendor/libgit2/src/{varint.h → util/varint.h} +1 -1
- data/vendor/libgit2/src/{vector.c → util/vector.c} +3 -3
- data/vendor/libgit2/src/{vector.h → util/vector.h} +4 -4
- data/vendor/libgit2/src/{wildmatch.h → util/wildmatch.h} +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/dir.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/error.c +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/error.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/map.c +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/path_w32.c +148 -17
- data/vendor/libgit2/src/{win32 → util/win32}/path_w32.h +3 -1
- data/vendor/libgit2/src/{win32 → util/win32}/posix.h +1 -2
- data/vendor/libgit2/src/{win32 → util/win32}/posix_w32.c +42 -35
- 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/util/win32/process.c +506 -0
- data/vendor/libgit2/src/{win32 → util/win32}/thread.h +1 -1
- data/vendor/libgit2/src/util/win32/utf-conv.c +144 -0
- data/vendor/libgit2/src/util/win32/utf-conv.h +127 -0
- data/vendor/libgit2/src/{win32 → util/win32}/w32_buffer.c +2 -3
- data/vendor/libgit2/src/{win32 → util/win32}/w32_buffer.h +3 -4
- data/vendor/libgit2/src/{win32 → util/win32}/w32_leakcheck.c +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/w32_leakcheck.h +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/w32_util.c +1 -1
- data/vendor/libgit2/src/{win32 → util/win32}/w32_util.h +1 -1
- data/vendor/libgit2/src/{zstream.c → util/zstream.c} +5 -5
- data/vendor/libgit2/src/{zstream.h → util/zstream.h} +5 -5
- metadata +431 -362
- data/vendor/libgit2/cmake/FindIconv.cmake +0 -45
- 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/alloc.h +0 -40
- data/vendor/libgit2/src/allocators/failalloc.c +0 -92
- data/vendor/libgit2/src/allocators/failalloc.h +0 -23
- data/vendor/libgit2/src/allocators/stdalloc.c +0 -150
- data/vendor/libgit2/src/allocators/win32_leakcheck.c +0 -118
- data/vendor/libgit2/src/buffer.h +0 -374
- data/vendor/libgit2/src/commit.h +0 -46
- data/vendor/libgit2/src/config_entries.c +0 -237
- data/vendor/libgit2/src/config_entries.h +0 -24
- data/vendor/libgit2/src/config_mem.c +0 -220
- data/vendor/libgit2/src/errors.c +0 -238
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +0 -57
- 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/mbedtls.c +0 -46
- 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 -38
- data/vendor/libgit2/src/hash.c +0 -110
- data/vendor/libgit2/src/hash.h +0 -46
- data/vendor/libgit2/src/idxmap.c +0 -157
- data/vendor/libgit2/src/idxmap.h +0 -177
- data/vendor/libgit2/src/khash.h +0 -615
- data/vendor/libgit2/src/libgit2.h +0 -15
- data/vendor/libgit2/src/message.h +0 -17
- data/vendor/libgit2/src/net.c +0 -540
- data/vendor/libgit2/src/netops.c +0 -125
- data/vendor/libgit2/src/netops.h +0 -68
- data/vendor/libgit2/src/offmap.c +0 -101
- data/vendor/libgit2/src/offmap.h +0 -133
- data/vendor/libgit2/src/oid.h +0 -51
- data/vendor/libgit2/src/oidarray.c +0 -43
- data/vendor/libgit2/src/oidmap.c +0 -107
- data/vendor/libgit2/src/oidmap.h +0 -128
- data/vendor/libgit2/src/remote.h +0 -55
- data/vendor/libgit2/src/streams/socket.c +0 -239
- data/vendor/libgit2/src/strmap.c +0 -100
- data/vendor/libgit2/src/strmap.h +0 -131
- data/vendor/libgit2/src/sysdir.c +0 -347
- data/vendor/libgit2/src/threadstate.c +0 -84
- data/vendor/libgit2/src/threadstate.h +0 -24
- data/vendor/libgit2/src/win32/findfile.c +0 -230
- data/vendor/libgit2/src/win32/findfile.h +0 -19
- data/vendor/libgit2/src/win32/utf-conv.c +0 -146
- data/vendor/libgit2/src/win32/utf-conv.h +0 -60
- /data/vendor/libgit2/{src → deps}/xdiff/xemit.h +0 -0
- /data/vendor/libgit2/{src → deps}/xdiff/xprepare.h +0 -0
- /data/vendor/libgit2/{src → deps}/xdiff/xtypes.h +0 -0
- /data/vendor/libgit2/src/{win32 → cli/win32}/precompiled.c +0 -0
- /data/vendor/libgit2/src/{attr.h → libgit2/attr.h} +0 -0
- /data/vendor/libgit2/src/{blame_git.h → libgit2/blame_git.h} +0 -0
- /data/vendor/libgit2/src/{config_parse.h → libgit2/config_parse.h} +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/{diff_file.h → libgit2/diff_file.h} +0 -0
- /data/vendor/libgit2/src/{diff_parse.h → libgit2/diff_parse.h} +0 -0
- /data/vendor/libgit2/src/{diff_tform.h → libgit2/diff_tform.h} +0 -0
- /data/vendor/libgit2/src/{fetchhead.h → libgit2/fetchhead.h} +0 -0
- /data/vendor/libgit2/src/{hashsig.c → libgit2/hashsig.c} +0 -0
- /data/vendor/libgit2/src/{indexer.h → libgit2/indexer.h} +0 -0
- /data/vendor/libgit2/src/{mailmap.h → libgit2/mailmap.h} +0 -0
- /data/vendor/libgit2/src/{merge_driver.h → libgit2/merge_driver.h} +0 -0
- /data/vendor/libgit2/src/{notes.h → libgit2/notes.h} +0 -0
- /data/vendor/libgit2/src/{object_api.c → libgit2/object_api.c} +0 -0
- /data/vendor/libgit2/src/{patch_parse.h → libgit2/patch_parse.h} +0 -0
- /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/{repo_template.h → libgit2/repo_template.h} +0 -0
- /data/vendor/libgit2/src/{status.h → libgit2/status.h} +0 -0
- /data/vendor/libgit2/src/{stream.h → libgit2/stream.h} +0 -0
- /data/vendor/libgit2/src/{streams → libgit2/streams}/mbedtls.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}/stransport.h +0 -0
- /data/vendor/libgit2/src/{streams → libgit2/streams}/tls.h +0 -0
- /data/vendor/libgit2/src/{transports → libgit2/transports}/credential_helpers.c +0 -0
- /data/vendor/libgit2/src/{userdiff.h → libgit2/userdiff.h} +0 -0
- /data/vendor/libgit2/src/{bitvec.h → util/bitvec.h} +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/{pqueue.c → util/pqueue.c} +0 -0
- /data/vendor/libgit2/src/{strnlen.h → util/strnlen.h} +0 -0
- /data/vendor/libgit2/src/{unix → util/unix}/pthread.h +0 -0
- /data/vendor/libgit2/src/{varint.c → util/varint.c} +0 -0
- /data/vendor/libgit2/src/{wildmatch.c → util/wildmatch.c} +0 -0
- /data/vendor/libgit2/src/{win32 → util/win32}/dir.c +0 -0
- /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}/reparse.h +0 -0
- /data/vendor/libgit2/src/{win32 → util/win32}/thread.c +0 -0
- /data/vendor/libgit2/src/{win32 → util/win32}/version.h +0 -0
- /data/vendor/libgit2/src/{win32 → util/win32}/w32_common.h +0 -0
- /data/vendor/libgit2/src/{win32 → util/win32}/win32-compat.h +0 -0
@@ -0,0 +1,140 @@
|
|
1
|
+
# libgit2: the shared library: this CMakeLists.txt compiles the core
|
2
|
+
# git library functionality.
|
3
|
+
|
4
|
+
add_library(libgit2 OBJECT)
|
5
|
+
|
6
|
+
include(PkgBuildConfig)
|
7
|
+
include(CMakePackageConfigHelpers)
|
8
|
+
|
9
|
+
set(LIBGIT2_INCLUDES
|
10
|
+
"${PROJECT_BINARY_DIR}/src/util"
|
11
|
+
"${PROJECT_BINARY_DIR}/include"
|
12
|
+
"${PROJECT_SOURCE_DIR}/src/libgit2"
|
13
|
+
"${PROJECT_SOURCE_DIR}/src/util"
|
14
|
+
"${PROJECT_SOURCE_DIR}/include")
|
15
|
+
|
16
|
+
# Collect sourcefiles
|
17
|
+
file(GLOB SRC_H
|
18
|
+
"${PROJECT_SOURCE_DIR}/include/git2.h"
|
19
|
+
"${PROJECT_SOURCE_DIR}/include/git2/*.h"
|
20
|
+
"${PROJECT_SOURCE_DIR}/include/git2/sys/*.h")
|
21
|
+
list(SORT SRC_H)
|
22
|
+
target_sources(libgit2 PRIVATE ${SRC_H})
|
23
|
+
|
24
|
+
file(GLOB SRC_GIT2 *.c *.h
|
25
|
+
streams/*.c streams/*.h
|
26
|
+
transports/*.c transports/*.h)
|
27
|
+
list(SORT SRC_GIT2)
|
28
|
+
target_sources(libgit2 PRIVATE ${SRC_GIT2})
|
29
|
+
|
30
|
+
if(WIN32 AND NOT CYGWIN)
|
31
|
+
# Add resource information on Windows
|
32
|
+
set(SRC_RC "git2.rc")
|
33
|
+
endif()
|
34
|
+
|
35
|
+
if(APPLE)
|
36
|
+
# The old Secure Transport API has been deprecated in macOS 10.15.
|
37
|
+
set_source_files_properties(streams/stransport.c PROPERTIES COMPILE_FLAGS -Wno-deprecated)
|
38
|
+
endif()
|
39
|
+
|
40
|
+
ide_split_sources(libgit2)
|
41
|
+
list(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:util> $<TARGET_OBJECTS:libgit2> ${LIBGIT2_DEPENDENCY_OBJECTS})
|
42
|
+
list(APPEND LIBGIT2_INCLUDES ${LIBGIT2_DEPENDENCY_INCLUDES})
|
43
|
+
|
44
|
+
target_include_directories(libgit2 PRIVATE ${LIBGIT2_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES} PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
45
|
+
target_include_directories(libgit2 SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
|
46
|
+
|
47
|
+
set(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
|
48
|
+
set(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE)
|
49
|
+
set(LIBGIT2_DEPENDENCY_INCLUDES ${LIBGIT2_DEPENDENCY_INCLUDES} PARENT_SCOPE)
|
50
|
+
set(LIBGIT2_DEPENDENCY_OBJECTS ${LIBGIT2_DEPENDENCY_OBJECTS} PARENT_SCOPE)
|
51
|
+
set(LIBGIT2_SYSTEM_INCLUDES ${LIBGIT2_SYSTEM_INCLUDES} PARENT_SCOPE)
|
52
|
+
set(LIBGIT2_SYSTEM_LIBS ${LIBGIT2_SYSTEM_LIBS} PARENT_SCOPE)
|
53
|
+
|
54
|
+
#
|
55
|
+
# Compile and link libgit2
|
56
|
+
#
|
57
|
+
|
58
|
+
add_library(libgit2package ${SRC_RC} ${LIBGIT2_OBJECTS})
|
59
|
+
target_link_libraries(libgit2package ${LIBGIT2_SYSTEM_LIBS})
|
60
|
+
target_include_directories(libgit2package SYSTEM PRIVATE ${LIBGIT2_INCLUDES})
|
61
|
+
target_include_directories(libgit2package INTERFACE $<INSTALL_INTERFACE:./include/git2>)
|
62
|
+
|
63
|
+
set_target_properties(libgit2package PROPERTIES C_STANDARD 90)
|
64
|
+
set_target_properties(libgit2package PROPERTIES C_EXTENSIONS OFF)
|
65
|
+
set_target_properties(libgit2package PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
66
|
+
set_target_properties(libgit2package PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
67
|
+
set_target_properties(libgit2package PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
68
|
+
|
69
|
+
ide_split_sources(libgit2package)
|
70
|
+
|
71
|
+
if(SONAME)
|
72
|
+
set_target_properties(libgit2package PROPERTIES VERSION ${libgit2_VERSION})
|
73
|
+
set_target_properties(libgit2package PROPERTIES SOVERSION "${libgit2_VERSION_MAJOR}.${libgit2_VERSION_MINOR}")
|
74
|
+
if(LIBGIT2_FILENAME)
|
75
|
+
target_compile_definitions(libgit2package PRIVATE LIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")
|
76
|
+
set_target_properties(libgit2package PROPERTIES OUTPUT_NAME ${LIBGIT2_FILENAME})
|
77
|
+
elseif(DEFINED LIBGIT2_PREFIX)
|
78
|
+
set_target_properties(libgit2package PROPERTIES PREFIX "${LIBGIT2_PREFIX}")
|
79
|
+
endif()
|
80
|
+
endif()
|
81
|
+
|
82
|
+
pkg_build_config(NAME "lib${LIBGIT2_FILENAME}"
|
83
|
+
VERSION ${libgit2_VERSION}
|
84
|
+
DESCRIPTION "The git library, take 2"
|
85
|
+
LIBS_SELF ${LIBGIT2_FILENAME}
|
86
|
+
PRIVATE_LIBS ${LIBGIT2_PC_LIBS}
|
87
|
+
REQUIRES ${LIBGIT2_PC_REQUIRES})
|
88
|
+
|
89
|
+
if(MSVC_IDE)
|
90
|
+
# Precompiled headers
|
91
|
+
set_target_properties(libgit2package PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
|
92
|
+
set_source_files_properties(win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
|
93
|
+
endif()
|
94
|
+
|
95
|
+
# support experimental features and functionality
|
96
|
+
|
97
|
+
configure_file(experimental.h.in "${PROJECT_BINARY_DIR}/include/git2/experimental.h")
|
98
|
+
|
99
|
+
# translate filenames in the git2.h so that they match the install directory
|
100
|
+
# (allows for side-by-side installs of libgit2 and libgit2-experimental.)
|
101
|
+
|
102
|
+
FILE(READ "${PROJECT_SOURCE_DIR}/include/git2.h" LIBGIT2_INCLUDE)
|
103
|
+
STRING(REGEX REPLACE "#include \"git2\/" "#include \"${LIBGIT2_FILENAME}/" LIBGIT2_INCLUDE "${LIBGIT2_INCLUDE}")
|
104
|
+
FILE(WRITE "${PROJECT_BINARY_DIR}/include/${LIBGIT2_FILENAME}.h" ${LIBGIT2_INCLUDE})
|
105
|
+
|
106
|
+
# cmake package targets
|
107
|
+
|
108
|
+
set(LIBGIT2_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
109
|
+
|
110
|
+
write_basic_package_version_file(
|
111
|
+
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
|
112
|
+
VERSION ${PROJECT_VERSION}
|
113
|
+
COMPATIBILITY SameMajorVersion)
|
114
|
+
|
115
|
+
configure_file(config.cmake.in
|
116
|
+
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
|
117
|
+
@ONLY)
|
118
|
+
|
119
|
+
install(FILES
|
120
|
+
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
|
121
|
+
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
|
122
|
+
DESTINATION "lib/cmake/${PROJECT_NAME}")
|
123
|
+
install(
|
124
|
+
EXPORT ${LIBGIT2_TARGETS_EXPORT_NAME}
|
125
|
+
NAMESPACE "${PROJECT_NAME}::"
|
126
|
+
DESTINATION "lib/cmake/${PROJECT_NAME}")
|
127
|
+
|
128
|
+
# Install
|
129
|
+
|
130
|
+
install(TARGETS libgit2package
|
131
|
+
EXPORT ${LIBGIT2_TARGETS_EXPORT_NAME}
|
132
|
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
133
|
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
134
|
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
135
|
+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/git2/
|
136
|
+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBGIT2_FILENAME}")
|
137
|
+
install(FILES ${PROJECT_BINARY_DIR}/include/git2/experimental.h
|
138
|
+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBGIT2_FILENAME}")
|
139
|
+
install(FILES "${PROJECT_BINARY_DIR}/include/${LIBGIT2_FILENAME}.h"
|
140
|
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
@@ -39,8 +39,8 @@ static int annotated_commit_init(
|
|
39
39
|
if ((error = git_commit_dup(&annotated_commit->commit, commit)) < 0)
|
40
40
|
goto done;
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
git_oid_tostr(annotated_commit->id_str, GIT_OID_MAX_HEXSIZE + 1,
|
43
|
+
git_commit_id(commit));
|
44
44
|
|
45
45
|
if (!description)
|
46
46
|
description = annotated_commit->id_str;
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
typedef enum {
|
17
17
|
GIT_ANNOTATED_COMMIT_REAL = 1,
|
18
|
-
GIT_ANNOTATED_COMMIT_VIRTUAL = 2
|
18
|
+
GIT_ANNOTATED_COMMIT_VIRTUAL = 2
|
19
19
|
} git_annotated_commit_t;
|
20
20
|
|
21
21
|
/**
|
@@ -41,7 +41,7 @@ struct git_annotated_commit {
|
|
41
41
|
const char *ref_name;
|
42
42
|
const char *remote_url;
|
43
43
|
|
44
|
-
char id_str[
|
44
|
+
char id_str[GIT_OID_MAX_HEXSIZE + 1];
|
45
45
|
};
|
46
46
|
|
47
47
|
extern int git_annotated_commit_from_head(git_annotated_commit **out,
|
@@ -19,6 +19,8 @@
|
|
19
19
|
#include "zstream.h"
|
20
20
|
#include "reader.h"
|
21
21
|
#include "index.h"
|
22
|
+
#include "repository.h"
|
23
|
+
#include "hashmap_str.h"
|
22
24
|
#include "apply.h"
|
23
25
|
|
24
26
|
typedef struct {
|
@@ -95,7 +97,7 @@ static void patch_image_free(patch_image *image)
|
|
95
97
|
return;
|
96
98
|
|
97
99
|
git_pool_clear(&image->pool);
|
98
|
-
|
100
|
+
git_vector_dispose(&image->lines);
|
99
101
|
}
|
100
102
|
|
101
103
|
static bool match_hunk(
|
@@ -265,7 +267,7 @@ done:
|
|
265
267
|
}
|
266
268
|
|
267
269
|
static int apply_hunks(
|
268
|
-
|
270
|
+
git_str *out,
|
269
271
|
const char *source,
|
270
272
|
size_t source_len,
|
271
273
|
git_patch *patch,
|
@@ -286,7 +288,7 @@ static int apply_hunks(
|
|
286
288
|
}
|
287
289
|
|
288
290
|
git_vector_foreach(&image.lines, i, line)
|
289
|
-
|
291
|
+
git_str_put(out, line->content, line->content_len);
|
290
292
|
|
291
293
|
done:
|
292
294
|
patch_image_free(&image);
|
@@ -295,24 +297,24 @@ done:
|
|
295
297
|
}
|
296
298
|
|
297
299
|
static int apply_binary_delta(
|
298
|
-
|
300
|
+
git_str *out,
|
299
301
|
const char *source,
|
300
302
|
size_t source_len,
|
301
303
|
git_diff_binary_file *binary_file)
|
302
304
|
{
|
303
|
-
|
305
|
+
git_str inflated = GIT_STR_INIT;
|
304
306
|
int error = 0;
|
305
307
|
|
306
308
|
/* no diff means identical contents */
|
307
309
|
if (binary_file->datalen == 0)
|
308
|
-
return
|
310
|
+
return git_str_put(out, source, source_len);
|
309
311
|
|
310
312
|
error = git_zstream_inflatebuf(&inflated,
|
311
313
|
binary_file->data, binary_file->datalen);
|
312
314
|
|
313
315
|
if (!error && inflated.size != binary_file->inflatedlen) {
|
314
316
|
error = apply_err("inflated delta does not match expected length");
|
315
|
-
|
317
|
+
git_str_dispose(out);
|
316
318
|
}
|
317
319
|
|
318
320
|
if (error < 0)
|
@@ -330,7 +332,7 @@ static int apply_binary_delta(
|
|
330
332
|
out->asize = data_len;
|
331
333
|
}
|
332
334
|
else if (binary_file->type == GIT_DIFF_BINARY_LITERAL) {
|
333
|
-
|
335
|
+
git_str_swap(out, &inflated);
|
334
336
|
}
|
335
337
|
else {
|
336
338
|
error = apply_err("unknown binary delta type");
|
@@ -338,17 +340,17 @@ static int apply_binary_delta(
|
|
338
340
|
}
|
339
341
|
|
340
342
|
done:
|
341
|
-
|
343
|
+
git_str_dispose(&inflated);
|
342
344
|
return error;
|
343
345
|
}
|
344
346
|
|
345
347
|
static int apply_binary(
|
346
|
-
|
348
|
+
git_str *out,
|
347
349
|
const char *source,
|
348
350
|
size_t source_len,
|
349
351
|
git_patch *patch)
|
350
352
|
{
|
351
|
-
|
353
|
+
git_str reverse = GIT_STR_INIT;
|
352
354
|
int error = 0;
|
353
355
|
|
354
356
|
if (!patch->binary.contains_data) {
|
@@ -378,14 +380,14 @@ static int apply_binary(
|
|
378
380
|
|
379
381
|
done:
|
380
382
|
if (error < 0)
|
381
|
-
|
383
|
+
git_str_dispose(out);
|
382
384
|
|
383
|
-
|
385
|
+
git_str_dispose(&reverse);
|
384
386
|
return error;
|
385
387
|
}
|
386
388
|
|
387
389
|
int git_apply__patch(
|
388
|
-
|
390
|
+
git_str *contents_out,
|
389
391
|
char **filename_out,
|
390
392
|
unsigned int *mode_out,
|
391
393
|
const char *source,
|
@@ -423,13 +425,13 @@ int git_apply__patch(
|
|
423
425
|
else if (patch->hunks.size)
|
424
426
|
error = apply_hunks(contents_out, source, source_len, patch, &ctx);
|
425
427
|
else
|
426
|
-
error =
|
428
|
+
error = git_str_put(contents_out, source, source_len);
|
427
429
|
|
428
430
|
if (error)
|
429
431
|
goto done;
|
430
432
|
|
431
433
|
if (patch->delta->status == GIT_DELTA_DELETED &&
|
432
|
-
|
434
|
+
git_str_len(contents_out) > 0) {
|
433
435
|
error = apply_err("removal patch leaves file contents");
|
434
436
|
goto done;
|
435
437
|
}
|
@@ -451,12 +453,12 @@ static int apply_one(
|
|
451
453
|
git_reader *postimage_reader,
|
452
454
|
git_index *postimage,
|
453
455
|
git_diff *diff,
|
454
|
-
|
456
|
+
git_hashset_str *removed_paths,
|
455
457
|
size_t i,
|
456
458
|
const git_apply_options *opts)
|
457
459
|
{
|
458
460
|
git_patch *patch = NULL;
|
459
|
-
|
461
|
+
git_str pre_contents = GIT_STR_INIT, post_contents = GIT_STR_INIT;
|
460
462
|
const git_diff_delta *delta;
|
461
463
|
char *filename = NULL;
|
462
464
|
unsigned int mode;
|
@@ -488,7 +490,7 @@ static int apply_one(
|
|
488
490
|
*/
|
489
491
|
if (delta->status != GIT_DELTA_RENAMED &&
|
490
492
|
delta->status != GIT_DELTA_ADDED) {
|
491
|
-
if (
|
493
|
+
if (git_hashset_str_contains(removed_paths, delta->old_file.path)) {
|
492
494
|
error = apply_err("path '%s' has been renamed or deleted", delta->old_file.path);
|
493
495
|
goto done;
|
494
496
|
}
|
@@ -572,15 +574,15 @@ static int apply_one(
|
|
572
574
|
|
573
575
|
if (delta->status == GIT_DELTA_RENAMED ||
|
574
576
|
delta->status == GIT_DELTA_DELETED)
|
575
|
-
error =
|
577
|
+
error = git_hashset_str_add(removed_paths, delta->old_file.path);
|
576
578
|
|
577
579
|
if (delta->status == GIT_DELTA_RENAMED ||
|
578
580
|
delta->status == GIT_DELTA_ADDED)
|
579
|
-
|
581
|
+
git_hashset_str_remove(removed_paths, delta->new_file.path);
|
580
582
|
|
581
583
|
done:
|
582
|
-
|
583
|
-
|
584
|
+
git_str_dispose(&pre_contents);
|
585
|
+
git_str_dispose(&post_contents);
|
584
586
|
git__free(filename);
|
585
587
|
git_patch_free(patch);
|
586
588
|
|
@@ -596,20 +598,17 @@ static int apply_deltas(
|
|
596
598
|
git_diff *diff,
|
597
599
|
const git_apply_options *opts)
|
598
600
|
{
|
599
|
-
|
601
|
+
git_hashset_str removed_paths = GIT_HASHSET_INIT;
|
600
602
|
size_t i;
|
601
603
|
int error = 0;
|
602
604
|
|
603
|
-
if (git_strmap_new(&removed_paths) < 0)
|
604
|
-
return -1;
|
605
|
-
|
606
605
|
for (i = 0; i < git_diff_num_deltas(diff); i++) {
|
607
|
-
if ((error = apply_one(repo, pre_reader, preimage, post_reader, postimage, diff, removed_paths, i, opts)) < 0)
|
606
|
+
if ((error = apply_one(repo, pre_reader, preimage, post_reader, postimage, diff, &removed_paths, i, opts)) < 0)
|
608
607
|
goto done;
|
609
608
|
}
|
610
609
|
|
611
610
|
done:
|
612
|
-
|
611
|
+
git_hashset_str_dispose(&removed_paths);
|
613
612
|
return error;
|
614
613
|
}
|
615
614
|
|
@@ -644,7 +643,7 @@ int git_apply_to_tree(
|
|
644
643
|
* put the current tree into the postimage as-is - the diff will
|
645
644
|
* replace any entries contained therein
|
646
645
|
*/
|
647
|
-
if ((error =
|
646
|
+
if ((error = git_index__new(&postimage, repo->oid_type)) < 0 ||
|
648
647
|
(error = git_index_read_tree(postimage, preimage)) < 0 ||
|
649
648
|
(error = git_reader_for_index(&post_reader, repo, postimage)) < 0)
|
650
649
|
goto done;
|
@@ -714,7 +713,6 @@ static int git_apply__to_workdir(
|
|
714
713
|
goto done;
|
715
714
|
}
|
716
715
|
|
717
|
-
checkout_opts.checkout_strategy |= GIT_CHECKOUT_SAFE;
|
718
716
|
checkout_opts.checkout_strategy |= GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH;
|
719
717
|
checkout_opts.checkout_strategy |= GIT_CHECKOUT_DONT_WRITE_INDEX;
|
720
718
|
|
@@ -729,7 +727,7 @@ static int git_apply__to_workdir(
|
|
729
727
|
error = git_checkout_index(repo, postimage, &checkout_opts);
|
730
728
|
|
731
729
|
done:
|
732
|
-
|
730
|
+
git_vector_dispose(&paths);
|
733
731
|
return error;
|
734
732
|
}
|
735
733
|
|
@@ -851,8 +849,8 @@ int git_apply(
|
|
851
849
|
* having the full repo index, so we will limit our checkout
|
852
850
|
* to only write these files that were affected by the diff.
|
853
851
|
*/
|
854
|
-
if ((error =
|
855
|
-
(error =
|
852
|
+
if ((error = git_index__new(&preimage, repo->oid_type)) < 0 ||
|
853
|
+
(error = git_index__new(&postimage, repo->oid_type)) < 0 ||
|
856
854
|
(error = git_reader_for_index(&post_reader, repo, postimage)) < 0)
|
857
855
|
goto done;
|
858
856
|
|
@@ -13,6 +13,7 @@
|
|
13
13
|
#include "attr_file.h"
|
14
14
|
#include "ignore.h"
|
15
15
|
#include "git2/oid.h"
|
16
|
+
#include "hashmap_str.h"
|
16
17
|
#include <ctype.h>
|
17
18
|
|
18
19
|
const char *git_attr__true = "[internal]__TRUE__";
|
@@ -254,7 +255,7 @@ int git_attr_foreach_ext(
|
|
254
255
|
git_attr_file *file;
|
255
256
|
git_attr_rule *rule;
|
256
257
|
git_attr_assignment *assign;
|
257
|
-
|
258
|
+
git_hashset_str seen = GIT_HASHSET_INIT;
|
258
259
|
git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN;
|
259
260
|
|
260
261
|
GIT_ASSERT_ARG(repo);
|
@@ -267,8 +268,7 @@ int git_attr_foreach_ext(
|
|
267
268
|
if (git_attr_path__init(&path, pathname, git_repository_workdir(repo), dir_flag) < 0)
|
268
269
|
return -1;
|
269
270
|
|
270
|
-
if ((error = collect_attr_files(repo, NULL, opts, pathname, &files)) < 0
|
271
|
-
(error = git_strmap_new(&seen)) < 0)
|
271
|
+
if ((error = collect_attr_files(repo, NULL, opts, pathname, &files)) < 0)
|
272
272
|
goto cleanup;
|
273
273
|
|
274
274
|
git_vector_foreach(&files, i, file) {
|
@@ -277,10 +277,10 @@ int git_attr_foreach_ext(
|
|
277
277
|
|
278
278
|
git_vector_foreach(&rule->assigns, k, assign) {
|
279
279
|
/* skip if higher priority assignment was already seen */
|
280
|
-
if (
|
280
|
+
if (git_hashset_str_contains(&seen, assign->name))
|
281
281
|
continue;
|
282
282
|
|
283
|
-
if ((error =
|
283
|
+
if ((error = git_hashset_str_add(&seen, assign->name)) < 0)
|
284
284
|
goto cleanup;
|
285
285
|
|
286
286
|
error = callback(assign->name, assign->value, payload);
|
@@ -293,7 +293,7 @@ int git_attr_foreach_ext(
|
|
293
293
|
}
|
294
294
|
|
295
295
|
cleanup:
|
296
|
-
|
296
|
+
git_hashset_str_dispose(&seen);
|
297
297
|
release_attr_files(&files);
|
298
298
|
git_attr_path__free(&path);
|
299
299
|
|
@@ -338,7 +338,7 @@ GIT_INLINE(int) preload_attr_file(
|
|
338
338
|
}
|
339
339
|
|
340
340
|
static int system_attr_file(
|
341
|
-
|
341
|
+
git_str *out,
|
342
342
|
git_attr_session *attr_session)
|
343
343
|
{
|
344
344
|
int error;
|
@@ -366,11 +366,11 @@ static int system_attr_file(
|
|
366
366
|
if (attr_session->sysdir.size == 0)
|
367
367
|
return GIT_ENOTFOUND;
|
368
368
|
|
369
|
-
/* We can safely provide a
|
370
|
-
* a consumer. This allows them to treat this as a regular `
|
371
|
-
* but their call to `
|
369
|
+
/* We can safely provide a git_str with no allocation (asize == 0) to
|
370
|
+
* a consumer. This allows them to treat this as a regular `git_str`,
|
371
|
+
* but their call to `git_str_dispose` will not attempt to free it.
|
372
372
|
*/
|
373
|
-
|
373
|
+
git_str_attach_notowned(
|
374
374
|
out, attr_session->sysdir.ptr, attr_session->sysdir.size);
|
375
375
|
return 0;
|
376
376
|
}
|
@@ -380,10 +380,12 @@ static int attr_setup(
|
|
380
380
|
git_attr_session *attr_session,
|
381
381
|
git_attr_options *opts)
|
382
382
|
{
|
383
|
-
|
383
|
+
git_str system = GIT_STR_INIT, info = GIT_STR_INIT;
|
384
384
|
git_attr_file_source index_source = { GIT_ATTR_FILE_SOURCE_INDEX, NULL, GIT_ATTR_FILE, NULL };
|
385
385
|
git_attr_file_source head_source = { GIT_ATTR_FILE_SOURCE_HEAD, NULL, GIT_ATTR_FILE, NULL };
|
386
386
|
git_attr_file_source commit_source = { GIT_ATTR_FILE_SOURCE_COMMIT, NULL, GIT_ATTR_FILE, NULL };
|
387
|
+
git_attr_cache *attrcache;
|
388
|
+
const char *attr_cfg_file = NULL;
|
387
389
|
git_index *idx = NULL;
|
388
390
|
const char *workdir;
|
389
391
|
int error = 0;
|
@@ -407,11 +409,13 @@ static int attr_setup(
|
|
407
409
|
error = 0;
|
408
410
|
}
|
409
411
|
|
410
|
-
if ((
|
411
|
-
|
412
|
+
if ((attrcache = git_repository_attr_cache(repo)) != NULL)
|
413
|
+
attr_cfg_file = git_attr_cache_attributesfile(attrcache);
|
414
|
+
|
415
|
+
if ((error = preload_attr_file(repo, attr_session, NULL, attr_cfg_file)) < 0)
|
412
416
|
goto out;
|
413
417
|
|
414
|
-
if ((error =
|
418
|
+
if ((error = git_repository__item_path(&info, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 ||
|
415
419
|
(error = preload_attr_file(repo, attr_session, info.ptr, GIT_ATTR_FILE_INREPO)) < 0) {
|
416
420
|
if (error != GIT_ENOTFOUND)
|
417
421
|
goto out;
|
@@ -424,9 +428,13 @@ static int attr_setup(
|
|
424
428
|
goto out;
|
425
429
|
|
426
430
|
if ((error = git_repository_index__weakptr(&idx, repo)) < 0 ||
|
427
|
-
(error = preload_attr_source(repo, attr_session, &index_source)) < 0)
|
431
|
+
(error = preload_attr_source(repo, attr_session, &index_source)) < 0) {
|
432
|
+
if (error != GIT_ENOTFOUND)
|
428
433
|
goto out;
|
429
434
|
|
435
|
+
error = 0;
|
436
|
+
}
|
437
|
+
|
430
438
|
if ((opts && (opts->flags & GIT_ATTR_CHECK_INCLUDE_HEAD) != 0) &&
|
431
439
|
(error = preload_attr_source(repo, attr_session, &head_source)) < 0)
|
432
440
|
goto out;
|
@@ -447,8 +455,8 @@ static int attr_setup(
|
|
447
455
|
attr_session->init_setup = 1;
|
448
456
|
|
449
457
|
out:
|
450
|
-
|
451
|
-
|
458
|
+
git_str_dispose(&system);
|
459
|
+
git_str_dispose(&info);
|
452
460
|
|
453
461
|
return error;
|
454
462
|
}
|
@@ -460,6 +468,7 @@ int git_attr_add_macro(
|
|
460
468
|
{
|
461
469
|
int error;
|
462
470
|
git_attr_rule *macro = NULL;
|
471
|
+
git_attr_cache *attrcache;
|
463
472
|
git_pool *pool;
|
464
473
|
|
465
474
|
GIT_ASSERT_ARG(repo);
|
@@ -471,7 +480,8 @@ int git_attr_add_macro(
|
|
471
480
|
macro = git__calloc(1, sizeof(git_attr_rule));
|
472
481
|
GIT_ERROR_CHECK_ALLOC(macro);
|
473
482
|
|
474
|
-
|
483
|
+
attrcache = git_repository_attr_cache(repo);
|
484
|
+
pool = git_attr_cache_pool(attrcache);
|
475
485
|
|
476
486
|
macro->match.pattern = git_pool_strdup(pool, name);
|
477
487
|
GIT_ERROR_CHECK_ALLOC(macro->match.pattern);
|
@@ -614,7 +624,7 @@ static void release_attr_files(git_vector *files)
|
|
614
624
|
git_attr_file__free(file);
|
615
625
|
files->contents[i] = NULL;
|
616
626
|
}
|
617
|
-
|
627
|
+
git_vector_dispose(files);
|
618
628
|
}
|
619
629
|
|
620
630
|
static int collect_attr_files(
|
@@ -625,11 +635,13 @@ static int collect_attr_files(
|
|
625
635
|
git_vector *files)
|
626
636
|
{
|
627
637
|
int error = 0;
|
628
|
-
|
638
|
+
git_str dir = GIT_STR_INIT, attrfile = GIT_STR_INIT;
|
629
639
|
const char *workdir = git_repository_workdir(repo);
|
640
|
+
git_attr_cache *attrcache;
|
641
|
+
const char *attr_cfg_file = NULL;
|
630
642
|
attr_walk_up_info info = { NULL };
|
631
643
|
|
632
|
-
GIT_ASSERT(!
|
644
|
+
GIT_ASSERT(!git_fs_path_is_absolute(path));
|
633
645
|
|
634
646
|
if ((error = attr_setup(repo, attr_session, opts)) < 0)
|
635
647
|
return error;
|
@@ -637,23 +649,23 @@ static int collect_attr_files(
|
|
637
649
|
/* Resolve path in a non-bare repo */
|
638
650
|
if (workdir != NULL) {
|
639
651
|
if (!(error = git_repository_workdir_path(&dir, repo, path)))
|
640
|
-
error =
|
652
|
+
error = git_fs_path_find_dir(&dir);
|
641
653
|
}
|
642
654
|
else {
|
643
|
-
error =
|
655
|
+
error = git_fs_path_dirname_r(&dir, path);
|
644
656
|
}
|
645
657
|
|
646
658
|
if (error < 0)
|
647
659
|
goto cleanup;
|
648
660
|
|
649
|
-
/* in
|
661
|
+
/* in precedence order highest to lowest:
|
650
662
|
* - $GIT_DIR/info/attributes
|
651
663
|
* - path components with .gitattributes
|
652
664
|
* - config core.attributesfile
|
653
665
|
* - $GIT_PREFIX/etc/gitattributes
|
654
666
|
*/
|
655
667
|
|
656
|
-
if ((error =
|
668
|
+
if ((error = git_repository__item_path(&attrfile, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 ||
|
657
669
|
(error = push_attr_file(repo, attr_session, files, attrfile.ptr, GIT_ATTR_FILE_INREPO)) < 0) {
|
658
670
|
if (error != GIT_ENOTFOUND)
|
659
671
|
goto cleanup;
|
@@ -670,13 +682,18 @@ static int collect_attr_files(
|
|
670
682
|
if (!strcmp(dir.ptr, "."))
|
671
683
|
error = push_one_attr(&info, "");
|
672
684
|
else
|
673
|
-
error =
|
685
|
+
error = git_fs_path_walk_up(&dir, workdir, push_one_attr, &info);
|
674
686
|
|
675
687
|
if (error < 0)
|
676
688
|
goto cleanup;
|
677
689
|
|
678
|
-
if (git_repository_attr_cache(repo)
|
679
|
-
|
690
|
+
if ((attrcache = git_repository_attr_cache(repo)) != NULL)
|
691
|
+
attr_cfg_file = git_attr_cache_attributesfile(attrcache);
|
692
|
+
|
693
|
+
|
694
|
+
if (attr_cfg_file) {
|
695
|
+
error = push_attr_file(repo, attr_session, files, NULL, attr_cfg_file);
|
696
|
+
|
680
697
|
if (error < 0)
|
681
698
|
goto cleanup;
|
682
699
|
}
|
@@ -693,8 +710,8 @@ static int collect_attr_files(
|
|
693
710
|
cleanup:
|
694
711
|
if (error < 0)
|
695
712
|
release_attr_files(files);
|
696
|
-
|
697
|
-
|
713
|
+
git_str_dispose(&attrfile);
|
714
|
+
git_str_dispose(&dir);
|
698
715
|
|
699
716
|
return error;
|
700
717
|
}
|