rugged 0.27.10 → 0.27.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +0 -1
- data/vendor/libgit2/CMakeLists.txt +54 -98
- data/vendor/libgit2/COPYING +0 -28
- data/vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake +1 -15
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +8 -9
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -2
- data/vendor/libgit2/deps/http-parser/{COPYING → LICENSE-MIT} +0 -0
- data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
- data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/regex/config.h +7 -0
- data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
- data/vendor/libgit2/deps/regex/regex.c +92 -0
- data/vendor/libgit2/deps/regex/regex.h +582 -0
- data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
- data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
- data/vendor/libgit2/deps/regex/regexec.c +4369 -0
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +0 -1
- data/vendor/libgit2/deps/zlib/adler32.c +7 -0
- data/vendor/libgit2/deps/zlib/crc32.c +7 -0
- data/vendor/libgit2/include/git2.h +0 -5
- data/vendor/libgit2/include/git2/annotated_commit.h +0 -9
- data/vendor/libgit2/include/git2/attr.h +20 -38
- data/vendor/libgit2/include/git2/blame.h +25 -42
- data/vendor/libgit2/include/git2/blob.h +13 -45
- data/vendor/libgit2/include/git2/branch.h +1 -1
- data/vendor/libgit2/include/git2/buffer.h +16 -22
- data/vendor/libgit2/include/git2/checkout.h +32 -65
- data/vendor/libgit2/include/git2/cherrypick.h +7 -9
- data/vendor/libgit2/include/git2/clone.h +10 -12
- data/vendor/libgit2/include/git2/commit.h +3 -53
- data/vendor/libgit2/include/git2/common.h +8 -60
- data/vendor/libgit2/include/git2/config.h +19 -30
- data/vendor/libgit2/include/git2/describe.h +9 -32
- data/vendor/libgit2/include/git2/diff.h +156 -208
- data/vendor/libgit2/include/git2/errors.h +46 -54
- data/vendor/libgit2/include/git2/filter.h +0 -8
- data/vendor/libgit2/include/git2/ignore.h +2 -2
- data/vendor/libgit2/include/git2/index.h +52 -74
- data/vendor/libgit2/include/git2/indexer.h +6 -76
- data/vendor/libgit2/include/git2/inttypes.h +309 -0
- data/vendor/libgit2/include/git2/merge.h +18 -35
- data/vendor/libgit2/include/git2/net.h +5 -0
- data/vendor/libgit2/include/git2/notes.h +1 -1
- data/vendor/libgit2/include/git2/object.h +29 -17
- data/vendor/libgit2/include/git2/odb.h +11 -12
- data/vendor/libgit2/include/git2/odb_backend.h +9 -10
- data/vendor/libgit2/include/git2/oid.h +2 -2
- data/vendor/libgit2/include/git2/pack.h +3 -14
- data/vendor/libgit2/include/git2/proxy.h +8 -14
- data/vendor/libgit2/include/git2/rebase.h +6 -53
- data/vendor/libgit2/include/git2/refs.h +15 -33
- data/vendor/libgit2/include/git2/refspec.h +0 -17
- data/vendor/libgit2/include/git2/remote.h +24 -123
- data/vendor/libgit2/include/git2/repository.h +39 -76
- data/vendor/libgit2/include/git2/revert.h +4 -6
- data/vendor/libgit2/include/git2/revwalk.h +7 -7
- data/vendor/libgit2/include/git2/signature.h +2 -2
- data/vendor/libgit2/include/git2/stash.h +12 -15
- data/vendor/libgit2/include/git2/status.h +20 -33
- data/vendor/libgit2/include/git2/submodule.h +12 -30
- data/vendor/libgit2/include/git2/sys/commit.h +1 -1
- data/vendor/libgit2/include/git2/sys/config.h +13 -13
- data/vendor/libgit2/include/git2/sys/filter.h +6 -6
- data/vendor/libgit2/include/git2/sys/index.h +0 -3
- data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
- data/vendor/libgit2/include/git2/sys/merge.h +4 -9
- data/vendor/libgit2/include/git2/sys/odb_backend.h +22 -66
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -76
- data/vendor/libgit2/include/git2/sys/repository.h +1 -5
- data/vendor/libgit2/include/git2/sys/stream.h +12 -92
- data/vendor/libgit2/include/git2/sys/time.h +31 -0
- data/vendor/libgit2/include/git2/sys/transport.h +83 -129
- data/vendor/libgit2/include/git2/tag.h +4 -13
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transaction.h +0 -1
- data/vendor/libgit2/include/git2/transport.h +311 -11
- data/vendor/libgit2/include/git2/tree.h +4 -4
- data/vendor/libgit2/include/git2/types.h +111 -33
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +13 -48
- data/vendor/libgit2/libgit2.pc.in +13 -0
- data/vendor/libgit2/src/CMakeLists.txt +164 -96
- data/vendor/libgit2/src/annotated_commit.c +8 -15
- data/vendor/libgit2/src/apply.c +31 -537
- data/vendor/libgit2/src/apply.h +1 -3
- data/vendor/libgit2/src/array.h +2 -2
- data/vendor/libgit2/src/attr.c +75 -81
- data/vendor/libgit2/src/attr_file.c +121 -207
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +53 -51
- data/vendor/libgit2/src/attrcache.h +1 -2
- data/vendor/libgit2/src/blame.c +20 -47
- data/vendor/libgit2/src/blame.h +1 -2
- data/vendor/libgit2/src/blame_git.c +20 -37
- data/vendor/libgit2/src/blob.c +42 -128
- data/vendor/libgit2/src/blob.h +2 -19
- data/vendor/libgit2/src/branch.c +43 -67
- data/vendor/libgit2/src/buf_text.c +6 -7
- data/vendor/libgit2/src/buffer.c +57 -69
- data/vendor/libgit2/src/buffer.h +1 -1
- data/vendor/libgit2/src/cache.c +45 -38
- data/vendor/libgit2/src/cache.h +3 -3
- data/vendor/libgit2/src/cc-compat.h +3 -20
- data/vendor/libgit2/src/checkout.c +90 -109
- data/vendor/libgit2/src/cherrypick.c +9 -15
- data/vendor/libgit2/src/clone.c +27 -49
- data/vendor/libgit2/src/clone.h +0 -4
- data/vendor/libgit2/src/commit.c +49 -117
- data/vendor/libgit2/src/commit.h +0 -7
- data/vendor/libgit2/src/commit_list.c +78 -30
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +91 -27
- data/vendor/libgit2/src/config.c +176 -194
- data/vendor/libgit2/src/config.h +20 -8
- data/vendor/libgit2/src/config_cache.c +35 -41
- data/vendor/libgit2/src/config_file.c +753 -439
- data/vendor/libgit2/src/config_file.h +73 -0
- data/vendor/libgit2/src/config_parse.c +63 -114
- data/vendor/libgit2/src/config_parse.h +16 -17
- data/vendor/libgit2/src/crlf.c +190 -219
- data/vendor/libgit2/src/delta.c +18 -25
- data/vendor/libgit2/src/describe.c +41 -42
- data/vendor/libgit2/src/diff.c +68 -53
- data/vendor/libgit2/src/diff.h +1 -2
- data/vendor/libgit2/src/diff_driver.c +49 -47
- data/vendor/libgit2/src/diff_file.c +17 -19
- data/vendor/libgit2/src/diff_file.h +1 -1
- data/vendor/libgit2/src/diff_generate.c +106 -162
- data/vendor/libgit2/src/diff_generate.h +3 -3
- data/vendor/libgit2/src/diff_parse.c +4 -4
- data/vendor/libgit2/src/diff_print.c +30 -42
- data/vendor/libgit2/src/diff_stats.c +7 -22
- data/vendor/libgit2/src/diff_tform.c +16 -16
- data/vendor/libgit2/src/diff_xdiff.c +3 -15
- data/vendor/libgit2/src/errors.c +39 -51
- data/vendor/libgit2/src/features.h.in +3 -11
- data/vendor/libgit2/src/fetch.c +5 -10
- data/vendor/libgit2/src/fetchhead.c +17 -17
- data/vendor/libgit2/src/filebuf.c +36 -32
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/{futils.c → fileops.c} +73 -80
- data/vendor/libgit2/src/{futils.h → fileops.h} +6 -6
- data/vendor/libgit2/src/filter.c +38 -46
- data/vendor/libgit2/src/filter.h +10 -0
- data/vendor/libgit2/src/fnmatch.c +248 -0
- data/vendor/libgit2/src/fnmatch.h +48 -0
- data/vendor/libgit2/src/global.c +63 -48
- data/vendor/libgit2/src/global.h +2 -0
- data/vendor/libgit2/src/hash.c +0 -61
- data/vendor/libgit2/src/hash.h +19 -20
- data/vendor/libgit2/src/hash/hash_collisiondetect.h +47 -0
- data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +17 -17
- data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
- data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +10 -4
- data/vendor/libgit2/src/hash/hash_openssl.h +59 -0
- data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +37 -47
- data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
- data/vendor/libgit2/src/hashsig.c +5 -5
- data/vendor/libgit2/src/idxmap.c +61 -107
- data/vendor/libgit2/src/idxmap.h +31 -153
- data/vendor/libgit2/src/ignore.c +47 -43
- data/vendor/libgit2/src/index.c +232 -337
- data/vendor/libgit2/src/index.h +1 -17
- data/vendor/libgit2/src/indexer.c +175 -346
- data/vendor/libgit2/src/integer.h +26 -71
- data/vendor/libgit2/src/iterator.c +70 -142
- data/vendor/libgit2/src/iterator.h +0 -15
- data/vendor/libgit2/src/khash.h +1 -3
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +100 -144
- data/vendor/libgit2/src/merge_driver.c +11 -11
- data/vendor/libgit2/src/merge_file.c +2 -2
- data/vendor/libgit2/src/mwindow.c +29 -24
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/netops.c +156 -55
- data/vendor/libgit2/src/netops.h +23 -3
- data/vendor/libgit2/src/notes.c +11 -16
- data/vendor/libgit2/src/object.c +69 -120
- data/vendor/libgit2/src/object.h +9 -22
- data/vendor/libgit2/src/object_api.c +8 -8
- data/vendor/libgit2/src/odb.c +93 -116
- data/vendor/libgit2/src/odb.h +7 -8
- data/vendor/libgit2/src/odb_loose.c +55 -62
- data/vendor/libgit2/src/odb_mempack.c +34 -21
- data/vendor/libgit2/src/odb_pack.c +14 -18
- data/vendor/libgit2/src/offmap.c +35 -53
- data/vendor/libgit2/src/offmap.h +21 -108
- data/vendor/libgit2/src/oid.c +7 -12
- data/vendor/libgit2/src/oidmap.c +47 -49
- data/vendor/libgit2/src/oidmap.h +24 -101
- data/vendor/libgit2/src/pack-objects.c +87 -88
- data/vendor/libgit2/src/pack-objects.h +8 -2
- data/vendor/libgit2/src/pack.c +101 -99
- data/vendor/libgit2/src/pack.h +19 -17
- data/vendor/libgit2/src/parse.c +0 -10
- data/vendor/libgit2/src/parse.h +3 -3
- data/vendor/libgit2/src/patch.c +4 -4
- data/vendor/libgit2/src/patch_generate.c +20 -20
- data/vendor/libgit2/src/patch_parse.c +63 -151
- data/vendor/libgit2/src/path.c +104 -117
- data/vendor/libgit2/src/path.h +71 -3
- data/vendor/libgit2/src/pathspec.c +19 -19
- data/vendor/libgit2/src/pool.c +22 -26
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +10 -10
- data/vendor/libgit2/src/posix.h +1 -12
- data/vendor/libgit2/src/proxy.c +3 -8
- data/vendor/libgit2/src/push.c +31 -37
- data/vendor/libgit2/src/push.h +1 -2
- data/vendor/libgit2/src/rebase.c +59 -115
- data/vendor/libgit2/src/refdb.c +3 -15
- data/vendor/libgit2/src/refdb_fs.c +254 -381
- data/vendor/libgit2/src/reflog.c +15 -13
- data/vendor/libgit2/src/refs.c +88 -118
- data/vendor/libgit2/src/refs.h +3 -5
- data/vendor/libgit2/src/refspec.c +37 -56
- data/vendor/libgit2/src/refspec.h +1 -1
- data/vendor/libgit2/src/remote.c +215 -266
- data/vendor/libgit2/src/remote.h +2 -11
- data/vendor/libgit2/src/repository.c +225 -280
- data/vendor/libgit2/src/repository.h +40 -52
- data/vendor/libgit2/src/reset.c +8 -8
- data/vendor/libgit2/src/revert.c +9 -14
- data/vendor/libgit2/src/revparse.c +48 -47
- data/vendor/libgit2/src/revwalk.c +57 -120
- data/vendor/libgit2/src/revwalk.h +1 -22
- data/vendor/libgit2/src/settings.c +10 -47
- data/vendor/libgit2/src/signature.c +11 -11
- data/vendor/libgit2/src/sortedcache.c +36 -22
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +99 -125
- data/vendor/libgit2/src/status.c +22 -28
- data/vendor/libgit2/src/stream.h +2 -17
- data/vendor/libgit2/src/streams/curl.c +385 -0
- data/vendor/libgit2/src/{allocators/stdalloc.h → streams/curl.h} +5 -5
- data/vendor/libgit2/src/streams/openssl.c +114 -224
- data/vendor/libgit2/src/streams/openssl.h +108 -4
- data/vendor/libgit2/src/streams/socket.c +30 -55
- data/vendor/libgit2/src/streams/stransport.c +32 -57
- data/vendor/libgit2/src/streams/stransport.h +0 -5
- data/vendor/libgit2/src/streams/tls.c +19 -50
- data/vendor/libgit2/src/streams/tls.h +4 -12
- data/vendor/libgit2/src/strmap.c +74 -47
- data/vendor/libgit2/src/strmap.h +33 -108
- data/vendor/libgit2/src/submodule.c +216 -272
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +19 -29
- data/vendor/libgit2/src/tag.c +28 -41
- data/vendor/libgit2/src/tag.h +1 -2
- data/vendor/libgit2/src/trace.c +2 -2
- data/vendor/libgit2/src/trace.h +3 -3
- data/vendor/libgit2/src/trailer.c +38 -52
- data/vendor/libgit2/src/transaction.c +29 -30
- data/vendor/libgit2/src/transport.c +5 -5
- data/vendor/libgit2/src/transports/auth.c +11 -15
- data/vendor/libgit2/src/transports/auth.h +3 -10
- data/vendor/libgit2/src/transports/auth_negotiate.c +18 -33
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/cred.c +24 -24
- data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
- data/vendor/libgit2/src/transports/git.c +31 -26
- data/vendor/libgit2/src/transports/http.c +348 -881
- data/vendor/libgit2/src/transports/http.h +0 -2
- data/vendor/libgit2/src/transports/local.c +35 -35
- data/vendor/libgit2/src/transports/smart.c +47 -70
- data/vendor/libgit2/src/transports/smart.h +4 -3
- data/vendor/libgit2/src/transports/smart_pkt.c +40 -43
- data/vendor/libgit2/src/transports/smart_protocol.c +116 -96
- data/vendor/libgit2/src/transports/ssh.c +66 -77
- data/vendor/libgit2/src/transports/winhttp.c +314 -318
- data/vendor/libgit2/src/tree-cache.c +12 -19
- data/vendor/libgit2/src/tree.c +142 -103
- data/vendor/libgit2/src/tree.h +12 -1
- data/vendor/libgit2/src/unix/map.c +3 -3
- data/vendor/libgit2/src/unix/posix.h +11 -1
- data/vendor/libgit2/src/userdiff.h +1 -3
- data/vendor/libgit2/src/util.c +56 -70
- data/vendor/libgit2/src/util.h +156 -28
- data/vendor/libgit2/src/vector.c +4 -4
- data/vendor/libgit2/src/win32/dir.c +3 -3
- data/vendor/libgit2/src/win32/findfile.c +3 -3
- data/vendor/libgit2/src/win32/map.c +11 -9
- data/vendor/libgit2/src/win32/msvc-compat.h +0 -6
- data/vendor/libgit2/src/win32/path_w32.c +9 -113
- data/vendor/libgit2/src/win32/path_w32.h +29 -18
- data/vendor/libgit2/src/win32/posix.h +4 -1
- data/vendor/libgit2/src/win32/posix_w32.c +45 -70
- data/vendor/libgit2/src/win32/precompiled.h +2 -0
- data/vendor/libgit2/src/win32/thread.c +10 -5
- data/vendor/libgit2/src/win32/w32_buffer.c +5 -9
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -3
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +75 -26
- data/vendor/libgit2/src/win32/w32_stack.c +11 -6
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +64 -27
- data/vendor/libgit2/src/win32/w32_util.h +49 -5
- data/vendor/libgit2/src/worktree.c +60 -95
- data/vendor/libgit2/src/worktree.h +0 -2
- data/vendor/libgit2/src/xdiff/xdiffi.c +5 -7
- data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +15 -27
- data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
- data/vendor/libgit2/src/zstream.c +4 -4
- metadata +33 -122
- data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
- data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
- data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
- data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +0 -93
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
- data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
- data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
- data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
- data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
- data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
- data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
- data/vendor/libgit2/deps/pcre/COPYING +0 -5
- data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
- data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
- data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
- data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
- data/vendor/libgit2/deps/pcre/config.h.in +0 -57
- data/vendor/libgit2/deps/pcre/pcre.h +0 -641
- data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
- data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
- data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
- data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
- data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
- data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
- data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
- data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
- data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
- data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
- data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
- data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
- data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
- data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
- data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
- data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
- data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
- data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
- data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
- data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
- data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
- data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
- data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
- data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
- data/vendor/libgit2/deps/pcre/ucp.h +0 -224
- data/vendor/libgit2/deps/winhttp/COPYING.GPL +0 -993
- data/vendor/libgit2/deps/winhttp/COPYING.LGPL +0 -502
- data/vendor/libgit2/deps/zlib/COPYING +0 -27
- data/vendor/libgit2/include/git2/apply.h +0 -149
- data/vendor/libgit2/include/git2/cert.h +0 -135
- data/vendor/libgit2/include/git2/cred.h +0 -308
- data/vendor/libgit2/include/git2/deprecated.h +0 -493
- data/vendor/libgit2/include/git2/mailmap.h +0 -115
- data/vendor/libgit2/include/git2/sys/alloc.h +0 -101
- data/vendor/libgit2/include/git2/sys/cred.h +0 -90
- data/vendor/libgit2/include/git2/sys/path.h +0 -64
- data/vendor/libgit2/src/alloc.c +0 -43
- data/vendor/libgit2/src/alloc.h +0 -40
- data/vendor/libgit2/src/allocators/stdalloc.c +0 -119
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/config_backend.h +0 -96
- data/vendor/libgit2/src/config_entries.c +0 -229
- data/vendor/libgit2/src/config_entries.h +0 -24
- data/vendor/libgit2/src/config_mem.c +0 -220
- data/vendor/libgit2/src/config_snapshot.c +0 -206
- data/vendor/libgit2/src/errors.h +0 -81
- data/vendor/libgit2/src/hash/sha1.h +0 -38
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +0 -48
- data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +0 -46
- data/vendor/libgit2/src/hash/sha1/mbedtls.h +0 -19
- data/vendor/libgit2/src/hash/sha1/openssl.c +0 -59
- data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
- data/vendor/libgit2/src/mailmap.c +0 -485
- data/vendor/libgit2/src/mailmap.h +0 -35
- data/vendor/libgit2/src/net.c +0 -184
- data/vendor/libgit2/src/net.h +0 -36
- data/vendor/libgit2/src/reader.c +0 -265
- data/vendor/libgit2/src/reader.h +0 -107
- data/vendor/libgit2/src/regexp.c +0 -221
- data/vendor/libgit2/src/regexp.h +0 -97
- data/vendor/libgit2/src/streams/mbedtls.c +0 -483
- data/vendor/libgit2/src/streams/mbedtls.h +0 -23
- data/vendor/libgit2/src/streams/registry.c +0 -118
- data/vendor/libgit2/src/streams/registry.h +0 -19
- data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
- data/vendor/libgit2/src/wildmatch.c +0 -320
- data/vendor/libgit2/src/wildmatch.h +0 -23
- data/vendor/libgit2/src/win32/w32_common.h +0 -39
@@ -41,8 +41,6 @@ typedef enum {
|
|
41
41
|
GIT_ITERATOR_INCLUDE_CONFLICTS = (1u << 6),
|
42
42
|
/** descend into symlinked directories */
|
43
43
|
GIT_ITERATOR_DESCEND_SYMLINKS = (1u << 7),
|
44
|
-
/** hash files in workdir or filesystem iterators */
|
45
|
-
GIT_ITERATOR_INCLUDE_HASH = (1u << 8),
|
46
44
|
} git_iterator_flag_t;
|
47
45
|
|
48
46
|
typedef enum {
|
@@ -291,19 +289,6 @@ extern int git_iterator_current_workdir_path(
|
|
291
289
|
*/
|
292
290
|
extern git_index *git_iterator_index(git_iterator *iter);
|
293
291
|
|
294
|
-
typedef int (*git_iterator_foreach_cb)(
|
295
|
-
const git_index_entry *entry,
|
296
|
-
void *data);
|
297
|
-
|
298
|
-
/**
|
299
|
-
* Walk the given iterator and invoke the callback for each path
|
300
|
-
* contained in the iterator.
|
301
|
-
*/
|
302
|
-
extern int git_iterator_foreach(
|
303
|
-
git_iterator *iterator,
|
304
|
-
git_iterator_foreach_cb cb,
|
305
|
-
void *data);
|
306
|
-
|
307
292
|
typedef int (*git_iterator_walk_cb)(
|
308
293
|
const git_index_entry **entries,
|
309
294
|
void *data);
|
data/vendor/libgit2/src/khash.h
CHANGED
@@ -146,10 +146,8 @@ typedef unsigned long long khint64_t;
|
|
146
146
|
#ifndef kh_inline
|
147
147
|
#ifdef _MSC_VER
|
148
148
|
#define kh_inline __inline
|
149
|
-
#elif defined(__GNUC__)
|
150
|
-
#define kh_inline __inline__
|
151
149
|
#else
|
152
|
-
#define kh_inline
|
150
|
+
#define kh_inline inline
|
153
151
|
#endif
|
154
152
|
#endif /* kh_inline */
|
155
153
|
|
data/vendor/libgit2/src/map.h
CHANGED
@@ -40,7 +40,7 @@ typedef struct { /* memory mapped buffer */
|
|
40
40
|
assert((prot & GIT_PROT_WRITE) || (prot & GIT_PROT_READ)); \
|
41
41
|
assert((flags & GIT_MAP_FIXED) == 0); } while (0)
|
42
42
|
|
43
|
-
extern int p_mmap(git_map *out, size_t len, int prot, int flags, int fd,
|
43
|
+
extern int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset);
|
44
44
|
extern int p_munmap(git_map *map);
|
45
45
|
|
46
46
|
#endif
|
data/vendor/libgit2/src/merge.c
CHANGED
@@ -80,7 +80,7 @@ int merge_bases_many(git_commit_list **out, git_revwalk **walk_out, git_reposito
|
|
80
80
|
unsigned int i;
|
81
81
|
|
82
82
|
if (length < 2) {
|
83
|
-
|
83
|
+
giterr_set(GITERR_INVALID, "at least two commits are required to find an ancestor");
|
84
84
|
return -1;
|
85
85
|
}
|
86
86
|
|
@@ -106,7 +106,7 @@ int merge_bases_many(git_commit_list **out, git_revwalk **walk_out, git_reposito
|
|
106
106
|
goto on_error;
|
107
107
|
|
108
108
|
if (!result) {
|
109
|
-
|
109
|
+
giterr_set(GITERR_MERGE, "no merge base found");
|
110
110
|
error = GIT_ENOTFOUND;
|
111
111
|
goto on_error;
|
112
112
|
}
|
@@ -186,7 +186,7 @@ int git_merge_base_octopus(git_oid *out, git_repository *repo, size_t length, co
|
|
186
186
|
assert(out && repo && input_array);
|
187
187
|
|
188
188
|
if (length < 2) {
|
189
|
-
|
189
|
+
giterr_set(GITERR_INVALID, "at least two commits are required to find an ancestor");
|
190
190
|
return -1;
|
191
191
|
}
|
192
192
|
|
@@ -232,7 +232,7 @@ static int merge_bases(git_commit_list **out, git_revwalk **walk_out, git_reposi
|
|
232
232
|
|
233
233
|
if (!result) {
|
234
234
|
git_revwalk_free(walk);
|
235
|
-
|
235
|
+
giterr_set(GITERR_MERGE, "no merge base found");
|
236
236
|
return GIT_ENOTFOUND;
|
237
237
|
}
|
238
238
|
|
@@ -310,55 +310,46 @@ static int interesting(git_pqueue *list)
|
|
310
310
|
return 0;
|
311
311
|
}
|
312
312
|
|
313
|
-
static
|
313
|
+
static void clear_commit_marks_1(git_commit_list **plist,
|
314
314
|
git_commit_list_node *commit, unsigned int mark)
|
315
315
|
{
|
316
316
|
while (commit) {
|
317
317
|
unsigned int i;
|
318
318
|
|
319
319
|
if (!(mark & commit->flags))
|
320
|
-
return
|
320
|
+
return;
|
321
321
|
|
322
322
|
commit->flags &= ~mark;
|
323
323
|
|
324
324
|
for (i = 1; i < commit->out_degree; i++) {
|
325
325
|
git_commit_list_node *p = commit->parents[i];
|
326
|
-
|
327
|
-
return -1;
|
326
|
+
git_commit_list_insert(p, plist);
|
328
327
|
}
|
329
328
|
|
330
329
|
commit = commit->out_degree ? commit->parents[0] : NULL;
|
331
330
|
}
|
332
|
-
|
333
|
-
return 0;
|
334
331
|
}
|
335
332
|
|
336
|
-
static
|
333
|
+
static void clear_commit_marks_many(git_vector *commits, unsigned int mark)
|
337
334
|
{
|
338
335
|
git_commit_list *list = NULL;
|
339
336
|
git_commit_list_node *c;
|
340
337
|
unsigned int i;
|
341
338
|
|
342
339
|
git_vector_foreach(commits, i, c) {
|
343
|
-
|
344
|
-
return -1;
|
340
|
+
git_commit_list_insert(c, &list);
|
345
341
|
}
|
346
342
|
|
347
343
|
while (list)
|
348
|
-
|
349
|
-
return -1;
|
350
|
-
return 0;
|
344
|
+
clear_commit_marks_1(&list, git_commit_list_pop(&list), mark);
|
351
345
|
}
|
352
346
|
|
353
|
-
static
|
347
|
+
static void clear_commit_marks(git_commit_list_node *commit, unsigned int mark)
|
354
348
|
{
|
355
349
|
git_commit_list *list = NULL;
|
356
|
-
|
357
|
-
return -1;
|
350
|
+
git_commit_list_insert(commit, &list);
|
358
351
|
while (list)
|
359
|
-
|
360
|
-
return -1;
|
361
|
-
return 0;
|
352
|
+
clear_commit_marks_1(&list, git_commit_list_pop(&list), mark);
|
362
353
|
}
|
363
354
|
|
364
355
|
static int paint_down_to_common(
|
@@ -435,9 +426,9 @@ static int remove_redundant(git_revwalk *walk, git_vector *commits)
|
|
435
426
|
int error = 0;
|
436
427
|
|
437
428
|
redundant = git__calloc(commits->length, 1);
|
438
|
-
|
429
|
+
GITERR_CHECK_ALLOC(redundant);
|
439
430
|
filled_index = git__calloc((commits->length - 1), sizeof(unsigned int));
|
440
|
-
|
431
|
+
GITERR_CHECK_ALLOC(filled_index);
|
441
432
|
|
442
433
|
for (i = 0; i < commits->length; ++i) {
|
443
434
|
if ((error = git_commit_list_parse(walk, commits->contents[i])) < 0)
|
@@ -475,11 +466,10 @@ static int remove_redundant(git_revwalk *walk, git_vector *commits)
|
|
475
466
|
redundant[filled_index[j]] = 1;
|
476
467
|
}
|
477
468
|
|
478
|
-
|
469
|
+
clear_commit_marks(commit, ALL_FLAGS);
|
470
|
+
clear_commit_marks_many(&work, ALL_FLAGS);
|
479
471
|
|
480
|
-
|
481
|
-
(error = clear_commit_marks_many(&work, ALL_FLAGS)) < 0)
|
482
|
-
goto done;
|
472
|
+
git_commit_list_free(&common);
|
483
473
|
}
|
484
474
|
|
485
475
|
for (i = 0; i < commits->length; ++i) {
|
@@ -541,9 +531,10 @@ int git_merge__bases_many(git_commit_list **out, git_revwalk *walk, git_commit_l
|
|
541
531
|
while (result)
|
542
532
|
git_vector_insert(&redundant, git_commit_list_pop(&result));
|
543
533
|
|
544
|
-
|
545
|
-
|
546
|
-
|
534
|
+
clear_commit_marks(one, ALL_FLAGS);
|
535
|
+
clear_commit_marks_many(twos, ALL_FLAGS);
|
536
|
+
|
537
|
+
if ((error = remove_redundant(walk, &redundant)) < 0) {
|
547
538
|
git_vector_free(&redundant);
|
548
539
|
return error;
|
549
540
|
}
|
@@ -585,7 +576,7 @@ int git_repository_mergehead_foreach(
|
|
585
576
|
|
586
577
|
while ((line = git__strsep(&buffer, "\n")) != NULL) {
|
587
578
|
if (strlen(line) != GIT_OID_HEXSZ) {
|
588
|
-
|
579
|
+
giterr_set(GITERR_INVALID, "unable to parse OID - invalid length");
|
589
580
|
error = -1;
|
590
581
|
goto cleanup;
|
591
582
|
}
|
@@ -594,7 +585,7 @@ int git_repository_mergehead_foreach(
|
|
594
585
|
goto cleanup;
|
595
586
|
|
596
587
|
if ((error = cb(&oid, payload)) != 0) {
|
597
|
-
|
588
|
+
giterr_set_after_callback(error);
|
598
589
|
goto cleanup;
|
599
590
|
}
|
600
591
|
|
@@ -602,14 +593,14 @@ int git_repository_mergehead_foreach(
|
|
602
593
|
}
|
603
594
|
|
604
595
|
if (*buffer) {
|
605
|
-
|
596
|
+
giterr_set(GITERR_MERGE, "no EOL at line %"PRIuZ, line_num);
|
606
597
|
error = -1;
|
607
598
|
goto cleanup;
|
608
599
|
}
|
609
600
|
|
610
601
|
cleanup:
|
611
|
-
|
612
|
-
|
602
|
+
git_buf_free(&merge_head_path);
|
603
|
+
git_buf_free(&merge_head_file);
|
613
604
|
|
614
605
|
return error;
|
615
606
|
}
|
@@ -868,23 +859,23 @@ static int merge_conflict_invoke_driver(
|
|
868
859
|
|
869
860
|
if ((error = driver->apply(driver, &path, &mode, &buf, name, src)) < 0 ||
|
870
861
|
(error = git_repository_odb(&odb, src->repo)) < 0 ||
|
871
|
-
(error = git_odb_write(&oid, odb, buf.ptr, buf.size,
|
862
|
+
(error = git_odb_write(&oid, odb, buf.ptr, buf.size, GIT_OBJ_BLOB)) < 0)
|
872
863
|
goto done;
|
873
864
|
|
874
865
|
result = git_pool_mallocz(&diff_list->pool, sizeof(git_index_entry));
|
875
|
-
|
866
|
+
GITERR_CHECK_ALLOC(result);
|
876
867
|
|
877
868
|
git_oid_cpy(&result->id, &oid);
|
878
869
|
result->mode = mode;
|
879
|
-
result->file_size =
|
870
|
+
result->file_size = buf.size;
|
880
871
|
|
881
872
|
result->path = git_pool_strdup(&diff_list->pool, path);
|
882
|
-
|
873
|
+
GITERR_CHECK_ALLOC(result->path);
|
883
874
|
|
884
875
|
*out = result;
|
885
876
|
|
886
877
|
done:
|
887
|
-
|
878
|
+
git_buf_free(&buf);
|
888
879
|
git_odb_free(odb);
|
889
880
|
|
890
881
|
return error;
|
@@ -1024,7 +1015,7 @@ static int index_entry_similarity_calc(
|
|
1024
1015
|
{
|
1025
1016
|
git_blob *blob;
|
1026
1017
|
git_diff_file diff_file = {{{0}}};
|
1027
|
-
|
1018
|
+
git_off_t blobsize;
|
1028
1019
|
int error;
|
1029
1020
|
|
1030
1021
|
*out = NULL;
|
@@ -1093,7 +1084,7 @@ static int index_entry_similarity_inexact(
|
|
1093
1084
|
}
|
1094
1085
|
|
1095
1086
|
/* Tracks deletes by oid for merge_diff_mark_similarity_exact(). This is a
|
1096
|
-
* non-shrinking queue where next_pos is the next position to dequeue.
|
1087
|
+
* non-shrinking queue where next_pos is the next position to dequeue.
|
1097
1088
|
*/
|
1098
1089
|
typedef struct {
|
1099
1090
|
git_array_t(size_t) arr;
|
@@ -1113,38 +1104,46 @@ static void deletes_by_oid_free(git_oidmap *map) {
|
|
1113
1104
|
git_oidmap_free(map);
|
1114
1105
|
}
|
1115
1106
|
|
1116
|
-
static int deletes_by_oid_enqueue(git_oidmap *map, git_pool* pool, const git_oid *id, size_t idx)
|
1117
|
-
|
1107
|
+
static int deletes_by_oid_enqueue(git_oidmap *map, git_pool* pool, const git_oid *id, size_t idx) {
|
1108
|
+
khint_t pos;
|
1118
1109
|
deletes_by_oid_queue *queue;
|
1119
1110
|
size_t *array_entry;
|
1111
|
+
int error;
|
1120
1112
|
|
1121
|
-
|
1113
|
+
pos = git_oidmap_lookup_index(map, id);
|
1114
|
+
if (!git_oidmap_valid_index(map, pos)) {
|
1122
1115
|
queue = git_pool_malloc(pool, sizeof(deletes_by_oid_queue));
|
1123
|
-
|
1116
|
+
GITERR_CHECK_ALLOC(queue);
|
1124
1117
|
|
1125
1118
|
git_array_init(queue->arr);
|
1126
1119
|
queue->next_pos = 0;
|
1127
1120
|
queue->first_entry = idx;
|
1128
1121
|
|
1129
|
-
|
1122
|
+
git_oidmap_insert(map, id, queue, &error);
|
1123
|
+
if (error < 0)
|
1130
1124
|
return -1;
|
1131
1125
|
} else {
|
1126
|
+
queue = git_oidmap_value_at(map, pos);
|
1132
1127
|
array_entry = git_array_alloc(queue->arr);
|
1133
|
-
|
1128
|
+
GITERR_CHECK_ALLOC(array_entry);
|
1134
1129
|
*array_entry = idx;
|
1135
1130
|
}
|
1136
1131
|
|
1137
1132
|
return 0;
|
1138
1133
|
}
|
1139
1134
|
|
1140
|
-
static int deletes_by_oid_dequeue(size_t *idx, git_oidmap *map, const git_oid *id)
|
1141
|
-
|
1135
|
+
static int deletes_by_oid_dequeue(size_t *idx, git_oidmap *map, const git_oid *id) {
|
1136
|
+
khint_t pos;
|
1142
1137
|
deletes_by_oid_queue *queue;
|
1143
1138
|
size_t *array_entry;
|
1144
1139
|
|
1145
|
-
|
1140
|
+
pos = git_oidmap_lookup_index(map, id);
|
1141
|
+
|
1142
|
+
if (!git_oidmap_valid_index(map, pos))
|
1146
1143
|
return GIT_ENOTFOUND;
|
1147
1144
|
|
1145
|
+
queue = git_oidmap_value_at(map, pos);
|
1146
|
+
|
1148
1147
|
if (queue->next_pos == 0) {
|
1149
1148
|
*idx = queue->first_entry;
|
1150
1149
|
} else {
|
@@ -1169,8 +1168,8 @@ static int merge_diff_mark_similarity_exact(
|
|
1169
1168
|
git_oidmap *ours_deletes_by_oid = NULL, *theirs_deletes_by_oid = NULL;
|
1170
1169
|
int error = 0;
|
1171
1170
|
|
1172
|
-
if (
|
1173
|
-
|
1171
|
+
if (!(ours_deletes_by_oid = git_oidmap_alloc()) ||
|
1172
|
+
!(theirs_deletes_by_oid = git_oidmap_alloc())) {
|
1174
1173
|
error = -1;
|
1175
1174
|
goto done;
|
1176
1175
|
}
|
@@ -1511,11 +1510,11 @@ int git_merge_diff_list__find_renames(
|
|
1511
1510
|
|
1512
1511
|
similarity_ours = git__calloc(diff_list->conflicts.length,
|
1513
1512
|
sizeof(struct merge_diff_similarity));
|
1514
|
-
|
1513
|
+
GITERR_CHECK_ALLOC(similarity_ours);
|
1515
1514
|
|
1516
1515
|
similarity_theirs = git__calloc(diff_list->conflicts.length,
|
1517
1516
|
sizeof(struct merge_diff_similarity));
|
1518
|
-
|
1517
|
+
GITERR_CHECK_ALLOC(similarity_theirs);
|
1519
1518
|
|
1520
1519
|
/* Calculate similarity between items that were deleted from the ancestor
|
1521
1520
|
* and added in the other branch.
|
@@ -1524,9 +1523,9 @@ int git_merge_diff_list__find_renames(
|
|
1524
1523
|
goto done;
|
1525
1524
|
|
1526
1525
|
if (opts->rename_threshold < 100 && diff_list->conflicts.length <= opts->target_limit) {
|
1527
|
-
|
1526
|
+
GITERR_CHECK_ALLOC_MULTIPLY(&cache_size, diff_list->conflicts.length, 3);
|
1528
1527
|
cache = git__calloc(cache_size, sizeof(void *));
|
1529
|
-
|
1528
|
+
GITERR_CHECK_ALLOC(cache);
|
1530
1529
|
|
1531
1530
|
merge_diff_list_count_candidates(diff_list, &src_count, &tgt_count);
|
1532
1531
|
|
@@ -1740,7 +1739,7 @@ static int merge_diff_list_insert_unmodified(
|
|
1740
1739
|
git_index_entry *entry;
|
1741
1740
|
|
1742
1741
|
entry = git_pool_malloc(&diff_list->pool, sizeof(git_index_entry));
|
1743
|
-
|
1742
|
+
GITERR_CHECK_ALLOC(entry);
|
1744
1743
|
|
1745
1744
|
if ((error = index_entry_dup_pool(entry, &diff_list->pool, tree_items[0])) >= 0)
|
1746
1745
|
error = git_vector_insert(&diff_list->staged, entry);
|
@@ -1847,13 +1846,13 @@ static int merge_normalize_opts(
|
|
1847
1846
|
|
1848
1847
|
if (given && given->default_driver) {
|
1849
1848
|
opts->default_driver = git__strdup(given->default_driver);
|
1850
|
-
|
1849
|
+
GITERR_CHECK_ALLOC(opts->default_driver);
|
1851
1850
|
} else {
|
1852
1851
|
error = git_config_get_entry(&entry, cfg, "merge.default");
|
1853
1852
|
|
1854
1853
|
if (error == 0) {
|
1855
1854
|
opts->default_driver = git__strdup(entry->value);
|
1856
|
-
|
1855
|
+
GITERR_CHECK_ALLOC(opts->default_driver);
|
1857
1856
|
} else if (error == GIT_ENOTFOUND) {
|
1858
1857
|
error = 0;
|
1859
1858
|
} else {
|
@@ -1874,7 +1873,7 @@ static int merge_normalize_opts(
|
|
1874
1873
|
/* assign the internal metric with whitespace flag as payload */
|
1875
1874
|
if (!opts->metric) {
|
1876
1875
|
opts->metric = git__malloc(sizeof(git_diff_similarity_metric));
|
1877
|
-
|
1876
|
+
GITERR_CHECK_ALLOC(opts->metric);
|
1878
1877
|
|
1879
1878
|
opts->metric->file_signature = git_diff_find_similar__hashsig_for_file;
|
1880
1879
|
opts->metric->buffer_signature = git_diff_find_similar__hashsig_for_buf;
|
@@ -2061,7 +2060,7 @@ int git_merge__iterators(
|
|
2061
2060
|
|
2062
2061
|
*out = NULL;
|
2063
2062
|
|
2064
|
-
|
2063
|
+
GITERR_CHECK_VERSION(
|
2065
2064
|
given_opts, GIT_MERGE_OPTIONS_VERSION, "git_merge_options");
|
2066
2065
|
|
2067
2066
|
if ((error = merge_normalize_opts(repo, &opts, given_opts)) < 0)
|
@@ -2080,7 +2079,7 @@ int git_merge__iterators(
|
|
2080
2079
|
}
|
2081
2080
|
|
2082
2081
|
diff_list = git_merge_diff_list__alloc(repo);
|
2083
|
-
|
2082
|
+
GITERR_CHECK_ALLOC(diff_list);
|
2084
2083
|
|
2085
2084
|
ancestor_iter = iterator_given_or_empty(&empty_ancestor, ancestor_iter);
|
2086
2085
|
our_iter = iterator_given_or_empty(&empty_ours, our_iter);
|
@@ -2103,7 +2102,7 @@ int git_merge__iterators(
|
|
2103
2102
|
|
2104
2103
|
if (!resolved) {
|
2105
2104
|
if ((opts.flags & GIT_MERGE_FAIL_ON_CONFLICT)) {
|
2106
|
-
|
2105
|
+
giterr_set(GITERR_MERGE, "merge conflicts exist");
|
2107
2106
|
error = GIT_EMERGECONFLICT;
|
2108
2107
|
goto done;
|
2109
2108
|
}
|
@@ -2200,13 +2199,13 @@ GIT_INLINE(int) insert_head_ids(
|
|
2200
2199
|
|
2201
2200
|
if (annotated_commit->type == GIT_ANNOTATED_COMMIT_REAL) {
|
2202
2201
|
id = git_array_alloc(*ids);
|
2203
|
-
|
2202
|
+
GITERR_CHECK_ALLOC(id);
|
2204
2203
|
|
2205
2204
|
git_oid_cpy(id, git_commit_id(annotated_commit->commit));
|
2206
2205
|
} else {
|
2207
2206
|
for (i = 0; i < annotated_commit->parents.size; i++) {
|
2208
2207
|
id = git_array_alloc(*ids);
|
2209
|
-
|
2208
|
+
GITERR_CHECK_ALLOC(id);
|
2210
2209
|
|
2211
2210
|
git_oid_cpy(id, &annotated_commit->parents.ptr[i]);
|
2212
2211
|
}
|
@@ -2241,7 +2240,7 @@ static int create_virtual_base(
|
|
2241
2240
|
return -1;
|
2242
2241
|
|
2243
2242
|
result = git__calloc(1, sizeof(git_annotated_commit));
|
2244
|
-
|
2243
|
+
GITERR_CHECK_ALLOC(result);
|
2245
2244
|
result->type = GIT_ANNOTATED_COMMIT_VIRTUAL;
|
2246
2245
|
result->index = index;
|
2247
2246
|
|
@@ -2369,7 +2368,7 @@ static int merge_annotated_commits(
|
|
2369
2368
|
if (error != GIT_ENOTFOUND)
|
2370
2369
|
goto done;
|
2371
2370
|
|
2372
|
-
|
2371
|
+
giterr_clear();
|
2373
2372
|
}
|
2374
2373
|
|
2375
2374
|
if ((error = iterator_for_annotated_commit(&base_iter, base)) < 0 ||
|
@@ -2431,7 +2430,7 @@ static int write_merge_head(
|
|
2431
2430
|
assert(repo && heads);
|
2432
2431
|
|
2433
2432
|
if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_MERGE_HEAD_FILE)) < 0 ||
|
2434
|
-
(error = git_filebuf_open(&file, file_path.ptr,
|
2433
|
+
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_MERGE_FILE_MODE)) < 0)
|
2435
2434
|
goto cleanup;
|
2436
2435
|
|
2437
2436
|
for (i = 0; i < heads_len; i++) {
|
@@ -2445,7 +2444,7 @@ cleanup:
|
|
2445
2444
|
if (error < 0)
|
2446
2445
|
git_filebuf_cleanup(&file);
|
2447
2446
|
|
2448
|
-
|
2447
|
+
git_buf_free(&file_path);
|
2449
2448
|
|
2450
2449
|
return error;
|
2451
2450
|
}
|
@@ -2459,7 +2458,7 @@ static int write_merge_mode(git_repository *repo)
|
|
2459
2458
|
assert(repo);
|
2460
2459
|
|
2461
2460
|
if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_MERGE_MODE_FILE)) < 0 ||
|
2462
|
-
(error = git_filebuf_open(&file, file_path.ptr,
|
2461
|
+
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_MERGE_FILE_MODE)) < 0)
|
2463
2462
|
goto cleanup;
|
2464
2463
|
|
2465
2464
|
if ((error = git_filebuf_write(&file, "no-ff", 5)) < 0)
|
@@ -2471,7 +2470,7 @@ cleanup:
|
|
2471
2470
|
if (error < 0)
|
2472
2471
|
git_filebuf_cleanup(&file);
|
2473
2472
|
|
2474
|
-
|
2473
|
+
git_buf_free(&file_path);
|
2475
2474
|
|
2476
2475
|
return error;
|
2477
2476
|
}
|
@@ -2679,7 +2678,7 @@ static int write_merge_msg(
|
|
2679
2678
|
assert(repo && heads);
|
2680
2679
|
|
2681
2680
|
entries = git__calloc(heads_len, sizeof(struct merge_msg_entry));
|
2682
|
-
|
2681
|
+
GITERR_CHECK_ALLOC(entries);
|
2683
2682
|
|
2684
2683
|
if (git_vector_init(&matching, heads_len, NULL) < 0) {
|
2685
2684
|
git__free(entries);
|
@@ -2690,7 +2689,7 @@ static int write_merge_msg(
|
|
2690
2689
|
entries[i].merge_head = heads[i];
|
2691
2690
|
|
2692
2691
|
if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 ||
|
2693
|
-
(error = git_filebuf_open(&file, file_path.ptr,
|
2692
|
+
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_MERGE_FILE_MODE)) < 0 ||
|
2694
2693
|
(error = git_filebuf_write(&file, "Merge ", 6)) < 0)
|
2695
2694
|
goto cleanup;
|
2696
2695
|
|
@@ -2771,7 +2770,7 @@ cleanup:
|
|
2771
2770
|
if (error < 0)
|
2772
2771
|
git_filebuf_cleanup(&file);
|
2773
2772
|
|
2774
|
-
|
2773
|
+
git_buf_free(&file_path);
|
2775
2774
|
|
2776
2775
|
git_vector_free(&matching);
|
2777
2776
|
git__free(entries);
|
@@ -2813,9 +2812,9 @@ static int merge_ancestor_head(
|
|
2813
2812
|
|
2814
2813
|
assert(repo && our_head && their_heads);
|
2815
2814
|
|
2816
|
-
|
2815
|
+
GITERR_CHECK_ALLOC_ADD(&alloc_len, their_heads_len, 1);
|
2817
2816
|
oids = git__calloc(alloc_len, sizeof(git_oid));
|
2818
|
-
|
2817
|
+
GITERR_CHECK_ALLOC(oids);
|
2819
2818
|
|
2820
2819
|
git_oid_cpy(&oids[0], git_commit_id(our_head->commit));
|
2821
2820
|
|
@@ -3039,7 +3038,7 @@ int git_merge__check_result(git_repository *repo, git_index *index_new)
|
|
3039
3038
|
goto done;
|
3040
3039
|
|
3041
3040
|
if ((conflicts = index_conflicts + wd_conflicts) > 0) {
|
3042
|
-
|
3041
|
+
giterr_set(GITERR_MERGE, "%" PRIuZ " uncommitted change%s would be overwritten by merge",
|
3043
3042
|
conflicts, (conflicts != 1) ? "s" : "");
|
3044
3043
|
error = GIT_ECONFLICT;
|
3045
3044
|
}
|
@@ -3091,7 +3090,7 @@ cleanup:
|
|
3091
3090
|
if (error < 0)
|
3092
3091
|
git_filebuf_cleanup(&file);
|
3093
3092
|
|
3094
|
-
|
3093
|
+
git_buf_free(&file_path);
|
3095
3094
|
|
3096
3095
|
return error;
|
3097
3096
|
}
|
@@ -3111,24 +3110,28 @@ static int merge_heads(
|
|
3111
3110
|
git_annotated_commit **ancestor_head_out,
|
3112
3111
|
git_annotated_commit **our_head_out,
|
3113
3112
|
git_repository *repo,
|
3114
|
-
git_reference *our_ref,
|
3115
3113
|
const git_annotated_commit **their_heads,
|
3116
3114
|
size_t their_heads_len)
|
3117
3115
|
{
|
3118
3116
|
git_annotated_commit *ancestor_head = NULL, *our_head = NULL;
|
3117
|
+
git_reference *our_ref = NULL;
|
3119
3118
|
int error = 0;
|
3120
3119
|
|
3121
3120
|
*ancestor_head_out = NULL;
|
3122
3121
|
*our_head_out = NULL;
|
3123
3122
|
|
3124
|
-
if ((error =
|
3123
|
+
if ((error = git_repository__ensure_not_bare(repo, "merge")) < 0)
|
3124
|
+
goto done;
|
3125
|
+
|
3126
|
+
if ((error = git_reference_lookup(&our_ref, repo, GIT_HEAD_FILE)) < 0 ||
|
3127
|
+
(error = git_annotated_commit_from_ref(&our_head, repo, our_ref)) < 0)
|
3125
3128
|
goto done;
|
3126
3129
|
|
3127
3130
|
if ((error = merge_ancestor_head(&ancestor_head, repo, our_head, their_heads, their_heads_len)) < 0) {
|
3128
3131
|
if (error != GIT_ENOTFOUND)
|
3129
3132
|
goto done;
|
3130
3133
|
|
3131
|
-
|
3134
|
+
giterr_clear();
|
3132
3135
|
error = 0;
|
3133
3136
|
}
|
3134
3137
|
|
@@ -3141,6 +3144,8 @@ done:
|
|
3141
3144
|
git_annotated_commit_free(our_head);
|
3142
3145
|
}
|
3143
3146
|
|
3147
|
+
git_reference_free(our_ref);
|
3148
|
+
|
3144
3149
|
return error;
|
3145
3150
|
}
|
3146
3151
|
|
@@ -3157,7 +3162,7 @@ static int merge_preference(git_merge_preference_t *out, git_repository *repo)
|
|
3157
3162
|
|
3158
3163
|
if ((error = git_config_get_string(&value, config, "merge.ff")) < 0) {
|
3159
3164
|
if (error == GIT_ENOTFOUND) {
|
3160
|
-
|
3165
|
+
giterr_clear();
|
3161
3166
|
error = 0;
|
3162
3167
|
}
|
3163
3168
|
|
@@ -3177,22 +3182,20 @@ done:
|
|
3177
3182
|
return error;
|
3178
3183
|
}
|
3179
3184
|
|
3180
|
-
int
|
3185
|
+
int git_merge_analysis(
|
3181
3186
|
git_merge_analysis_t *analysis_out,
|
3182
3187
|
git_merge_preference_t *preference_out,
|
3183
3188
|
git_repository *repo,
|
3184
|
-
git_reference *our_ref,
|
3185
3189
|
const git_annotated_commit **their_heads,
|
3186
3190
|
size_t their_heads_len)
|
3187
3191
|
{
|
3188
3192
|
git_annotated_commit *ancestor_head = NULL, *our_head = NULL;
|
3189
3193
|
int error = 0;
|
3190
|
-
bool unborn;
|
3191
3194
|
|
3192
|
-
assert(analysis_out && preference_out && repo && their_heads
|
3195
|
+
assert(analysis_out && preference_out && repo && their_heads);
|
3193
3196
|
|
3194
3197
|
if (their_heads_len != 1) {
|
3195
|
-
|
3198
|
+
giterr_set(GITERR_MERGE, "can only merge a single branch");
|
3196
3199
|
error = -1;
|
3197
3200
|
goto done;
|
3198
3201
|
}
|
@@ -3202,16 +3205,12 @@ int git_merge_analysis_for_ref(
|
|
3202
3205
|
if ((error = merge_preference(preference_out, repo)) < 0)
|
3203
3206
|
goto done;
|
3204
3207
|
|
3205
|
-
if ((
|
3206
|
-
goto done;
|
3207
|
-
|
3208
|
-
if (unborn) {
|
3208
|
+
if (git_repository_head_unborn(repo)) {
|
3209
3209
|
*analysis_out |= GIT_MERGE_ANALYSIS_FASTFORWARD | GIT_MERGE_ANALYSIS_UNBORN;
|
3210
|
-
error = 0;
|
3211
3210
|
goto done;
|
3212
3211
|
}
|
3213
3212
|
|
3214
|
-
if ((error = merge_heads(&ancestor_head, &our_head, repo,
|
3213
|
+
if ((error = merge_heads(&ancestor_head, &our_head, repo, their_heads, their_heads_len)) < 0)
|
3215
3214
|
goto done;
|
3216
3215
|
|
3217
3216
|
/* We're up-to-date if we're trying to merge our own common ancestor. */
|
@@ -3234,28 +3233,6 @@ done:
|
|
3234
3233
|
return error;
|
3235
3234
|
}
|
3236
3235
|
|
3237
|
-
int git_merge_analysis(
|
3238
|
-
git_merge_analysis_t *analysis_out,
|
3239
|
-
git_merge_preference_t *preference_out,
|
3240
|
-
git_repository *repo,
|
3241
|
-
const git_annotated_commit **their_heads,
|
3242
|
-
size_t their_heads_len)
|
3243
|
-
{
|
3244
|
-
git_reference *head_ref = NULL;
|
3245
|
-
int error = 0;
|
3246
|
-
|
3247
|
-
if ((error = git_reference_lookup(&head_ref, repo, GIT_HEAD_FILE)) < 0) {
|
3248
|
-
git_error_set(GIT_ERROR_MERGE, "failed to lookup HEAD reference");
|
3249
|
-
return error;
|
3250
|
-
}
|
3251
|
-
|
3252
|
-
error = git_merge_analysis_for_ref(analysis_out, preference_out, repo, head_ref, their_heads, their_heads_len);
|
3253
|
-
|
3254
|
-
git_reference_free(head_ref);
|
3255
|
-
|
3256
|
-
return error;
|
3257
|
-
}
|
3258
|
-
|
3259
3236
|
int git_merge(
|
3260
3237
|
git_repository *repo,
|
3261
3238
|
const git_annotated_commit **their_heads,
|
@@ -3266,15 +3243,15 @@ int git_merge(
|
|
3266
3243
|
git_reference *our_ref = NULL;
|
3267
3244
|
git_checkout_options checkout_opts;
|
3268
3245
|
git_annotated_commit *our_head = NULL, *base = NULL;
|
3269
|
-
git_index *
|
3246
|
+
git_index *index = NULL;
|
3270
3247
|
git_indexwriter indexwriter = GIT_INDEXWRITER_INIT;
|
3271
3248
|
unsigned int checkout_strategy;
|
3272
3249
|
int error = 0;
|
3273
3250
|
|
3274
|
-
assert(repo && their_heads
|
3251
|
+
assert(repo && their_heads);
|
3275
3252
|
|
3276
3253
|
if (their_heads_len != 1) {
|
3277
|
-
|
3254
|
+
giterr_set(GITERR_MERGE, "can only merge a single branch");
|
3278
3255
|
return -1;
|
3279
3256
|
}
|
3280
3257
|
|
@@ -3289,10 +3266,6 @@ int git_merge(
|
|
3289
3266
|
&checkout_strategy)) < 0)
|
3290
3267
|
goto done;
|
3291
3268
|
|
3292
|
-
if ((error = git_repository_index(&repo_index, repo) < 0) ||
|
3293
|
-
(error = git_index_read(repo_index, 0) < 0))
|
3294
|
-
goto done;
|
3295
|
-
|
3296
3269
|
/* Write the merge setup files to the repository. */
|
3297
3270
|
if ((error = git_annotated_commit_from_head(&our_head, repo)) < 0 ||
|
3298
3271
|
(error = git_merge__setup(repo, our_head, their_heads,
|
@@ -3326,45 +3299,28 @@ done:
|
|
3326
3299
|
git_annotated_commit_free(our_head);
|
3327
3300
|
git_annotated_commit_free(base);
|
3328
3301
|
git_reference_free(our_ref);
|
3329
|
-
git_index_free(repo_index);
|
3330
3302
|
|
3331
3303
|
return error;
|
3332
3304
|
}
|
3333
3305
|
|
3334
|
-
int
|
3306
|
+
int git_merge_init_options(git_merge_options *opts, unsigned int version)
|
3335
3307
|
{
|
3336
3308
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3337
3309
|
opts, version, git_merge_options, GIT_MERGE_OPTIONS_INIT);
|
3338
3310
|
return 0;
|
3339
3311
|
}
|
3340
3312
|
|
3341
|
-
int
|
3342
|
-
{
|
3343
|
-
return git_merge_options_init(opts, version);
|
3344
|
-
}
|
3345
|
-
|
3346
|
-
int git_merge_file_input_init(git_merge_file_input *input, unsigned int version)
|
3313
|
+
int git_merge_file_init_input(git_merge_file_input *input, unsigned int version)
|
3347
3314
|
{
|
3348
3315
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3349
3316
|
input, version, git_merge_file_input, GIT_MERGE_FILE_INPUT_INIT);
|
3350
3317
|
return 0;
|
3351
3318
|
}
|
3352
3319
|
|
3353
|
-
int
|
3354
|
-
{
|
3355
|
-
return git_merge_file_input_init(input, version);
|
3356
|
-
}
|
3357
|
-
|
3358
|
-
int git_merge_file_options_init(
|
3320
|
+
int git_merge_file_init_options(
|
3359
3321
|
git_merge_file_options *opts, unsigned int version)
|
3360
3322
|
{
|
3361
3323
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3362
3324
|
opts, version, git_merge_file_options, GIT_MERGE_FILE_OPTIONS_INIT);
|
3363
3325
|
return 0;
|
3364
3326
|
}
|
3365
|
-
|
3366
|
-
int git_merge_file_init_options(
|
3367
|
-
git_merge_file_options *opts, unsigned int version)
|
3368
|
-
{
|
3369
|
-
return git_merge_file_options_init(opts, version);
|
3370
|
-
}
|