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
data/vendor/libgit2/src/posix.h
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
|
12
12
|
#include <fcntl.h>
|
13
13
|
#include <time.h>
|
14
|
+
#include "fnmatch.h"
|
14
15
|
|
15
16
|
/* stat: file mode type testing macros */
|
16
17
|
#ifndef S_IFGITLINK
|
@@ -89,18 +90,6 @@
|
|
89
90
|
#define EAFNOSUPPORT (INT_MAX-1)
|
90
91
|
#endif
|
91
92
|
|
92
|
-
/* Provide a 64-bit size for offsets. */
|
93
|
-
|
94
|
-
#if defined(_MSC_VER)
|
95
|
-
typedef __int64 off64_t;
|
96
|
-
#elif defined(__HAIKU__)
|
97
|
-
typedef __haiku_std_int64 off64_t;
|
98
|
-
#elif defined(__APPLE__)
|
99
|
-
typedef __int64_t off64_t;
|
100
|
-
#else
|
101
|
-
typedef int64_t off64_t;
|
102
|
-
#endif
|
103
|
-
|
104
93
|
typedef int git_file;
|
105
94
|
|
106
95
|
/**
|
data/vendor/libgit2/src/proxy.c
CHANGED
@@ -9,29 +9,24 @@
|
|
9
9
|
|
10
10
|
#include "git2/proxy.h"
|
11
11
|
|
12
|
-
int
|
12
|
+
int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
|
13
13
|
{
|
14
14
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
15
15
|
opts, version, git_proxy_options, GIT_PROXY_OPTIONS_INIT);
|
16
16
|
return 0;
|
17
17
|
}
|
18
18
|
|
19
|
-
int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
|
20
|
-
{
|
21
|
-
return git_proxy_options_init(opts, version);
|
22
|
-
}
|
23
|
-
|
24
19
|
int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
|
25
20
|
{
|
26
21
|
if (!src) {
|
27
|
-
|
22
|
+
git_proxy_init_options(tgt, GIT_PROXY_OPTIONS_VERSION);
|
28
23
|
return 0;
|
29
24
|
}
|
30
25
|
|
31
26
|
memcpy(tgt, src, sizeof(git_proxy_options));
|
32
27
|
if (src->url) {
|
33
28
|
tgt->url = git__strdup(src->url);
|
34
|
-
|
29
|
+
GITERR_CHECK_ALLOC(tgt->url);
|
35
30
|
}
|
36
31
|
|
37
32
|
return 0;
|
data/vendor/libgit2/src/push.c
CHANGED
@@ -36,7 +36,7 @@ int git_push_new(git_push **out, git_remote *remote)
|
|
36
36
|
*out = NULL;
|
37
37
|
|
38
38
|
p = git__calloc(1, sizeof(*p));
|
39
|
-
|
39
|
+
GITERR_CHECK_ALLOC(p);
|
40
40
|
|
41
41
|
p->repo = remote->repo;
|
42
42
|
p->remote = remote;
|
@@ -70,11 +70,10 @@ int git_push_set_options(git_push *push, const git_push_options *opts)
|
|
70
70
|
if (!push || !opts)
|
71
71
|
return -1;
|
72
72
|
|
73
|
-
|
73
|
+
GITERR_CHECK_VERSION(opts, GIT_PUSH_OPTIONS_VERSION, "git_push_options");
|
74
74
|
|
75
75
|
push->pb_parallelism = opts->pb_parallelism;
|
76
|
-
push->
|
77
|
-
push->connection.proxy = &opts->proxy_opts;
|
76
|
+
push->custom_headers = &opts->custom_headers;
|
78
77
|
|
79
78
|
return 0;
|
80
79
|
}
|
@@ -84,14 +83,14 @@ static void free_refspec(push_spec *spec)
|
|
84
83
|
if (spec == NULL)
|
85
84
|
return;
|
86
85
|
|
87
|
-
|
86
|
+
git_refspec__free(&spec->refspec);
|
88
87
|
git__free(spec);
|
89
88
|
}
|
90
89
|
|
91
90
|
static int check_rref(char *ref)
|
92
91
|
{
|
93
92
|
if (git__prefixcmp(ref, "refs/")) {
|
94
|
-
|
93
|
+
giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref);
|
95
94
|
return -1;
|
96
95
|
}
|
97
96
|
|
@@ -109,10 +108,10 @@ static int check_lref(git_push *push, char *ref)
|
|
109
108
|
return 0;
|
110
109
|
|
111
110
|
if (error == GIT_ENOTFOUND)
|
112
|
-
|
111
|
+
giterr_set(GITERR_REFERENCE,
|
113
112
|
"src refspec '%s' does not match any existing object", ref);
|
114
113
|
else
|
115
|
-
|
114
|
+
giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref);
|
116
115
|
return -1;
|
117
116
|
}
|
118
117
|
|
@@ -123,10 +122,10 @@ static int parse_refspec(git_push *push, push_spec **spec, const char *str)
|
|
123
122
|
*spec = NULL;
|
124
123
|
|
125
124
|
s = git__calloc(1, sizeof(*s));
|
126
|
-
|
125
|
+
GITERR_CHECK_ALLOC(s);
|
127
126
|
|
128
127
|
if (git_refspec__parse(&s->refspec, str, false) < 0) {
|
129
|
-
|
128
|
+
giterr_set(GITERR_INVALID, "invalid refspec %s", str);
|
130
129
|
goto on_error;
|
131
130
|
}
|
132
131
|
|
@@ -196,7 +195,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
|
|
196
195
|
continue;
|
197
196
|
|
198
197
|
/* Update the remote ref */
|
199
|
-
if (
|
198
|
+
if (git_oid_iszero(&push_spec->loid)) {
|
200
199
|
error = git_reference_lookup(&remote_ref, push->remote->repo, git_buf_cstr(&remote_ref_name));
|
201
200
|
|
202
201
|
if (error >= 0) {
|
@@ -213,7 +212,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
|
|
213
212
|
if (error != GIT_ENOTFOUND)
|
214
213
|
goto on_error;
|
215
214
|
|
216
|
-
|
215
|
+
giterr_clear();
|
217
216
|
fire_callback = 0;
|
218
217
|
}
|
219
218
|
|
@@ -229,7 +228,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
|
|
229
228
|
error = 0;
|
230
229
|
|
231
230
|
on_error:
|
232
|
-
|
231
|
+
git_buf_free(&remote_ref_name);
|
233
232
|
return error;
|
234
233
|
}
|
235
234
|
|
@@ -242,10 +241,10 @@ static int enqueue_tag(git_object **out, git_push *push, git_oid *id)
|
|
242
241
|
git_object *obj = NULL, *target = NULL;
|
243
242
|
int error;
|
244
243
|
|
245
|
-
if ((error = git_object_lookup(&obj, push->repo, id,
|
244
|
+
if ((error = git_object_lookup(&obj, push->repo, id, GIT_OBJ_TAG)) < 0)
|
246
245
|
return error;
|
247
246
|
|
248
|
-
while (git_object_type(obj) ==
|
247
|
+
while (git_object_type(obj) == GIT_OBJ_TAG) {
|
249
248
|
if ((error = git_packbuilder_insert(push->pb, git_object_id(obj), NULL)) < 0)
|
250
249
|
break;
|
251
250
|
|
@@ -278,10 +277,10 @@ static int queue_objects(git_push *push)
|
|
278
277
|
git_revwalk_sorting(rw, GIT_SORT_TIME);
|
279
278
|
|
280
279
|
git_vector_foreach(&push->specs, i, spec) {
|
281
|
-
|
280
|
+
git_otype type;
|
282
281
|
size_t size;
|
283
282
|
|
284
|
-
if (
|
283
|
+
if (git_oid_iszero(&spec->loid))
|
285
284
|
/*
|
286
285
|
* Delete reference on remote side;
|
287
286
|
* nothing to do here.
|
@@ -294,13 +293,13 @@ static int queue_objects(git_push *push)
|
|
294
293
|
if (git_odb_read_header(&size, &type, push->repo->_odb, &spec->loid) < 0)
|
295
294
|
goto on_error;
|
296
295
|
|
297
|
-
if (type ==
|
296
|
+
if (type == GIT_OBJ_TAG) {
|
298
297
|
git_object *target;
|
299
298
|
|
300
299
|
if ((error = enqueue_tag(&target, push, &spec->loid)) < 0)
|
301
300
|
goto on_error;
|
302
301
|
|
303
|
-
if (git_object_type(target) ==
|
302
|
+
if (git_object_type(target) == GIT_OBJ_COMMIT) {
|
304
303
|
if (git_revwalk_push(rw, git_object_id(target)) < 0) {
|
305
304
|
git_object_free(target);
|
306
305
|
goto on_error;
|
@@ -319,11 +318,11 @@ static int queue_objects(git_push *push)
|
|
319
318
|
if (!spec->refspec.force) {
|
320
319
|
git_oid base;
|
321
320
|
|
322
|
-
if (
|
321
|
+
if (git_oid_iszero(&spec->roid))
|
323
322
|
continue;
|
324
323
|
|
325
324
|
if (!git_odb_exists(push->repo->_odb, &spec->roid)) {
|
326
|
-
|
325
|
+
giterr_set(GITERR_REFERENCE,
|
327
326
|
"cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.");
|
328
327
|
error = GIT_ENONFASTFORWARD;
|
329
328
|
goto on_error;
|
@@ -334,7 +333,7 @@ static int queue_objects(git_push *push)
|
|
334
333
|
|
335
334
|
if (error == GIT_ENOTFOUND ||
|
336
335
|
(!error && !git_oid_equal(&base, &spec->roid))) {
|
337
|
-
|
336
|
+
giterr_set(GITERR_REFERENCE,
|
338
337
|
"cannot push non-fastforwardable reference");
|
339
338
|
error = GIT_ENONFASTFORWARD;
|
340
339
|
goto on_error;
|
@@ -346,7 +345,7 @@ static int queue_objects(git_push *push)
|
|
346
345
|
}
|
347
346
|
|
348
347
|
git_vector_foreach(&push->remote->refs, i, head) {
|
349
|
-
if (
|
348
|
+
if (git_oid_iszero(&head->oid))
|
350
349
|
continue;
|
351
350
|
|
352
351
|
/* TODO */
|
@@ -363,13 +362,13 @@ on_error:
|
|
363
362
|
static int add_update(git_push *push, push_spec *spec)
|
364
363
|
{
|
365
364
|
git_push_update *u = git__calloc(1, sizeof(git_push_update));
|
366
|
-
|
365
|
+
GITERR_CHECK_ALLOC(u);
|
367
366
|
|
368
367
|
u->src_refname = git__strdup(spec->refspec.src);
|
369
|
-
|
368
|
+
GITERR_CHECK_ALLOC(u->src_refname);
|
370
369
|
|
371
370
|
u->dst_refname = git__strdup(spec->refspec.dst);
|
372
|
-
|
371
|
+
GITERR_CHECK_ALLOC(u->dst_refname);
|
373
372
|
|
374
373
|
git_oid_cpy(&u->src, &spec->roid);
|
375
374
|
git_oid_cpy(&u->dst, &spec->loid);
|
@@ -390,7 +389,7 @@ static int calculate_work(git_push *push)
|
|
390
389
|
/* This is a create or update. Local ref must exist. */
|
391
390
|
if (git_reference_name_to_id(
|
392
391
|
&spec->loid, push->repo, spec->refspec.src) < 0) {
|
393
|
-
|
392
|
+
giterr_set(GITERR_REFERENCE, "no such reference '%s'", spec->refspec.src);
|
394
393
|
return -1;
|
395
394
|
}
|
396
395
|
}
|
@@ -416,7 +415,7 @@ static int do_push(git_push *push, const git_remote_callbacks *callbacks)
|
|
416
415
|
git_transport *transport = push->remote->transport;
|
417
416
|
|
418
417
|
if (!transport->push) {
|
419
|
-
|
418
|
+
giterr_set(GITERR_NET, "remote transport doesn't support push");
|
420
419
|
error = -1;
|
421
420
|
goto on_error;
|
422
421
|
}
|
@@ -476,7 +475,7 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks)
|
|
476
475
|
int error;
|
477
476
|
|
478
477
|
if (!git_remote_connected(push->remote) &&
|
479
|
-
(error =
|
478
|
+
(error = git_remote_connect(push->remote, GIT_DIRECTION_PUSH, callbacks, NULL, push->custom_headers)) < 0)
|
480
479
|
return error;
|
481
480
|
|
482
481
|
if ((error = filter_refs(push->remote)) < 0 ||
|
@@ -485,7 +484,7 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks)
|
|
485
484
|
|
486
485
|
if (!push->unpack_ok) {
|
487
486
|
error = -1;
|
488
|
-
|
487
|
+
giterr_set(GITERR_NET, "unpacking the sent packfile failed on the remote");
|
489
488
|
}
|
490
489
|
|
491
490
|
return error;
|
@@ -501,7 +500,7 @@ int git_push_status_foreach(git_push *push,
|
|
501
500
|
git_vector_foreach(&push->status, i, status) {
|
502
501
|
int error = cb(status->ref, status->msg, data);
|
503
502
|
if (error)
|
504
|
-
return
|
503
|
+
return giterr_set_after_callback(error);
|
505
504
|
}
|
506
505
|
|
507
506
|
return 0;
|
@@ -547,14 +546,9 @@ void git_push_free(git_push *push)
|
|
547
546
|
git__free(push);
|
548
547
|
}
|
549
548
|
|
550
|
-
int
|
549
|
+
int git_push_init_options(git_push_options *opts, unsigned int version)
|
551
550
|
{
|
552
551
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
553
552
|
opts, version, git_push_options, GIT_PUSH_OPTIONS_INIT);
|
554
553
|
return 0;
|
555
554
|
}
|
556
|
-
|
557
|
-
int git_push_init_options(git_push_options *opts, unsigned int version)
|
558
|
-
{
|
559
|
-
return git_push_options_init(opts, version);
|
560
|
-
}
|
data/vendor/libgit2/src/push.h
CHANGED
@@ -11,7 +11,6 @@
|
|
11
11
|
|
12
12
|
#include "git2.h"
|
13
13
|
#include "refspec.h"
|
14
|
-
#include "remote.h"
|
15
14
|
|
16
15
|
typedef struct push_spec {
|
17
16
|
struct git_refspec refspec;
|
@@ -41,7 +40,7 @@ struct git_push {
|
|
41
40
|
|
42
41
|
/* options */
|
43
42
|
unsigned pb_parallelism;
|
44
|
-
|
43
|
+
const git_strarray *custom_headers;
|
45
44
|
};
|
46
45
|
|
47
46
|
/**
|
data/vendor/libgit2/src/rebase.c
CHANGED
@@ -116,7 +116,7 @@ done:
|
|
116
116
|
if (type != GIT_REBASE_TYPE_NONE && path_out)
|
117
117
|
*path_out = git_buf_detach(&path);
|
118
118
|
|
119
|
-
|
119
|
+
git_buf_free(&path);
|
120
120
|
|
121
121
|
return 0;
|
122
122
|
}
|
@@ -153,7 +153,7 @@ GIT_INLINE(int) rebase_readint(
|
|
153
153
|
return error;
|
154
154
|
|
155
155
|
if (git__strntol32(&num, asc_out->ptr, asc_out->size, &eol, 10) < 0 || num < 0 || *eol) {
|
156
|
-
|
156
|
+
giterr_set(GITERR_REBASE, "the file '%s' contains an invalid numeric value", filename);
|
157
157
|
return -1;
|
158
158
|
}
|
159
159
|
|
@@ -171,7 +171,7 @@ GIT_INLINE(int) rebase_readoid(
|
|
171
171
|
return error;
|
172
172
|
|
173
173
|
if (str_out->size != GIT_OID_HEXSZ || git_oid_fromstr(out, str_out->ptr) < 0) {
|
174
|
-
|
174
|
+
giterr_set(GITERR_REBASE, "the file '%s' contains an invalid object ID", filename);
|
175
175
|
return -1;
|
176
176
|
}
|
177
177
|
|
@@ -231,7 +231,7 @@ static int rebase_open_merge(git_rebase *rebase)
|
|
231
231
|
|
232
232
|
/* Read cmt.* */
|
233
233
|
git_array_init_to_size(rebase->operations, end);
|
234
|
-
|
234
|
+
GITERR_CHECK_ARRAY(rebase->operations);
|
235
235
|
|
236
236
|
for (i = 0; i < end; i++) {
|
237
237
|
git_buf_clear(&cmt);
|
@@ -241,7 +241,7 @@ static int rebase_open_merge(git_rebase *rebase)
|
|
241
241
|
goto done;
|
242
242
|
|
243
243
|
operation = rebase_operation_alloc(rebase, GIT_REBASE_OPERATION_PICK, &id, NULL);
|
244
|
-
|
244
|
+
GITERR_CHECK_ALLOC(operation);
|
245
245
|
}
|
246
246
|
|
247
247
|
/* Read 'onto_name' */
|
@@ -251,9 +251,9 @@ static int rebase_open_merge(git_rebase *rebase)
|
|
251
251
|
rebase->onto_name = git_buf_detach(&buf);
|
252
252
|
|
253
253
|
done:
|
254
|
-
|
255
|
-
|
256
|
-
|
254
|
+
git_buf_free(&cmt);
|
255
|
+
git_buf_free(&state_path);
|
256
|
+
git_buf_free(&buf);
|
257
257
|
|
258
258
|
return error;
|
259
259
|
}
|
@@ -261,20 +261,23 @@ done:
|
|
261
261
|
static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
|
262
262
|
{
|
263
263
|
git_rebase *rebase = git__calloc(1, sizeof(git_rebase));
|
264
|
-
|
264
|
+
GITERR_CHECK_ALLOC(rebase);
|
265
265
|
|
266
266
|
*out = NULL;
|
267
267
|
|
268
268
|
if (rebase_opts)
|
269
269
|
memcpy(&rebase->options, rebase_opts, sizeof(git_rebase_options));
|
270
270
|
else
|
271
|
-
|
271
|
+
git_rebase_init_options(&rebase->options, GIT_REBASE_OPTIONS_VERSION);
|
272
272
|
|
273
273
|
if (rebase_opts && rebase_opts->rewrite_notes_ref) {
|
274
274
|
rebase->options.rewrite_notes_ref = git__strdup(rebase_opts->rewrite_notes_ref);
|
275
|
-
|
275
|
+
GITERR_CHECK_ALLOC(rebase->options.rewrite_notes_ref);
|
276
276
|
}
|
277
277
|
|
278
|
+
if ((rebase->options.checkout_options.checkout_strategy & (GIT_CHECKOUT_SAFE | GIT_CHECKOUT_FORCE)) == 0)
|
279
|
+
rebase->options.checkout_options.checkout_strategy = GIT_CHECKOUT_SAFE;
|
280
|
+
|
278
281
|
*out = rebase;
|
279
282
|
|
280
283
|
return 0;
|
@@ -282,10 +285,10 @@ static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
|
|
282
285
|
|
283
286
|
static int rebase_check_versions(const git_rebase_options *given_opts)
|
284
287
|
{
|
285
|
-
|
288
|
+
GITERR_CHECK_VERSION(given_opts, GIT_REBASE_OPTIONS_VERSION, "git_rebase_options");
|
286
289
|
|
287
290
|
if (given_opts)
|
288
|
-
|
291
|
+
GITERR_CHECK_VERSION(&given_opts->checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, "git_checkout_options");
|
289
292
|
|
290
293
|
return 0;
|
291
294
|
}
|
@@ -298,8 +301,7 @@ int git_rebase_open(
|
|
298
301
|
git_rebase *rebase;
|
299
302
|
git_buf path = GIT_BUF_INIT, orig_head_name = GIT_BUF_INIT,
|
300
303
|
orig_head_id = GIT_BUF_INIT, onto_id = GIT_BUF_INIT;
|
301
|
-
|
302
|
-
int error;
|
304
|
+
int state_path_len, error;
|
303
305
|
|
304
306
|
assert(repo);
|
305
307
|
|
@@ -315,7 +317,7 @@ int git_rebase_open(
|
|
315
317
|
goto done;
|
316
318
|
|
317
319
|
if (rebase->type == GIT_REBASE_TYPE_NONE) {
|
318
|
-
|
320
|
+
giterr_set(GITERR_REBASE, "there is no rebase in progress");
|
319
321
|
error = GIT_ENOTFOUND;
|
320
322
|
goto done;
|
321
323
|
}
|
@@ -371,14 +373,14 @@ int git_rebase_open(
|
|
371
373
|
|
372
374
|
switch (rebase->type) {
|
373
375
|
case GIT_REBASE_TYPE_INTERACTIVE:
|
374
|
-
|
376
|
+
giterr_set(GITERR_REBASE, "interactive rebase is not supported");
|
375
377
|
error = -1;
|
376
378
|
break;
|
377
379
|
case GIT_REBASE_TYPE_MERGE:
|
378
380
|
error = rebase_open_merge(rebase);
|
379
381
|
break;
|
380
382
|
case GIT_REBASE_TYPE_APPLY:
|
381
|
-
|
383
|
+
giterr_set(GITERR_REBASE, "patch application rebase is not supported");
|
382
384
|
error = -1;
|
383
385
|
break;
|
384
386
|
default:
|
@@ -391,10 +393,10 @@ done:
|
|
391
393
|
else
|
392
394
|
git_rebase_free(rebase);
|
393
395
|
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
396
|
+
git_buf_free(&path);
|
397
|
+
git_buf_free(&orig_head_name);
|
398
|
+
git_buf_free(&orig_head_id);
|
399
|
+
git_buf_free(&onto_id);
|
398
400
|
return error;
|
399
401
|
}
|
400
402
|
|
@@ -422,8 +424,8 @@ static int rebase_setupfile(git_rebase *rebase, const char *filename, int flags,
|
|
422
424
|
if ((error = git_buf_joinpath(&path, rebase->state_path, filename)) == 0)
|
423
425
|
error = git_futils_writebuffer(&contents, path.ptr, flags, REBASE_FILE_MODE);
|
424
426
|
|
425
|
-
|
426
|
-
|
427
|
+
git_buf_free(&path);
|
428
|
+
git_buf_free(&contents);
|
427
429
|
|
428
430
|
return error;
|
429
431
|
}
|
@@ -464,7 +466,7 @@ static int rebase_setupfiles_merge(git_rebase *rebase)
|
|
464
466
|
}
|
465
467
|
|
466
468
|
done:
|
467
|
-
|
469
|
+
git_buf_free(&commit_filename);
|
468
470
|
return error;
|
469
471
|
}
|
470
472
|
|
@@ -477,7 +479,7 @@ static int rebase_setupfiles(git_rebase *rebase)
|
|
477
479
|
git_oid_fmt(orig_head, &rebase->orig_head_id);
|
478
480
|
|
479
481
|
if (p_mkdir(rebase->state_path, REBASE_DIR_MODE) < 0) {
|
480
|
-
|
482
|
+
giterr_set(GITERR_OS, "failed to create rebase directory '%s'", rebase->state_path);
|
481
483
|
return -1;
|
482
484
|
}
|
483
485
|
|
@@ -494,18 +496,13 @@ static int rebase_setupfiles(git_rebase *rebase)
|
|
494
496
|
return rebase_setupfiles_merge(rebase);
|
495
497
|
}
|
496
498
|
|
497
|
-
int
|
499
|
+
int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
|
498
500
|
{
|
499
501
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
500
502
|
opts, version, git_rebase_options, GIT_REBASE_OPTIONS_INIT);
|
501
503
|
return 0;
|
502
504
|
}
|
503
505
|
|
504
|
-
int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
|
505
|
-
{
|
506
|
-
return git_rebase_options_init(opts, version);
|
507
|
-
}
|
508
|
-
|
509
506
|
static int rebase_ensure_not_in_progress(git_repository *repo)
|
510
507
|
{
|
511
508
|
int error;
|
@@ -515,7 +512,7 @@ static int rebase_ensure_not_in_progress(git_repository *repo)
|
|
515
512
|
return error;
|
516
513
|
|
517
514
|
if (type != GIT_REBASE_TYPE_NONE) {
|
518
|
-
|
515
|
+
giterr_set(GITERR_REBASE, "there is an existing rebase in progress");
|
519
516
|
return -1;
|
520
517
|
}
|
521
518
|
|
@@ -540,7 +537,7 @@ static int rebase_ensure_not_dirty(
|
|
540
537
|
goto done;
|
541
538
|
|
542
539
|
if (git_diff_num_deltas(diff) > 0) {
|
543
|
-
|
540
|
+
giterr_set(GITERR_REBASE, "uncommitted changes exist in index");
|
544
541
|
error = fail_with;
|
545
542
|
goto done;
|
546
543
|
}
|
@@ -556,7 +553,7 @@ static int rebase_ensure_not_dirty(
|
|
556
553
|
goto done;
|
557
554
|
|
558
555
|
if (git_diff_num_deltas(diff) > 0) {
|
559
|
-
|
556
|
+
giterr_set(GITERR_REBASE, "unstaged changes exist in workdir");
|
560
557
|
error = fail_with;
|
561
558
|
goto done;
|
562
559
|
}
|
@@ -605,7 +602,7 @@ static int rebase_init_operations(
|
|
605
602
|
continue;
|
606
603
|
|
607
604
|
operation = rebase_operation_alloc(rebase, GIT_REBASE_OPERATION_PICK, &id, NULL);
|
608
|
-
|
605
|
+
GITERR_CHECK_ALLOC(operation);
|
609
606
|
}
|
610
607
|
|
611
608
|
error = 0;
|
@@ -634,17 +631,17 @@ static int rebase_init_merge(
|
|
634
631
|
goto done;
|
635
632
|
|
636
633
|
rebase->state_path = git_buf_detach(&state_path);
|
637
|
-
|
634
|
+
GITERR_CHECK_ALLOC(rebase->state_path);
|
638
635
|
|
639
636
|
if (branch->ref_name && strcmp(branch->ref_name, "HEAD")) {
|
640
637
|
rebase->orig_head_name = git__strdup(branch->ref_name);
|
641
|
-
|
638
|
+
GITERR_CHECK_ALLOC(rebase->orig_head_name);
|
642
639
|
} else {
|
643
640
|
rebase->head_detached = 1;
|
644
641
|
}
|
645
642
|
|
646
643
|
rebase->onto_name = git__strdup(rebase_onto_name(onto));
|
647
|
-
|
644
|
+
GITERR_CHECK_ALLOC(rebase->onto_name);
|
648
645
|
|
649
646
|
rebase->quiet = rebase->options.quiet;
|
650
647
|
|
@@ -665,8 +662,8 @@ static int rebase_init_merge(
|
|
665
662
|
done:
|
666
663
|
git_reference_free(head_ref);
|
667
664
|
git_commit_free(onto_commit);
|
668
|
-
|
669
|
-
|
665
|
+
git_buf_free(&reflog);
|
666
|
+
git_buf_free(&state_path);
|
670
667
|
|
671
668
|
return error;
|
672
669
|
}
|
@@ -813,7 +810,7 @@ static int rebase_next_merge(
|
|
813
810
|
goto done;
|
814
811
|
|
815
812
|
if ((parent_count = git_commit_parentcount(current_commit)) > 1) {
|
816
|
-
|
813
|
+
giterr_set(GITERR_REBASE, "cannot rebase a merge commit");
|
817
814
|
error = -1;
|
818
815
|
goto done;
|
819
816
|
} else if (parent_count) {
|
@@ -845,7 +842,7 @@ done:
|
|
845
842
|
git_tree_free(parent_tree);
|
846
843
|
git_commit_free(parent_commit);
|
847
844
|
git_commit_free(current_commit);
|
848
|
-
|
845
|
+
git_buf_free(&path);
|
849
846
|
|
850
847
|
return error;
|
851
848
|
}
|
@@ -870,7 +867,7 @@ static int rebase_next_inmemory(
|
|
870
867
|
goto done;
|
871
868
|
|
872
869
|
if ((parent_count = git_commit_parentcount(current_commit)) > 1) {
|
873
|
-
|
870
|
+
giterr_set(GITERR_REBASE, "cannot rebase a merge commit");
|
874
871
|
error = -1;
|
875
872
|
goto done;
|
876
873
|
} else if (parent_count) {
|
@@ -951,16 +948,12 @@ static int rebase_commit__create(
|
|
951
948
|
git_commit *current_commit = NULL, *commit = NULL;
|
952
949
|
git_tree *parent_tree = NULL, *tree = NULL;
|
953
950
|
git_oid tree_id, commit_id;
|
954
|
-
git_buf commit_content = GIT_BUF_INIT, commit_signature = GIT_BUF_INIT,
|
955
|
-
signature_field = GIT_BUF_INIT;
|
956
|
-
const char *signature_field_string = NULL,
|
957
|
-
*commit_signature_string = NULL;
|
958
951
|
int error;
|
959
952
|
|
960
953
|
operation = git_array_get(rebase->operations, rebase->current);
|
961
954
|
|
962
955
|
if (git_index_has_conflicts(index)) {
|
963
|
-
|
956
|
+
giterr_set(GITERR_REBASE, "conflicts have not been resolved");
|
964
957
|
error = GIT_EUNMERGED;
|
965
958
|
goto done;
|
966
959
|
}
|
@@ -972,7 +965,7 @@ static int rebase_commit__create(
|
|
972
965
|
goto done;
|
973
966
|
|
974
967
|
if (git_oid_equal(&tree_id, git_tree_id(parent_tree))) {
|
975
|
-
|
968
|
+
giterr_set(GITERR_REBASE, "this patch has already been applied");
|
976
969
|
error = GIT_EAPPLIED;
|
977
970
|
goto done;
|
978
971
|
}
|
@@ -985,40 +978,10 @@ static int rebase_commit__create(
|
|
985
978
|
message = git_commit_message(current_commit);
|
986
979
|
}
|
987
980
|
|
988
|
-
if ((error =
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
if (rebase->options.signing_cb) {
|
993
|
-
git_error_clear();
|
994
|
-
error = git_error_set_after_callback_function(rebase->options.signing_cb(
|
995
|
-
&commit_signature, &signature_field, git_buf_cstr(&commit_content),
|
996
|
-
rebase->options.payload), "commit signing_cb failed");
|
997
|
-
if (error == GIT_PASSTHROUGH) {
|
998
|
-
git_buf_dispose(&commit_signature);
|
999
|
-
git_buf_dispose(&signature_field);
|
1000
|
-
git_error_clear();
|
1001
|
-
error = GIT_OK;
|
1002
|
-
} else if (error < 0)
|
1003
|
-
goto done;
|
1004
|
-
}
|
1005
|
-
|
1006
|
-
if (git_buf_is_allocated(&commit_signature)) {
|
1007
|
-
assert(git_buf_contains_nul(&commit_signature));
|
1008
|
-
commit_signature_string = git_buf_cstr(&commit_signature);
|
1009
|
-
}
|
1010
|
-
|
1011
|
-
if (git_buf_is_allocated(&signature_field)) {
|
1012
|
-
assert(git_buf_contains_nul(&signature_field));
|
1013
|
-
signature_field_string = git_buf_cstr(&signature_field);
|
1014
|
-
}
|
1015
|
-
|
1016
|
-
if ((error = git_commit_create_with_signature(&commit_id, rebase->repo,
|
1017
|
-
git_buf_cstr(&commit_content), commit_signature_string,
|
1018
|
-
signature_field_string)))
|
1019
|
-
goto done;
|
1020
|
-
|
1021
|
-
if ((error = git_commit_lookup(&commit, rebase->repo, &commit_id)) < 0)
|
981
|
+
if ((error = git_commit_create(&commit_id, rebase->repo, NULL, author,
|
982
|
+
committer, message_encoding, message, tree, 1,
|
983
|
+
(const git_commit **)&parent_commit)) < 0 ||
|
984
|
+
(error = git_commit_lookup(&commit, rebase->repo, &commit_id)) < 0)
|
1022
985
|
goto done;
|
1023
986
|
|
1024
987
|
*out = commit;
|
@@ -1027,9 +990,6 @@ done:
|
|
1027
990
|
if (error < 0)
|
1028
991
|
git_commit_free(commit);
|
1029
992
|
|
1030
|
-
git_buf_dispose(&commit_signature);
|
1031
|
-
git_buf_dispose(&signature_field);
|
1032
|
-
git_buf_dispose(&commit_content);
|
1033
993
|
git_commit_free(current_commit);
|
1034
994
|
git_tree_free(parent_tree);
|
1035
995
|
git_tree_free(tree);
|
@@ -1057,7 +1017,7 @@ static int rebase_commit_merge(
|
|
1057
1017
|
|
1058
1018
|
if ((error = rebase_ensure_not_dirty(rebase->repo, false, true, GIT_EUNMERGED)) < 0 ||
|
1059
1019
|
(error = git_repository_head(&head, rebase->repo)) < 0 ||
|
1060
|
-
(error = git_reference_peel((git_object **)&head_commit, head,
|
1020
|
+
(error = git_reference_peel((git_object **)&head_commit, head, GIT_OBJ_COMMIT)) < 0 ||
|
1061
1021
|
(error = git_repository_index(&index, rebase->repo)) < 0 ||
|
1062
1022
|
(error = rebase_commit__create(&commit, rebase, index, head_commit,
|
1063
1023
|
author, committer, message_encoding, message)) < 0 ||
|
@@ -1191,7 +1151,7 @@ static int notes_ref_lookup(git_buf *out, git_rebase *rebase)
|
|
1191
1151
|
if (error != GIT_ENOTFOUND)
|
1192
1152
|
goto done;
|
1193
1153
|
|
1194
|
-
|
1154
|
+
giterr_clear();
|
1195
1155
|
do_rewrite = 1;
|
1196
1156
|
}
|
1197
1157
|
|
@@ -1218,7 +1178,7 @@ static int rebase_copy_note(
|
|
1218
1178
|
|
1219
1179
|
if ((error = git_note_read(¬e, rebase->repo, notes_ref, from)) < 0) {
|
1220
1180
|
if (error == GIT_ENOTFOUND) {
|
1221
|
-
|
1181
|
+
giterr_clear();
|
1222
1182
|
error = 0;
|
1223
1183
|
}
|
1224
1184
|
|
@@ -1231,7 +1191,7 @@ static int rebase_copy_note(
|
|
1231
1191
|
(error = git_signature_now(&who, "unknown", "unknown")) < 0)
|
1232
1192
|
goto done;
|
1233
1193
|
|
1234
|
-
|
1194
|
+
giterr_clear();
|
1235
1195
|
}
|
1236
1196
|
|
1237
1197
|
committer = who;
|
@@ -1259,7 +1219,7 @@ static int rebase_copy_notes(
|
|
1259
1219
|
|
1260
1220
|
if ((error = notes_ref_lookup(¬es_ref, rebase)) < 0) {
|
1261
1221
|
if (error == GIT_ENOTFOUND) {
|
1262
|
-
|
1222
|
+
giterr_clear();
|
1263
1223
|
error = 0;
|
1264
1224
|
}
|
1265
1225
|
|
@@ -1302,13 +1262,13 @@ static int rebase_copy_notes(
|
|
1302
1262
|
goto done;
|
1303
1263
|
|
1304
1264
|
on_error:
|
1305
|
-
|
1265
|
+
giterr_set(GITERR_REBASE, "invalid rewritten file at line %d", linenum);
|
1306
1266
|
error = -1;
|
1307
1267
|
|
1308
1268
|
done:
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1269
|
+
git_buf_free(&rewritten);
|
1270
|
+
git_buf_free(&path);
|
1271
|
+
git_buf_free(¬es_ref);
|
1312
1272
|
|
1313
1273
|
return error;
|
1314
1274
|
}
|
@@ -1331,7 +1291,7 @@ static int return_to_orig_head(git_rebase *rebase)
|
|
1331
1291
|
rebase->orig_head_name)) == 0 &&
|
1332
1292
|
(error = git_repository_head(&terminal_ref, rebase->repo)) == 0 &&
|
1333
1293
|
(error = git_reference_peel((git_object **)&terminal_commit,
|
1334
|
-
terminal_ref,
|
1294
|
+
terminal_ref, GIT_OBJ_COMMIT)) == 0 &&
|
1335
1295
|
(error = git_reference_create_matching(&branch_ref,
|
1336
1296
|
rebase->repo, rebase->orig_head_name,
|
1337
1297
|
git_commit_id(terminal_commit), 1,
|
@@ -1340,8 +1300,8 @@ static int return_to_orig_head(git_rebase *rebase)
|
|
1340
1300
|
rebase->repo, GIT_HEAD_FILE, rebase->orig_head_name, 1,
|
1341
1301
|
head_msg.ptr);
|
1342
1302
|
|
1343
|
-
|
1344
|
-
|
1303
|
+
git_buf_free(&head_msg);
|
1304
|
+
git_buf_free(&branch_msg);
|
1345
1305
|
git_commit_free(terminal_commit);
|
1346
1306
|
git_reference_free(head_ref);
|
1347
1307
|
git_reference_free(branch_ref);
|
@@ -1370,22 +1330,6 @@ int git_rebase_finish(
|
|
1370
1330
|
return error;
|
1371
1331
|
}
|
1372
1332
|
|
1373
|
-
const char *git_rebase_orig_head_name(git_rebase *rebase) {
|
1374
|
-
return rebase->orig_head_name;
|
1375
|
-
}
|
1376
|
-
|
1377
|
-
const git_oid *git_rebase_orig_head_id(git_rebase *rebase) {
|
1378
|
-
return &rebase->orig_head_id;
|
1379
|
-
}
|
1380
|
-
|
1381
|
-
const char *git_rebase_onto_name(git_rebase *rebase) {
|
1382
|
-
return rebase->onto_name;
|
1383
|
-
}
|
1384
|
-
|
1385
|
-
const git_oid *git_rebase_onto_id(git_rebase *rebase) {
|
1386
|
-
return &rebase->onto_id;
|
1387
|
-
}
|
1388
|
-
|
1389
1333
|
size_t git_rebase_operation_entrycount(git_rebase *rebase)
|
1390
1334
|
{
|
1391
1335
|
assert(rebase);
|