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
@@ -8,11 +8,11 @@
|
|
8
8
|
#include "merge.h"
|
9
9
|
|
10
10
|
#include "posix.h"
|
11
|
-
#include "
|
11
|
+
#include "str.h"
|
12
12
|
#include "repository.h"
|
13
13
|
#include "revwalk.h"
|
14
14
|
#include "commit_list.h"
|
15
|
-
#include "
|
15
|
+
#include "fs_path.h"
|
16
16
|
#include "refs.h"
|
17
17
|
#include "object.h"
|
18
18
|
#include "iterator.h"
|
@@ -32,7 +32,6 @@
|
|
32
32
|
#include "commit.h"
|
33
33
|
#include "oidarray.h"
|
34
34
|
#include "merge_driver.h"
|
35
|
-
#include "oidmap.h"
|
36
35
|
#include "array.h"
|
37
36
|
|
38
37
|
#include "git2/types.h"
|
@@ -124,11 +123,11 @@ static int merge_bases_many(git_commit_list **out, git_revwalk **walk_out, git_r
|
|
124
123
|
*out = result;
|
125
124
|
*walk_out = walk;
|
126
125
|
|
127
|
-
|
126
|
+
git_vector_dispose(&list);
|
128
127
|
return 0;
|
129
128
|
|
130
129
|
on_error:
|
131
|
-
|
130
|
+
git_vector_dispose(&list);
|
132
131
|
git_revwalk_free(walk);
|
133
132
|
return error;
|
134
133
|
}
|
@@ -511,7 +510,7 @@ static int remove_redundant(git_revwalk *walk, git_vector *commits, uint32_t min
|
|
511
510
|
done:
|
512
511
|
git__free(redundant);
|
513
512
|
git__free(filled_index);
|
514
|
-
|
513
|
+
git_vector_dispose(&work);
|
515
514
|
return error;
|
516
515
|
}
|
517
516
|
|
@@ -570,7 +569,7 @@ int git_merge__bases_many(
|
|
570
569
|
if ((error = clear_commit_marks(one, ALL_FLAGS)) < 0 ||
|
571
570
|
(error = clear_commit_marks_many(twos, ALL_FLAGS)) < 0 ||
|
572
571
|
(error = remove_redundant(walk, &redundant, minimum_generation)) < 0) {
|
573
|
-
|
572
|
+
git_vector_dispose(&redundant);
|
574
573
|
return error;
|
575
574
|
}
|
576
575
|
|
@@ -579,7 +578,7 @@ int git_merge__bases_many(
|
|
579
578
|
git_commit_list_insert_by_date(two, &result);
|
580
579
|
}
|
581
580
|
|
582
|
-
|
581
|
+
git_vector_dispose(&redundant);
|
583
582
|
}
|
584
583
|
|
585
584
|
*out = result;
|
@@ -591,7 +590,7 @@ int git_repository_mergehead_foreach(
|
|
591
590
|
git_repository_mergehead_foreach_cb cb,
|
592
591
|
void *payload)
|
593
592
|
{
|
594
|
-
|
593
|
+
git_str merge_head_path = GIT_STR_INIT, merge_head_file = GIT_STR_INIT;
|
595
594
|
char *buffer, *line;
|
596
595
|
size_t line_num = 1;
|
597
596
|
git_oid oid;
|
@@ -600,24 +599,24 @@ int git_repository_mergehead_foreach(
|
|
600
599
|
GIT_ASSERT_ARG(repo);
|
601
600
|
GIT_ASSERT_ARG(cb);
|
602
601
|
|
603
|
-
if ((error =
|
602
|
+
if ((error = git_str_joinpath(&merge_head_path, repo->gitdir,
|
604
603
|
GIT_MERGE_HEAD_FILE)) < 0)
|
605
604
|
return error;
|
606
605
|
|
607
606
|
if ((error = git_futils_readbuffer(&merge_head_file,
|
608
|
-
|
607
|
+
git_str_cstr(&merge_head_path))) < 0)
|
609
608
|
goto cleanup;
|
610
609
|
|
611
610
|
buffer = merge_head_file.ptr;
|
612
611
|
|
613
612
|
while ((line = git__strsep(&buffer, "\n")) != NULL) {
|
614
|
-
if (strlen(line) !=
|
613
|
+
if (strlen(line) != git_oid_hexsize(repo->oid_type)) {
|
615
614
|
git_error_set(GIT_ERROR_INVALID, "unable to parse OID - invalid length");
|
616
615
|
error = -1;
|
617
616
|
goto cleanup;
|
618
617
|
}
|
619
618
|
|
620
|
-
if ((error =
|
619
|
+
if ((error = git_oid__fromstr(&oid, line, repo->oid_type)) < 0)
|
621
620
|
goto cleanup;
|
622
621
|
|
623
622
|
if ((error = cb(&oid, payload)) != 0) {
|
@@ -635,8 +634,8 @@ int git_repository_mergehead_foreach(
|
|
635
634
|
}
|
636
635
|
|
637
636
|
cleanup:
|
638
|
-
|
639
|
-
|
637
|
+
git_str_dispose(&merge_head_path);
|
638
|
+
git_str_dispose(&merge_head_file);
|
640
639
|
|
641
640
|
return error;
|
642
641
|
}
|
@@ -893,7 +892,7 @@ static int merge_conflict_invoke_driver(
|
|
893
892
|
git_merge_driver_source *src)
|
894
893
|
{
|
895
894
|
git_index_entry *result;
|
896
|
-
git_buf buf =
|
895
|
+
git_buf buf = {0};
|
897
896
|
const char *path;
|
898
897
|
uint32_t mode;
|
899
898
|
git_odb *odb = NULL;
|
@@ -1061,7 +1060,7 @@ static int index_entry_similarity_calc(
|
|
1061
1060
|
const git_merge_options *opts)
|
1062
1061
|
{
|
1063
1062
|
git_blob *blob;
|
1064
|
-
git_diff_file diff_file
|
1063
|
+
git_diff_file diff_file;
|
1065
1064
|
git_object_size_t blobsize;
|
1066
1065
|
int error;
|
1067
1066
|
|
@@ -1070,6 +1069,8 @@ static int index_entry_similarity_calc(
|
|
1070
1069
|
|
1071
1070
|
*out = NULL;
|
1072
1071
|
|
1072
|
+
git_oid_clear(&diff_file.id, repo->oid_type);
|
1073
|
+
|
1073
1074
|
if ((error = git_blob_lookup(&blob, repo, &entry->id)) < 0)
|
1074
1075
|
return error;
|
1075
1076
|
|
@@ -1142,24 +1143,28 @@ typedef struct {
|
|
1142
1143
|
size_t first_entry;
|
1143
1144
|
} deletes_by_oid_queue;
|
1144
1145
|
|
1145
|
-
|
1146
|
+
GIT_HASHMAP_OID_SETUP(git_merge_deletes_oidmap, deletes_by_oid_queue *);
|
1147
|
+
|
1148
|
+
static void deletes_by_oid_dispose(git_merge_deletes_oidmap *map)
|
1149
|
+
{
|
1150
|
+
git_hashmap_iter_t iter = GIT_HASHMAP_ITER_INIT;
|
1146
1151
|
deletes_by_oid_queue *queue;
|
1147
1152
|
|
1148
1153
|
if (!map)
|
1149
1154
|
return;
|
1150
1155
|
|
1151
|
-
|
1156
|
+
while (git_merge_deletes_oidmap_iterate(&iter, NULL, &queue, map) == 0)
|
1152
1157
|
git_array_clear(queue->arr);
|
1153
|
-
|
1154
|
-
|
1158
|
+
|
1159
|
+
git_merge_deletes_oidmap_dispose(map);
|
1155
1160
|
}
|
1156
1161
|
|
1157
|
-
static int deletes_by_oid_enqueue(
|
1162
|
+
static int deletes_by_oid_enqueue(git_merge_deletes_oidmap *map, git_pool *pool, const git_oid *id, size_t idx)
|
1158
1163
|
{
|
1159
1164
|
deletes_by_oid_queue *queue;
|
1160
1165
|
size_t *array_entry;
|
1161
1166
|
|
1162
|
-
if ((queue
|
1167
|
+
if (git_merge_deletes_oidmap_get(&queue, map, id) != 0) {
|
1163
1168
|
queue = git_pool_malloc(pool, sizeof(deletes_by_oid_queue));
|
1164
1169
|
GIT_ERROR_CHECK_ALLOC(queue);
|
1165
1170
|
|
@@ -1167,7 +1172,7 @@ static int deletes_by_oid_enqueue(git_oidmap *map, git_pool *pool, const git_oid
|
|
1167
1172
|
queue->next_pos = 0;
|
1168
1173
|
queue->first_entry = idx;
|
1169
1174
|
|
1170
|
-
if (
|
1175
|
+
if (git_merge_deletes_oidmap_put(map, id, queue) < 0)
|
1171
1176
|
return -1;
|
1172
1177
|
} else {
|
1173
1178
|
array_entry = git_array_alloc(queue->arr);
|
@@ -1178,13 +1183,14 @@ static int deletes_by_oid_enqueue(git_oidmap *map, git_pool *pool, const git_oid
|
|
1178
1183
|
return 0;
|
1179
1184
|
}
|
1180
1185
|
|
1181
|
-
static int deletes_by_oid_dequeue(size_t *idx,
|
1186
|
+
static int deletes_by_oid_dequeue(size_t *idx, git_merge_deletes_oidmap *map, const git_oid *id)
|
1182
1187
|
{
|
1183
1188
|
deletes_by_oid_queue *queue;
|
1184
1189
|
size_t *array_entry;
|
1190
|
+
int error;
|
1185
1191
|
|
1186
|
-
if ((
|
1187
|
-
return
|
1192
|
+
if ((error = git_merge_deletes_oidmap_get(&queue, map, id)) != 0)
|
1193
|
+
return error;
|
1188
1194
|
|
1189
1195
|
if (queue->next_pos == 0) {
|
1190
1196
|
*idx = queue->first_entry;
|
@@ -1207,15 +1213,10 @@ static int merge_diff_mark_similarity_exact(
|
|
1207
1213
|
{
|
1208
1214
|
size_t i, j;
|
1209
1215
|
git_merge_diff *conflict_src, *conflict_tgt;
|
1210
|
-
|
1216
|
+
git_merge_deletes_oidmap ours_deletes_by_oid = GIT_HASHMAP_INIT,
|
1217
|
+
theirs_deletes_by_oid = GIT_HASHMAP_INIT;
|
1211
1218
|
int error = 0;
|
1212
1219
|
|
1213
|
-
if (git_oidmap_new(&ours_deletes_by_oid) < 0 ||
|
1214
|
-
git_oidmap_new(&theirs_deletes_by_oid) < 0) {
|
1215
|
-
error = -1;
|
1216
|
-
goto done;
|
1217
|
-
}
|
1218
|
-
|
1219
1220
|
/* Build a map of object ids to conflicts */
|
1220
1221
|
git_vector_foreach(&diff_list->conflicts, i, conflict_src) {
|
1221
1222
|
/* Items can be the source of a rename iff they have an item in the
|
@@ -1223,14 +1224,21 @@ static int merge_diff_mark_similarity_exact(
|
|
1223
1224
|
if (!GIT_MERGE_INDEX_ENTRY_EXISTS(conflict_src->ancestor_entry))
|
1224
1225
|
continue;
|
1225
1226
|
|
1227
|
+
/*
|
1228
|
+
* Ignore empty files because it has always the same blob sha1
|
1229
|
+
* and will lead to incorrect matches between all entries.
|
1230
|
+
*/
|
1231
|
+
if (git_oid_equal(&conflict_src->ancestor_entry.id, &git_oid__empty_blob_sha1))
|
1232
|
+
continue;
|
1233
|
+
|
1226
1234
|
if (!GIT_MERGE_INDEX_ENTRY_EXISTS(conflict_src->our_entry)) {
|
1227
|
-
error = deletes_by_oid_enqueue(ours_deletes_by_oid, &diff_list->pool, &conflict_src->ancestor_entry.id, i);
|
1235
|
+
error = deletes_by_oid_enqueue(&ours_deletes_by_oid, &diff_list->pool, &conflict_src->ancestor_entry.id, i);
|
1228
1236
|
if (error < 0)
|
1229
1237
|
goto done;
|
1230
1238
|
}
|
1231
1239
|
|
1232
1240
|
if (!GIT_MERGE_INDEX_ENTRY_EXISTS(conflict_src->their_entry)) {
|
1233
|
-
error = deletes_by_oid_enqueue(theirs_deletes_by_oid, &diff_list->pool, &conflict_src->ancestor_entry.id, i);
|
1241
|
+
error = deletes_by_oid_enqueue(&theirs_deletes_by_oid, &diff_list->pool, &conflict_src->ancestor_entry.id, i);
|
1234
1242
|
if (error < 0)
|
1235
1243
|
goto done;
|
1236
1244
|
}
|
@@ -1241,7 +1249,7 @@ static int merge_diff_mark_similarity_exact(
|
|
1241
1249
|
continue;
|
1242
1250
|
|
1243
1251
|
if (GIT_MERGE_INDEX_ENTRY_EXISTS(conflict_tgt->our_entry)) {
|
1244
|
-
if (deletes_by_oid_dequeue(&i, ours_deletes_by_oid, &conflict_tgt->our_entry.id) == 0) {
|
1252
|
+
if (deletes_by_oid_dequeue(&i, &ours_deletes_by_oid, &conflict_tgt->our_entry.id) == 0) {
|
1245
1253
|
similarity_ours[i].similarity = 100;
|
1246
1254
|
similarity_ours[i].other_idx = j;
|
1247
1255
|
|
@@ -1251,7 +1259,7 @@ static int merge_diff_mark_similarity_exact(
|
|
1251
1259
|
}
|
1252
1260
|
|
1253
1261
|
if (GIT_MERGE_INDEX_ENTRY_EXISTS(conflict_tgt->their_entry)) {
|
1254
|
-
if (deletes_by_oid_dequeue(&i, theirs_deletes_by_oid, &conflict_tgt->their_entry.id) == 0) {
|
1262
|
+
if (deletes_by_oid_dequeue(&i, &theirs_deletes_by_oid, &conflict_tgt->their_entry.id) == 0) {
|
1255
1263
|
similarity_theirs[i].similarity = 100;
|
1256
1264
|
similarity_theirs[i].other_idx = j;
|
1257
1265
|
|
@@ -1262,8 +1270,8 @@ static int merge_diff_mark_similarity_exact(
|
|
1262
1270
|
}
|
1263
1271
|
|
1264
1272
|
done:
|
1265
|
-
|
1266
|
-
|
1273
|
+
deletes_by_oid_dispose(&ours_deletes_by_oid);
|
1274
|
+
deletes_by_oid_dispose(&theirs_deletes_by_oid);
|
1267
1275
|
|
1268
1276
|
return error;
|
1269
1277
|
}
|
@@ -1857,9 +1865,9 @@ void git_merge_diff_list__free(git_merge_diff_list *diff_list)
|
|
1857
1865
|
if (!diff_list)
|
1858
1866
|
return;
|
1859
1867
|
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1868
|
+
git_vector_dispose(&diff_list->staged);
|
1869
|
+
git_vector_dispose(&diff_list->conflicts);
|
1870
|
+
git_vector_dispose(&diff_list->resolved);
|
1863
1871
|
git_pool_clear(&diff_list->pool);
|
1864
1872
|
git__free(diff_list);
|
1865
1873
|
}
|
@@ -1997,8 +2005,11 @@ static int index_update_reuc(git_index *index, git_merge_diff_list *diff_list)
|
|
1997
2005
|
return 0;
|
1998
2006
|
}
|
1999
2007
|
|
2000
|
-
static int index_from_diff_list(
|
2001
|
-
|
2008
|
+
static int index_from_diff_list(
|
2009
|
+
git_index **out,
|
2010
|
+
git_merge_diff_list *diff_list,
|
2011
|
+
git_oid_t oid_type,
|
2012
|
+
bool skip_reuc)
|
2002
2013
|
{
|
2003
2014
|
git_index *index;
|
2004
2015
|
size_t i;
|
@@ -2007,7 +2018,7 @@ static int index_from_diff_list(git_index **out,
|
|
2007
2018
|
|
2008
2019
|
*out = NULL;
|
2009
2020
|
|
2010
|
-
if ((error =
|
2021
|
+
if ((error = git_index__new(&index, oid_type)) < 0)
|
2011
2022
|
return error;
|
2012
2023
|
|
2013
2024
|
if ((error = git_index__fill(index, &diff_list->staged)) < 0)
|
@@ -2116,11 +2127,11 @@ int git_merge__iterators(
|
|
2116
2127
|
file_opts.flags = opts.file_flags;
|
2117
2128
|
|
2118
2129
|
/* use the git-inspired labels when virtual base building */
|
2119
|
-
if (opts.flags &
|
2130
|
+
if (opts.flags & GIT_MERGE_VIRTUAL_BASE) {
|
2120
2131
|
file_opts.ancestor_label = "merged common ancestors";
|
2121
2132
|
file_opts.our_label = "Temporary merge branch 1";
|
2122
2133
|
file_opts.their_label = "Temporary merge branch 2";
|
2123
|
-
file_opts.flags |=
|
2134
|
+
file_opts.flags |= GIT_MERGE_FILE_ACCEPT_CONFLICTS;
|
2124
2135
|
file_opts.marker_size = GIT_MERGE_CONFLICT_MARKER_SIZE + 2;
|
2125
2136
|
}
|
2126
2137
|
|
@@ -2157,7 +2168,7 @@ int git_merge__iterators(
|
|
2157
2168
|
}
|
2158
2169
|
}
|
2159
2170
|
|
2160
|
-
error = index_from_diff_list(out, diff_list,
|
2171
|
+
error = index_from_diff_list(out, diff_list, repo->oid_type,
|
2161
2172
|
(opts.flags & GIT_MERGE_SKIP_REUC));
|
2162
2173
|
|
2163
2174
|
done:
|
@@ -2200,8 +2211,8 @@ int git_merge_trees(
|
|
2200
2211
|
result = our_tree;
|
2201
2212
|
|
2202
2213
|
if (result) {
|
2203
|
-
if ((error =
|
2204
|
-
|
2214
|
+
if ((error = git_index__new(out, repo->oid_type)) == 0)
|
2215
|
+
error = git_index_read_tree(*out, result);
|
2205
2216
|
|
2206
2217
|
return error;
|
2207
2218
|
}
|
@@ -2280,7 +2291,7 @@ static int create_virtual_base(
|
|
2280
2291
|
memcpy(&virtual_opts, opts, sizeof(git_merge_options));
|
2281
2292
|
|
2282
2293
|
virtual_opts.flags &= ~GIT_MERGE_FAIL_ON_CONFLICT;
|
2283
|
-
virtual_opts.flags |=
|
2294
|
+
virtual_opts.flags |= GIT_MERGE_VIRTUAL_BASE;
|
2284
2295
|
|
2285
2296
|
if ((merge_annotated_commits(&index, NULL, repo, one, two,
|
2286
2297
|
recursion_level + 1, &virtual_opts)) < 0)
|
@@ -2473,14 +2484,14 @@ static int write_merge_head(
|
|
2473
2484
|
size_t heads_len)
|
2474
2485
|
{
|
2475
2486
|
git_filebuf file = GIT_FILEBUF_INIT;
|
2476
|
-
|
2487
|
+
git_str file_path = GIT_STR_INIT;
|
2477
2488
|
size_t i;
|
2478
2489
|
int error = 0;
|
2479
2490
|
|
2480
2491
|
GIT_ASSERT_ARG(repo);
|
2481
2492
|
GIT_ASSERT_ARG(heads);
|
2482
2493
|
|
2483
|
-
if ((error =
|
2494
|
+
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_HEAD_FILE)) < 0 ||
|
2484
2495
|
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_MERGE_FILE_MODE)) < 0)
|
2485
2496
|
goto cleanup;
|
2486
2497
|
|
@@ -2495,7 +2506,7 @@ cleanup:
|
|
2495
2506
|
if (error < 0)
|
2496
2507
|
git_filebuf_cleanup(&file);
|
2497
2508
|
|
2498
|
-
|
2509
|
+
git_str_dispose(&file_path);
|
2499
2510
|
|
2500
2511
|
return error;
|
2501
2512
|
}
|
@@ -2503,12 +2514,12 @@ cleanup:
|
|
2503
2514
|
static int write_merge_mode(git_repository *repo)
|
2504
2515
|
{
|
2505
2516
|
git_filebuf file = GIT_FILEBUF_INIT;
|
2506
|
-
|
2517
|
+
git_str file_path = GIT_STR_INIT;
|
2507
2518
|
int error = 0;
|
2508
2519
|
|
2509
2520
|
GIT_ASSERT_ARG(repo);
|
2510
2521
|
|
2511
|
-
if ((error =
|
2522
|
+
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_MODE_FILE)) < 0 ||
|
2512
2523
|
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_MERGE_FILE_MODE)) < 0)
|
2513
2524
|
goto cleanup;
|
2514
2525
|
|
@@ -2521,7 +2532,7 @@ cleanup:
|
|
2521
2532
|
if (error < 0)
|
2522
2533
|
git_filebuf_cleanup(&file);
|
2523
2534
|
|
2524
|
-
|
2535
|
+
git_str_dispose(&file_path);
|
2525
2536
|
|
2526
2537
|
return error;
|
2527
2538
|
}
|
@@ -2719,7 +2730,7 @@ static int write_merge_msg(
|
|
2719
2730
|
size_t heads_len)
|
2720
2731
|
{
|
2721
2732
|
git_filebuf file = GIT_FILEBUF_INIT;
|
2722
|
-
|
2733
|
+
git_str file_path = GIT_STR_INIT;
|
2723
2734
|
struct merge_msg_entry *entries;
|
2724
2735
|
git_vector matching = GIT_VECTOR_INIT;
|
2725
2736
|
size_t i;
|
@@ -2740,7 +2751,7 @@ static int write_merge_msg(
|
|
2740
2751
|
for (i = 0; i < heads_len; i++)
|
2741
2752
|
entries[i].merge_head = heads[i];
|
2742
2753
|
|
2743
|
-
if ((error =
|
2754
|
+
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 ||
|
2744
2755
|
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_MERGE_FILE_MODE)) < 0 ||
|
2745
2756
|
(error = git_filebuf_write(&file, "Merge ", 6)) < 0)
|
2746
2757
|
goto cleanup;
|
@@ -2822,9 +2833,9 @@ cleanup:
|
|
2822
2833
|
if (error < 0)
|
2823
2834
|
git_filebuf_cleanup(&file);
|
2824
2835
|
|
2825
|
-
|
2836
|
+
git_str_dispose(&file_path);
|
2826
2837
|
|
2827
|
-
|
2838
|
+
git_vector_dispose(&matching);
|
2828
2839
|
git__free(entries);
|
2829
2840
|
|
2830
2841
|
return error;
|
@@ -3003,7 +3014,7 @@ done:
|
|
3003
3014
|
git_iterator_free(iter_new);
|
3004
3015
|
git_diff_free(staged_diff_list);
|
3005
3016
|
git_diff_free(index_diff_list);
|
3006
|
-
|
3017
|
+
git_vector_dispose(&staged_paths);
|
3007
3018
|
|
3008
3019
|
return error;
|
3009
3020
|
}
|
@@ -3019,10 +3030,10 @@ static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_inde
|
|
3019
3030
|
*conflicts = 0;
|
3020
3031
|
|
3021
3032
|
/* We need to have merged at least 1 file for the possibility to exist to
|
3022
|
-
* have conflicts with the workdir. Passing 0 as the pathspec count
|
3033
|
+
* have conflicts with the workdir. Passing 0 as the pathspec count parameter
|
3023
3034
|
* will consider all files in the working directory, that is, we may detect
|
3024
3035
|
* a conflict if there were untracked files in the workdir prior to starting
|
3025
|
-
* the merge. This typically happens when cherry-picking a
|
3036
|
+
* the merge. This typically happens when cherry-picking a commit whose
|
3026
3037
|
* changes have already been applied.
|
3027
3038
|
*/
|
3028
3039
|
if (merged_paths->length == 0)
|
@@ -3100,7 +3111,7 @@ int git_merge__check_result(git_repository *repo, git_index *index_new)
|
|
3100
3111
|
}
|
3101
3112
|
|
3102
3113
|
done:
|
3103
|
-
|
3114
|
+
git_vector_dispose(&paths);
|
3104
3115
|
git_tree_free(head_tree);
|
3105
3116
|
git_iterator_free(iter_head);
|
3106
3117
|
git_iterator_free(iter_new);
|
@@ -3114,7 +3125,7 @@ int git_merge__append_conflicts_to_merge_msg(
|
|
3114
3125
|
git_index *index)
|
3115
3126
|
{
|
3116
3127
|
git_filebuf file = GIT_FILEBUF_INIT;
|
3117
|
-
|
3128
|
+
git_str file_path = GIT_STR_INIT;
|
3118
3129
|
const char *last = NULL;
|
3119
3130
|
size_t i;
|
3120
3131
|
int error;
|
@@ -3122,11 +3133,11 @@ int git_merge__append_conflicts_to_merge_msg(
|
|
3122
3133
|
if (!git_index_has_conflicts(index))
|
3123
3134
|
return 0;
|
3124
3135
|
|
3125
|
-
if ((error =
|
3136
|
+
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 ||
|
3126
3137
|
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_APPEND, GIT_MERGE_FILE_MODE)) < 0)
|
3127
3138
|
goto cleanup;
|
3128
3139
|
|
3129
|
-
git_filebuf_printf(&file, "\
|
3140
|
+
git_filebuf_printf(&file, "\n#Conflicts:\n");
|
3130
3141
|
|
3131
3142
|
for (i = 0; i < git_index_entrycount(index); i++) {
|
3132
3143
|
const git_index_entry *e = git_index_get_byindex(index, i);
|
@@ -3135,7 +3146,7 @@ int git_merge__append_conflicts_to_merge_msg(
|
|
3135
3146
|
continue;
|
3136
3147
|
|
3137
3148
|
if (last == NULL || strcmp(e->path, last) != 0)
|
3138
|
-
git_filebuf_printf(&file, "
|
3149
|
+
git_filebuf_printf(&file, "#\t%s\n", e->path);
|
3139
3150
|
|
3140
3151
|
last = e->path;
|
3141
3152
|
}
|
@@ -3146,7 +3157,7 @@ cleanup:
|
|
3146
3157
|
if (error < 0)
|
3147
3158
|
git_filebuf_cleanup(&file);
|
3148
3159
|
|
3149
|
-
|
3160
|
+
git_str_dispose(&file_path);
|
3150
3161
|
|
3151
3162
|
return error;
|
3152
3163
|
}
|
@@ -3341,8 +3352,7 @@ int git_merge(
|
|
3341
3352
|
goto done;
|
3342
3353
|
|
3343
3354
|
checkout_strategy = given_checkout_opts ?
|
3344
|
-
given_checkout_opts->checkout_strategy :
|
3345
|
-
GIT_CHECKOUT_SAFE;
|
3355
|
+
given_checkout_opts->checkout_strategy : 0;
|
3346
3356
|
|
3347
3357
|
if ((error = git_indexwriter_init_for_operation(&indexwriter, repo,
|
3348
3358
|
&checkout_strategy)) < 0)
|
@@ -25,19 +25,6 @@
|
|
25
25
|
#define GIT_MERGE_DEFAULT_RENAME_THRESHOLD 50
|
26
26
|
#define GIT_MERGE_DEFAULT_TARGET_LIMIT 1000
|
27
27
|
|
28
|
-
|
29
|
-
/** Internal merge flags. */
|
30
|
-
enum {
|
31
|
-
/** The merge is for a virtual base in a recursive merge. */
|
32
|
-
GIT_MERGE__VIRTUAL_BASE = (1 << 31),
|
33
|
-
};
|
34
|
-
|
35
|
-
enum {
|
36
|
-
/** Accept the conflict file, staging it as the merge result. */
|
37
|
-
GIT_MERGE_FILE_FAVOR__CONFLICTED = 4,
|
38
|
-
};
|
39
|
-
|
40
|
-
|
41
28
|
/** Types of changes when files are merged from branch to branch. */
|
42
29
|
typedef enum {
|
43
30
|
/* No conflict - a change only occurs in one branch. */
|
@@ -83,7 +70,7 @@ typedef enum {
|
|
83
70
|
GIT_MERGE_DIFF_DIRECTORY_FILE = (1 << 10),
|
84
71
|
|
85
72
|
/* The child of a folder that is in a directory/file conflict. */
|
86
|
-
GIT_MERGE_DIFF_DF_CHILD = (1 << 11)
|
73
|
+
GIT_MERGE_DIFF_DF_CHILD = (1 << 11)
|
87
74
|
} git_merge_diff_t;
|
88
75
|
|
89
76
|
typedef struct {
|
@@ -93,7 +93,7 @@ int git_merge_driver__builtin_apply(
|
|
93
93
|
goto done;
|
94
94
|
|
95
95
|
if (!result.automergeable &&
|
96
|
-
!(file_opts.flags &
|
96
|
+
!(file_opts.flags & GIT_MERGE_FILE_ACCEPT_CONFLICTS)) {
|
97
97
|
error = GIT_EMERGECONFLICT;
|
98
98
|
goto done;
|
99
99
|
}
|
@@ -110,7 +110,7 @@ int git_merge_driver__builtin_apply(
|
|
110
110
|
|
111
111
|
merged_out->ptr = (char *)result.ptr;
|
112
112
|
merged_out->size = result.len;
|
113
|
-
merged_out->
|
113
|
+
merged_out->reserved = 0;
|
114
114
|
result.ptr = NULL;
|
115
115
|
|
116
116
|
done:
|
@@ -218,7 +218,7 @@ int git_merge_driver_global_init(void)
|
|
218
218
|
|
219
219
|
done:
|
220
220
|
if (error < 0)
|
221
|
-
|
221
|
+
git_vector_dispose_deep(&merge_driver_registry.drivers);
|
222
222
|
|
223
223
|
return error;
|
224
224
|
}
|
@@ -238,7 +238,7 @@ static void git_merge_driver_global_shutdown(void)
|
|
238
238
|
git__free(entry);
|
239
239
|
}
|
240
240
|
|
241
|
-
|
241
|
+
git_vector_dispose(&merge_driver_registry.drivers);
|
242
242
|
|
243
243
|
git_rwlock_wrunlock(&merge_driver_registry.lock);
|
244
244
|
git_rwlock_free(&merge_driver_registry.lock);
|
@@ -19,8 +19,6 @@
|
|
19
19
|
#include "git2/index.h"
|
20
20
|
#include "git2/merge.h"
|
21
21
|
|
22
|
-
#include "xdiff/xdiff.h"
|
23
|
-
|
24
22
|
/* only examine the first 8000 bytes for binaryness.
|
25
23
|
* https://github.com/git/git/blob/77bd3ea9f54f1584147b594abc04c26ca516d987/xdiff-interface.c#L197
|
26
24
|
*/
|
@@ -86,22 +84,30 @@ static int merge_file__xdiff(
|
|
86
84
|
|
87
85
|
memset(&xmparam, 0x0, sizeof(xmparam_t));
|
88
86
|
|
87
|
+
if (ours->size > LONG_MAX ||
|
88
|
+
theirs->size > LONG_MAX ||
|
89
|
+
(ancestor && ancestor->size > LONG_MAX)) {
|
90
|
+
git_error_set(GIT_ERROR_MERGE, "failed to merge files");
|
91
|
+
error = -1;
|
92
|
+
goto done;
|
93
|
+
}
|
94
|
+
|
89
95
|
if (ancestor) {
|
90
96
|
xmparam.ancestor = (options.ancestor_label) ?
|
91
97
|
options.ancestor_label : ancestor->path;
|
92
98
|
ancestor_mmfile.ptr = (char *)ancestor->ptr;
|
93
|
-
ancestor_mmfile.size = ancestor->size;
|
99
|
+
ancestor_mmfile.size = (long)ancestor->size;
|
94
100
|
}
|
95
101
|
|
96
102
|
xmparam.file1 = (options.our_label) ?
|
97
103
|
options.our_label : ours->path;
|
98
104
|
our_mmfile.ptr = (char *)ours->ptr;
|
99
|
-
our_mmfile.size = ours->size;
|
105
|
+
our_mmfile.size = (long)ours->size;
|
100
106
|
|
101
107
|
xmparam.file2 = (options.their_label) ?
|
102
108
|
options.their_label : theirs->path;
|
103
109
|
their_mmfile.ptr = (char *)theirs->ptr;
|
104
|
-
their_mmfile.size = theirs->size;
|
110
|
+
their_mmfile.size = (long)theirs->size;
|
105
111
|
|
106
112
|
if (options.favor == GIT_MERGE_FILE_FAVOR_OURS)
|
107
113
|
xmparam.favor = XDL_MERGE_FAVOR_OURS;
|
@@ -115,6 +121,8 @@ static int merge_file__xdiff(
|
|
115
121
|
|
116
122
|
if (options.flags & GIT_MERGE_FILE_STYLE_DIFF3)
|
117
123
|
xmparam.style = XDL_MERGE_DIFF3;
|
124
|
+
if (options.flags & GIT_MERGE_FILE_STYLE_ZDIFF3)
|
125
|
+
xmparam.style = XDL_MERGE_ZEALOUS_DIFF3;
|
118
126
|
|
119
127
|
if (options.flags & GIT_MERGE_FILE_IGNORE_WHITESPACE)
|
120
128
|
xmparam.xpp.flags |= XDF_IGNORE_WHITESPACE;
|
@@ -5,7 +5,9 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#include "
|
8
|
+
#include "buf.h"
|
9
|
+
|
10
|
+
#include "git2/message.h"
|
9
11
|
|
10
12
|
static size_t line_length_without_trailing_spaces(const char *line, size_t len)
|
11
13
|
{
|
@@ -21,17 +23,17 @@ static size_t line_length_without_trailing_spaces(const char *line, size_t len)
|
|
21
23
|
|
22
24
|
/* Greatly inspired from git.git "stripspace" */
|
23
25
|
/* see https://github.com/git/git/blob/497215d8811ac7b8955693ceaad0899ecd894ed2/builtin/stripspace.c#L4-67 */
|
24
|
-
int
|
26
|
+
static int git_message__prettify(
|
27
|
+
git_str *message_out,
|
28
|
+
const char *message,
|
29
|
+
int strip_comments,
|
30
|
+
char comment_char)
|
25
31
|
{
|
26
32
|
const size_t message_len = strlen(message);
|
27
33
|
|
28
34
|
int consecutive_empty_lines = 0;
|
29
35
|
size_t i, line_length, rtrimmed_line_length;
|
30
36
|
char *next_newline;
|
31
|
-
int error;
|
32
|
-
|
33
|
-
if ((error = git_buf_sanitize(message_out)) < 0)
|
34
|
-
return error;
|
35
37
|
|
36
38
|
for (i = 0; i < strlen(message); i += line_length) {
|
37
39
|
next_newline = memchr(message + i, '\n', message_len - i);
|
@@ -53,12 +55,21 @@ int git_message_prettify(git_buf *message_out, const char *message, int strip_co
|
|
53
55
|
}
|
54
56
|
|
55
57
|
if (consecutive_empty_lines > 0 && message_out->size > 0)
|
56
|
-
|
58
|
+
git_str_putc(message_out, '\n');
|
57
59
|
|
58
60
|
consecutive_empty_lines = 0;
|
59
|
-
|
60
|
-
|
61
|
+
git_str_put(message_out, message + i, rtrimmed_line_length);
|
62
|
+
git_str_putc(message_out, '\n');
|
61
63
|
}
|
62
64
|
|
63
|
-
return
|
65
|
+
return git_str_oom(message_out) ? -1 : 0;
|
66
|
+
}
|
67
|
+
|
68
|
+
int git_message_prettify(
|
69
|
+
git_buf *message_out,
|
70
|
+
const char *message,
|
71
|
+
int strip_comments,
|
72
|
+
char comment_char)
|
73
|
+
{
|
74
|
+
GIT_BUF_WRAP_PRIVATE(message_out, git_message__prettify, message, strip_comments, comment_char);
|
64
75
|
}
|