rugged 0.28.4 → 0.28.4.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 +16 -36
- data/vendor/libgit2/COPYING +0 -28
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +1 -5
- 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/http_parser.c +6 -11
- data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/regex/COPYING +502 -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/adler32.c +7 -0
- data/vendor/libgit2/deps/zlib/crc32.c +7 -0
- data/vendor/libgit2/include/git2.h +0 -2
- data/vendor/libgit2/include/git2/apply.h +2 -22
- data/vendor/libgit2/include/git2/attr.h +12 -19
- data/vendor/libgit2/include/git2/blame.h +2 -2
- data/vendor/libgit2/include/git2/blob.h +12 -44
- data/vendor/libgit2/include/git2/buffer.h +14 -20
- data/vendor/libgit2/include/git2/checkout.h +14 -46
- data/vendor/libgit2/include/git2/cherrypick.h +3 -3
- data/vendor/libgit2/include/git2/clone.h +2 -2
- data/vendor/libgit2/include/git2/commit.h +1 -23
- data/vendor/libgit2/include/git2/common.h +5 -7
- data/vendor/libgit2/include/git2/config.h +12 -12
- data/vendor/libgit2/include/git2/deprecated.h +3 -243
- data/vendor/libgit2/include/git2/describe.h +4 -4
- data/vendor/libgit2/include/git2/diff.h +14 -16
- data/vendor/libgit2/include/git2/filter.h +0 -8
- data/vendor/libgit2/include/git2/index.h +1 -2
- data/vendor/libgit2/include/git2/indexer.h +4 -48
- data/vendor/libgit2/include/git2/inttypes.h +309 -0
- data/vendor/libgit2/include/git2/merge.h +10 -6
- data/vendor/libgit2/include/git2/net.h +5 -0
- data/vendor/libgit2/include/git2/object.h +14 -2
- data/vendor/libgit2/include/git2/odb.h +2 -3
- data/vendor/libgit2/include/git2/odb_backend.h +4 -5
- data/vendor/libgit2/include/git2/oid.h +1 -1
- data/vendor/libgit2/include/git2/pack.h +1 -12
- data/vendor/libgit2/include/git2/proxy.h +3 -5
- data/vendor/libgit2/include/git2/rebase.h +2 -46
- data/vendor/libgit2/include/git2/refs.h +0 -19
- data/vendor/libgit2/include/git2/remote.h +12 -35
- data/vendor/libgit2/include/git2/repository.h +2 -24
- data/vendor/libgit2/include/git2/revert.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +3 -3
- data/vendor/libgit2/include/git2/status.h +16 -25
- data/vendor/libgit2/include/git2/submodule.h +3 -20
- data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
- data/vendor/libgit2/include/git2/sys/odb_backend.h +4 -48
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +21 -57
- data/vendor/libgit2/include/git2/sys/repository.h +1 -5
- data/vendor/libgit2/include/git2/sys/time.h +31 -0
- data/vendor/libgit2/include/git2/sys/transport.h +2 -2
- data/vendor/libgit2/include/git2/tag.h +2 -11
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transport.h +340 -11
- data/vendor/libgit2/include/git2/tree.h +1 -1
- data/vendor/libgit2/include/git2/types.h +89 -4
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/include/git2/worktree.h +5 -5
- data/vendor/libgit2/libgit2.pc.in +13 -0
- data/vendor/libgit2/src/CMakeLists.txt +222 -88
- data/vendor/libgit2/src/alloc.c +14 -2
- data/vendor/libgit2/src/apply.c +30 -60
- data/vendor/libgit2/src/attr.c +64 -70
- data/vendor/libgit2/src/attr_file.c +96 -189
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +46 -44
- data/vendor/libgit2/src/attrcache.h +1 -2
- data/vendor/libgit2/src/blame.c +5 -17
- data/vendor/libgit2/src/blame.h +1 -1
- data/vendor/libgit2/src/blame_git.c +7 -21
- data/vendor/libgit2/src/blob.c +17 -81
- data/vendor/libgit2/src/blob.h +2 -2
- data/vendor/libgit2/src/branch.c +5 -29
- data/vendor/libgit2/src/buffer.c +7 -14
- data/vendor/libgit2/src/cache.c +33 -26
- data/vendor/libgit2/src/cache.h +1 -1
- data/vendor/libgit2/src/cc-compat.h +0 -5
- data/vendor/libgit2/src/checkout.c +16 -26
- data/vendor/libgit2/src/cherrypick.c +3 -9
- data/vendor/libgit2/src/clone.c +7 -29
- data/vendor/libgit2/src/clone.h +0 -4
- data/vendor/libgit2/src/commit.c +21 -69
- data/vendor/libgit2/src/commit.h +0 -6
- data/vendor/libgit2/src/commit_list.c +76 -28
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +75 -3
- data/vendor/libgit2/src/config.c +40 -31
- data/vendor/libgit2/src/config.h +6 -7
- data/vendor/libgit2/src/config_backend.h +0 -12
- data/vendor/libgit2/src/config_cache.c +39 -39
- data/vendor/libgit2/src/config_entries.c +99 -69
- data/vendor/libgit2/src/config_entries.h +0 -1
- data/vendor/libgit2/src/config_file.c +380 -337
- data/vendor/libgit2/src/config_mem.c +16 -12
- data/vendor/libgit2/src/config_parse.c +29 -49
- data/vendor/libgit2/src/config_parse.h +12 -13
- data/vendor/libgit2/src/crlf.c +14 -14
- data/vendor/libgit2/src/describe.c +20 -21
- data/vendor/libgit2/src/diff.c +58 -43
- data/vendor/libgit2/src/diff.h +1 -2
- data/vendor/libgit2/src/diff_driver.c +38 -37
- data/vendor/libgit2/src/diff_file.c +7 -9
- data/vendor/libgit2/src/diff_file.h +1 -1
- data/vendor/libgit2/src/diff_generate.c +85 -135
- data/vendor/libgit2/src/diff_generate.h +2 -2
- data/vendor/libgit2/src/diff_parse.c +1 -1
- data/vendor/libgit2/src/diff_print.c +13 -25
- data/vendor/libgit2/src/diff_stats.c +1 -1
- data/vendor/libgit2/src/diff_tform.c +4 -4
- data/vendor/libgit2/src/errors.c +22 -12
- data/vendor/libgit2/src/features.h.in +2 -9
- data/vendor/libgit2/src/fetch.c +2 -7
- data/vendor/libgit2/src/fetchhead.c +1 -1
- data/vendor/libgit2/src/filebuf.c +10 -6
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/{futils.c → fileops.c} +17 -21
- data/vendor/libgit2/src/{futils.h → fileops.h} +5 -5
- data/vendor/libgit2/src/filter.c +8 -16
- data/vendor/libgit2/src/fnmatch.c +248 -0
- data/vendor/libgit2/src/fnmatch.h +48 -0
- data/vendor/libgit2/src/global.c +40 -12
- data/vendor/libgit2/src/global.h +2 -0
- data/vendor/libgit2/src/hash.c +0 -61
- data/vendor/libgit2/src/hash.h +21 -19
- data/vendor/libgit2/src/hash/{sha1/collisiondetect.c → hash_collisiondetect.h} +17 -14
- data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +19 -15
- data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
- data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +14 -4
- data/vendor/libgit2/src/hash/{sha1/mbedtls.c → hash_mbedtls.c} +7 -15
- data/vendor/libgit2/src/hash/{sha1/mbedtls.h → hash_mbedtls.h} +11 -6
- data/vendor/libgit2/src/hash/{sha1/openssl.c → hash_openssl.h} +18 -14
- data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +24 -34
- 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 +1 -1
- data/vendor/libgit2/src/idxmap.c +65 -91
- data/vendor/libgit2/src/idxmap.h +15 -151
- data/vendor/libgit2/src/ignore.c +38 -32
- data/vendor/libgit2/src/index.c +43 -66
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +70 -69
- data/vendor/libgit2/src/integer.h +4 -39
- data/vendor/libgit2/src/iterator.c +22 -27
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +44 -58
- data/vendor/libgit2/src/merge_driver.c +4 -4
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +23 -18
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/netops.c +165 -55
- data/vendor/libgit2/src/netops.h +25 -3
- data/vendor/libgit2/src/notes.c +2 -2
- data/vendor/libgit2/src/object.c +2 -2
- data/vendor/libgit2/src/object.h +0 -2
- data/vendor/libgit2/src/odb.c +23 -41
- data/vendor/libgit2/src/odb.h +2 -3
- data/vendor/libgit2/src/odb_loose.c +10 -17
- data/vendor/libgit2/src/odb_mempack.c +23 -10
- data/vendor/libgit2/src/odb_pack.c +4 -4
- data/vendor/libgit2/src/offmap.c +55 -43
- data/vendor/libgit2/src/offmap.h +24 -102
- data/vendor/libgit2/src/oid.c +1 -6
- data/vendor/libgit2/src/oidmap.c +57 -39
- data/vendor/libgit2/src/oidmap.h +19 -99
- data/vendor/libgit2/src/pack-objects.c +32 -25
- data/vendor/libgit2/src/pack-objects.h +1 -1
- data/vendor/libgit2/src/pack.c +47 -45
- data/vendor/libgit2/src/pack.h +14 -12
- data/vendor/libgit2/src/parse.c +0 -10
- data/vendor/libgit2/src/parse.h +3 -3
- data/vendor/libgit2/src/patch.c +1 -1
- data/vendor/libgit2/src/patch_generate.c +2 -2
- data/vendor/libgit2/src/patch_parse.c +31 -124
- data/vendor/libgit2/src/path.c +6 -43
- data/vendor/libgit2/src/path.h +0 -2
- data/vendor/libgit2/src/pathspec.c +13 -13
- data/vendor/libgit2/src/pool.c +22 -26
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +7 -7
- data/vendor/libgit2/src/posix.h +1 -12
- data/vendor/libgit2/src/proxy.c +2 -7
- data/vendor/libgit2/src/push.c +5 -10
- data/vendor/libgit2/src/reader.c +2 -2
- data/vendor/libgit2/src/rebase.c +7 -66
- data/vendor/libgit2/src/refdb.c +0 -12
- data/vendor/libgit2/src/refdb_fs.c +165 -214
- data/vendor/libgit2/src/reflog.c +13 -11
- data/vendor/libgit2/src/refs.c +18 -24
- data/vendor/libgit2/src/refspec.c +16 -9
- data/vendor/libgit2/src/remote.c +52 -50
- data/vendor/libgit2/src/remote.h +2 -2
- data/vendor/libgit2/src/repository.c +100 -115
- data/vendor/libgit2/src/repository.h +40 -49
- data/vendor/libgit2/src/revert.c +3 -8
- data/vendor/libgit2/src/revparse.c +19 -18
- data/vendor/libgit2/src/revwalk.c +30 -63
- data/vendor/libgit2/src/revwalk.h +0 -20
- data/vendor/libgit2/src/settings.c +0 -5
- data/vendor/libgit2/src/sortedcache.c +26 -12
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +65 -45
- data/vendor/libgit2/src/status.c +9 -15
- data/vendor/libgit2/src/{allocators/stdalloc.c → stdalloc.c} +4 -3
- data/vendor/libgit2/src/{allocators/stdalloc.h → stdalloc.h} +4 -4
- data/vendor/libgit2/src/streams/openssl.c +0 -20
- data/vendor/libgit2/src/streams/socket.c +2 -2
- data/vendor/libgit2/src/strmap.c +84 -37
- data/vendor/libgit2/src/strmap.h +33 -105
- data/vendor/libgit2/src/submodule.c +70 -102
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +1 -11
- data/vendor/libgit2/src/tag.c +2 -10
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/trace.h +2 -2
- data/vendor/libgit2/src/trailer.c +32 -46
- data/vendor/libgit2/src/transaction.c +9 -10
- data/vendor/libgit2/src/transports/auth.c +9 -10
- data/vendor/libgit2/src/transports/auth.h +4 -11
- data/vendor/libgit2/src/transports/auth_negotiate.c +9 -23
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/cred.c +6 -6
- data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
- data/vendor/libgit2/src/transports/git.c +16 -11
- data/vendor/libgit2/src/transports/http.c +276 -419
- data/vendor/libgit2/src/transports/http.h +1 -1
- data/vendor/libgit2/src/transports/local.c +9 -9
- data/vendor/libgit2/src/transports/smart.c +17 -17
- data/vendor/libgit2/src/transports/smart.h +2 -2
- data/vendor/libgit2/src/transports/smart_protocol.c +60 -36
- data/vendor/libgit2/src/transports/ssh.c +36 -46
- data/vendor/libgit2/src/transports/winhttp.c +207 -231
- data/vendor/libgit2/src/tree-cache.c +7 -14
- data/vendor/libgit2/src/tree.c +24 -10
- data/vendor/libgit2/src/unix/map.c +1 -1
- data/vendor/libgit2/src/unix/posix.h +11 -1
- data/vendor/libgit2/src/userdiff.h +1 -3
- data/vendor/libgit2/src/util.c +53 -51
- data/vendor/libgit2/src/util.h +21 -16
- data/vendor/libgit2/src/win32/map.c +5 -3
- data/vendor/libgit2/src/win32/path_w32.c +2 -12
- data/vendor/libgit2/src/win32/path_w32.h +29 -0
- data/vendor/libgit2/src/win32/posix.h +4 -1
- data/vendor/libgit2/src/win32/posix_w32.c +5 -40
- 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 +3 -7
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +93 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +2 -0
- data/vendor/libgit2/src/win32/w32_stack.c +9 -4
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +0 -31
- data/vendor/libgit2/src/win32/w32_util.h +32 -6
- data/vendor/libgit2/src/worktree.c +22 -36
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +0 -12
- data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
- metadata +34 -98
- 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/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/include/git2/cert.h +0 -135
- data/vendor/libgit2/include/git2/cred.h +0 -308
- data/vendor/libgit2/include/git2/sys/cred.h +0 -90
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- 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.h +0 -19
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
- data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
- data/vendor/libgit2/src/net.c +0 -184
- data/vendor/libgit2/src/net.h +0 -36
- data/vendor/libgit2/src/regexp.c +0 -221
- data/vendor/libgit2/src/regexp.h +0 -97
- 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
@@ -8,10 +8,10 @@
|
|
8
8
|
#define INCLUDE_integer_h__
|
9
9
|
|
10
10
|
/** @return true if p fits into the range of a size_t */
|
11
|
-
GIT_INLINE(int) git__is_sizet(
|
11
|
+
GIT_INLINE(int) git__is_sizet(git_off_t p)
|
12
12
|
{
|
13
13
|
size_t r = (size_t)p;
|
14
|
-
return p == (
|
14
|
+
return p == (git_off_t)r;
|
15
15
|
}
|
16
16
|
|
17
17
|
/** @return true if p fits into the range of an ssize_t */
|
@@ -21,13 +21,6 @@ GIT_INLINE(int) git__is_ssizet(size_t p)
|
|
21
21
|
return p == (size_t)r;
|
22
22
|
}
|
23
23
|
|
24
|
-
/** @return true if p fits into the range of a uint16_t */
|
25
|
-
GIT_INLINE(int) git__is_uint16(size_t p)
|
26
|
-
{
|
27
|
-
uint16_t r = (uint16_t)p;
|
28
|
-
return p == (size_t)r;
|
29
|
-
}
|
30
|
-
|
31
24
|
/** @return true if p fits into the range of a uint32_t */
|
32
25
|
GIT_INLINE(int) git__is_uint32(size_t p)
|
33
26
|
{
|
@@ -36,10 +29,10 @@ GIT_INLINE(int) git__is_uint32(size_t p)
|
|
36
29
|
}
|
37
30
|
|
38
31
|
/** @return true if p fits into the range of an unsigned long */
|
39
|
-
GIT_INLINE(int) git__is_ulong(
|
32
|
+
GIT_INLINE(int) git__is_ulong(git_off_t p)
|
40
33
|
{
|
41
34
|
unsigned long r = (unsigned long)p;
|
42
|
-
return p == (
|
35
|
+
return p == (git_off_t)r;
|
43
36
|
}
|
44
37
|
|
45
38
|
/** @return true if p fits into the range of an int */
|
@@ -72,25 +65,15 @@ GIT_INLINE(int) git__is_int(long long p)
|
|
72
65
|
# error compiler has add with overflow intrinsics but SIZE_MAX is unknown
|
73
66
|
# endif
|
74
67
|
|
75
|
-
# define git__add_int_overflow(out, one, two) \
|
76
|
-
__builtin_sadd_overflow(one, two, out)
|
77
|
-
# define git__sub_int_overflow(out, one, two) \
|
78
|
-
__builtin_ssub_overflow(one, two, out)
|
79
|
-
|
80
68
|
/* Use Microsoft's safe integer handling functions where available */
|
81
69
|
#elif defined(_MSC_VER)
|
82
70
|
|
83
|
-
# define ENABLE_INTSAFE_SIGNED_FUNCTIONS
|
84
71
|
# include <intsafe.h>
|
85
72
|
|
86
73
|
# define git__add_sizet_overflow(out, one, two) \
|
87
74
|
(SizeTAdd(one, two, out) != S_OK)
|
88
75
|
# define git__multiply_sizet_overflow(out, one, two) \
|
89
76
|
(SizeTMult(one, two, out) != S_OK)
|
90
|
-
#define git__add_int_overflow(out, one, two) \
|
91
|
-
(IntAdd(one, two, out) != S_OK)
|
92
|
-
#define git__sub_int_overflow(out, one, two) \
|
93
|
-
(IntSub(one, two, out) != S_OK)
|
94
77
|
|
95
78
|
#else
|
96
79
|
|
@@ -118,24 +101,6 @@ GIT_INLINE(bool) git__multiply_sizet_overflow(size_t *out, size_t one, size_t tw
|
|
118
101
|
return false;
|
119
102
|
}
|
120
103
|
|
121
|
-
GIT_INLINE(bool) git__add_int_overflow(int *out, int one, int two)
|
122
|
-
{
|
123
|
-
if ((two > 0 && one > (INT_MAX - two)) ||
|
124
|
-
(two < 0 && one < (INT_MIN - two)))
|
125
|
-
return true;
|
126
|
-
*out = one + two;
|
127
|
-
return false;
|
128
|
-
}
|
129
|
-
|
130
|
-
GIT_INLINE(bool) git__sub_int_overflow(int *out, int one, int two)
|
131
|
-
{
|
132
|
-
if ((two > 0 && one < (INT_MIN + two)) ||
|
133
|
-
(two < 0 && one > (INT_MAX + two)))
|
134
|
-
return true;
|
135
|
-
*out = one - two;
|
136
|
-
return false;
|
137
|
-
}
|
138
|
-
|
139
104
|
#endif
|
140
105
|
|
141
106
|
#endif
|
@@ -145,7 +145,7 @@ static int iterator_init_common(
|
|
145
145
|
(iter->flags & GIT_ITERATOR_PRECOMPOSE_UNICODE) == 0 &&
|
146
146
|
(iter->flags & GIT_ITERATOR_DONT_PRECOMPOSE_UNICODE) == 0) {
|
147
147
|
|
148
|
-
if (
|
148
|
+
if (git_repository__cvar(&precompose, repo, GIT_CVAR_PRECOMPOSE) < 0)
|
149
149
|
git_error_clear();
|
150
150
|
else if (precompose)
|
151
151
|
iter->flags |= GIT_ITERATOR_PRECOMPOSE_UNICODE;
|
@@ -543,6 +543,8 @@ static int tree_iterator_frame_init(
|
|
543
543
|
new_frame = git_array_alloc(iter->frames);
|
544
544
|
GIT_ERROR_CHECK_ALLOC(new_frame);
|
545
545
|
|
546
|
+
memset(new_frame, 0, sizeof(tree_iterator_frame));
|
547
|
+
|
546
548
|
if ((error = git_tree_dup(&dup, tree)) < 0)
|
547
549
|
goto done;
|
548
550
|
|
@@ -550,22 +552,19 @@ static int tree_iterator_frame_init(
|
|
550
552
|
new_frame->tree = dup;
|
551
553
|
|
552
554
|
if (frame_entry &&
|
553
|
-
|
555
|
+
(error = tree_iterator_compute_path(&new_frame->path, frame_entry)) < 0)
|
554
556
|
goto done;
|
555
557
|
|
556
558
|
cmp = iterator__ignore_case(&iter->base) ?
|
557
559
|
tree_iterator_entry_sort_icase : NULL;
|
558
560
|
|
559
|
-
if ((error = git_vector_init(
|
560
|
-
|
561
|
+
if ((error = git_vector_init(
|
562
|
+
&new_frame->entries, dup->entries.size, cmp)) < 0)
|
561
563
|
goto done;
|
562
564
|
|
563
565
|
git_array_foreach(dup->entries, i, tree_entry) {
|
564
|
-
|
565
|
-
|
566
|
-
error = -1;
|
567
|
-
goto done;
|
568
|
-
}
|
566
|
+
new_entry = git_pool_malloc(&iter->entry_pool, 1);
|
567
|
+
GIT_ERROR_CHECK_ALLOC(new_entry);
|
569
568
|
|
570
569
|
new_entry->tree_entry = tree_entry;
|
571
570
|
new_entry->parent_path = new_frame->path.ptr;
|
@@ -1522,7 +1521,7 @@ static void filesystem_iterator_set_current(
|
|
1522
1521
|
static int filesystem_iterator_current(
|
1523
1522
|
const git_index_entry **out, git_iterator *i)
|
1524
1523
|
{
|
1525
|
-
filesystem_iterator *iter =
|
1524
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1526
1525
|
|
1527
1526
|
if (!iterator__has_been_accessed(i))
|
1528
1527
|
return iter->base.cb->advance(out, i);
|
@@ -1569,7 +1568,7 @@ done:
|
|
1569
1568
|
static int filesystem_iterator_advance(
|
1570
1569
|
const git_index_entry **out, git_iterator *i)
|
1571
1570
|
{
|
1572
|
-
filesystem_iterator *iter =
|
1571
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1573
1572
|
bool is_dir;
|
1574
1573
|
int error = 0;
|
1575
1574
|
|
@@ -1628,7 +1627,7 @@ static int filesystem_iterator_advance(
|
|
1628
1627
|
static int filesystem_iterator_advance_into(
|
1629
1628
|
const git_index_entry **out, git_iterator *i)
|
1630
1629
|
{
|
1631
|
-
filesystem_iterator *iter =
|
1630
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1632
1631
|
filesystem_iterator_frame *frame;
|
1633
1632
|
filesystem_iterator_entry *prev_entry;
|
1634
1633
|
int error;
|
@@ -1665,7 +1664,7 @@ static int filesystem_iterator_advance_into(
|
|
1665
1664
|
|
1666
1665
|
int git_iterator_current_workdir_path(git_buf **out, git_iterator *i)
|
1667
1666
|
{
|
1668
|
-
filesystem_iterator *iter =
|
1667
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1669
1668
|
const git_index_entry *entry;
|
1670
1669
|
|
1671
1670
|
if (i->type != GIT_ITERATOR_TYPE_FS &&
|
@@ -1725,19 +1724,15 @@ GIT_INLINE(bool) filesystem_iterator_current_is_ignored(
|
|
1725
1724
|
|
1726
1725
|
bool git_iterator_current_is_ignored(git_iterator *i)
|
1727
1726
|
{
|
1728
|
-
filesystem_iterator *iter = NULL;
|
1729
|
-
|
1730
1727
|
if (i->type != GIT_ITERATOR_TYPE_WORKDIR)
|
1731
1728
|
return false;
|
1732
1729
|
|
1733
|
-
|
1734
|
-
|
1735
|
-
return filesystem_iterator_current_is_ignored(iter);
|
1730
|
+
return filesystem_iterator_current_is_ignored((filesystem_iterator *)i);
|
1736
1731
|
}
|
1737
1732
|
|
1738
1733
|
bool git_iterator_current_tree_is_ignored(git_iterator *i)
|
1739
1734
|
{
|
1740
|
-
filesystem_iterator *iter =
|
1735
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1741
1736
|
filesystem_iterator_frame *frame;
|
1742
1737
|
|
1743
1738
|
if (i->type != GIT_ITERATOR_TYPE_WORKDIR)
|
@@ -1752,7 +1747,7 @@ static int filesystem_iterator_advance_over(
|
|
1752
1747
|
git_iterator_status_t *status,
|
1753
1748
|
git_iterator *i)
|
1754
1749
|
{
|
1755
|
-
filesystem_iterator *iter =
|
1750
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1756
1751
|
filesystem_iterator_frame *current_frame;
|
1757
1752
|
filesystem_iterator_entry *current_entry;
|
1758
1753
|
const git_index_entry *entry = NULL;
|
@@ -1871,7 +1866,7 @@ static int filesystem_iterator_init(filesystem_iterator *iter)
|
|
1871
1866
|
|
1872
1867
|
static int filesystem_iterator_reset(git_iterator *i)
|
1873
1868
|
{
|
1874
|
-
filesystem_iterator *iter =
|
1869
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1875
1870
|
|
1876
1871
|
filesystem_iterator_clear(iter);
|
1877
1872
|
return filesystem_iterator_init(iter);
|
@@ -1879,7 +1874,7 @@ static int filesystem_iterator_reset(git_iterator *i)
|
|
1879
1874
|
|
1880
1875
|
static void filesystem_iterator_free(git_iterator *i)
|
1881
1876
|
{
|
1882
|
-
filesystem_iterator *iter =
|
1877
|
+
filesystem_iterator *iter = (filesystem_iterator *)i;
|
1883
1878
|
git__free(iter->root);
|
1884
1879
|
git_buf_dispose(&iter->current_path);
|
1885
1880
|
git_tree_free(iter->tree);
|
@@ -2088,7 +2083,7 @@ static int index_iterator_skip_pseudotree(index_iterator *iter)
|
|
2088
2083
|
static int index_iterator_advance(
|
2089
2084
|
const git_index_entry **out, git_iterator *i)
|
2090
2085
|
{
|
2091
|
-
index_iterator *iter =
|
2086
|
+
index_iterator *iter = (index_iterator *)i;
|
2092
2087
|
const git_index_entry *entry = NULL;
|
2093
2088
|
bool is_submodule;
|
2094
2089
|
int error = 0;
|
@@ -2161,7 +2156,7 @@ static int index_iterator_advance(
|
|
2161
2156
|
static int index_iterator_advance_into(
|
2162
2157
|
const git_index_entry **out, git_iterator *i)
|
2163
2158
|
{
|
2164
|
-
index_iterator *iter =
|
2159
|
+
index_iterator *iter = (index_iterator *)i;
|
2165
2160
|
|
2166
2161
|
if (! S_ISDIR(iter->tree_entry.mode)) {
|
2167
2162
|
if (out)
|
@@ -2179,7 +2174,7 @@ static int index_iterator_advance_over(
|
|
2179
2174
|
git_iterator_status_t *status,
|
2180
2175
|
git_iterator *i)
|
2181
2176
|
{
|
2182
|
-
index_iterator *iter =
|
2177
|
+
index_iterator *iter = (index_iterator *)i;
|
2183
2178
|
const git_index_entry *entry;
|
2184
2179
|
int error;
|
2185
2180
|
|
@@ -2208,7 +2203,7 @@ static int index_iterator_init(index_iterator *iter)
|
|
2208
2203
|
|
2209
2204
|
static int index_iterator_reset(git_iterator *i)
|
2210
2205
|
{
|
2211
|
-
index_iterator *iter =
|
2206
|
+
index_iterator *iter = (index_iterator *)i;
|
2212
2207
|
|
2213
2208
|
index_iterator_clear(iter);
|
2214
2209
|
return index_iterator_init(iter);
|
@@ -2216,7 +2211,7 @@ static int index_iterator_reset(git_iterator *i)
|
|
2216
2211
|
|
2217
2212
|
static void index_iterator_free(git_iterator *i)
|
2218
2213
|
{
|
2219
|
-
index_iterator *iter =
|
2214
|
+
index_iterator *iter = (index_iterator *)i;
|
2220
2215
|
|
2221
2216
|
git_index_snapshot_release(&iter->entries, iter->base.index);
|
2222
2217
|
git_buf_dispose(&iter->tree_buf);
|
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
@@ -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(
|
@@ -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
|
}
|
@@ -876,7 +867,7 @@ static int merge_conflict_invoke_driver(
|
|
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
|
GIT_ERROR_CHECK_ALLOC(result->path);
|
@@ -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;
|
@@ -1113,12 +1104,14 @@ 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
|
+
size_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
|
GIT_ERROR_CHECK_ALLOC(queue);
|
1124
1117
|
|
@@ -1126,9 +1119,11 @@ static int deletes_by_oid_enqueue(git_oidmap *map, git_pool* pool, const git_oid
|
|
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
|
GIT_ERROR_CHECK_ALLOC(array_entry);
|
1134
1129
|
*array_entry = idx;
|
@@ -1137,14 +1132,18 @@ static int deletes_by_oid_enqueue(git_oidmap *map, git_pool* pool, const git_oid
|
|
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
|
+
size_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
|
}
|
@@ -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++) {
|
@@ -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)
|
@@ -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
|
|
@@ -3121,6 +3120,9 @@ static int merge_heads(
|
|
3121
3120
|
*ancestor_head_out = NULL;
|
3122
3121
|
*our_head_out = NULL;
|
3123
3122
|
|
3123
|
+
if ((error = git_repository__ensure_not_bare(repo, "merge")) < 0)
|
3124
|
+
goto done;
|
3125
|
+
|
3124
3126
|
if ((error = git_annotated_commit_from_ref(&our_head, repo, our_ref)) < 0)
|
3125
3127
|
goto done;
|
3126
3128
|
|
@@ -3331,40 +3333,24 @@ done:
|
|
3331
3333
|
return error;
|
3332
3334
|
}
|
3333
3335
|
|
3334
|
-
int
|
3336
|
+
int git_merge_init_options(git_merge_options *opts, unsigned int version)
|
3335
3337
|
{
|
3336
3338
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3337
3339
|
opts, version, git_merge_options, GIT_MERGE_OPTIONS_INIT);
|
3338
3340
|
return 0;
|
3339
3341
|
}
|
3340
3342
|
|
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)
|
3343
|
+
int git_merge_file_init_input(git_merge_file_input *input, unsigned int version)
|
3347
3344
|
{
|
3348
3345
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3349
3346
|
input, version, git_merge_file_input, GIT_MERGE_FILE_INPUT_INIT);
|
3350
3347
|
return 0;
|
3351
3348
|
}
|
3352
3349
|
|
3353
|
-
int
|
3354
|
-
{
|
3355
|
-
return git_merge_file_input_init(input, version);
|
3356
|
-
}
|
3357
|
-
|
3358
|
-
int git_merge_file_options_init(
|
3350
|
+
int git_merge_file_init_options(
|
3359
3351
|
git_merge_file_options *opts, unsigned int version)
|
3360
3352
|
{
|
3361
3353
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
3362
3354
|
opts, version, git_merge_file_options, GIT_MERGE_FILE_OPTIONS_INIT);
|
3363
3355
|
return 0;
|
3364
3356
|
}
|
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
|
-
}
|