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
@@ -37,34 +37,34 @@ extern bool git_repository__fsync_gitdir;
|
|
37
37
|
|
38
38
|
/** Cvar cache identifiers */
|
39
39
|
typedef enum {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
}
|
40
|
+
GIT_CVAR_AUTO_CRLF = 0, /* core.autocrlf */
|
41
|
+
GIT_CVAR_EOL, /* core.eol */
|
42
|
+
GIT_CVAR_SYMLINKS, /* core.symlinks */
|
43
|
+
GIT_CVAR_IGNORECASE, /* core.ignorecase */
|
44
|
+
GIT_CVAR_FILEMODE, /* core.filemode */
|
45
|
+
GIT_CVAR_IGNORESTAT, /* core.ignorestat */
|
46
|
+
GIT_CVAR_TRUSTCTIME, /* core.trustctime */
|
47
|
+
GIT_CVAR_ABBREV, /* core.abbrev */
|
48
|
+
GIT_CVAR_PRECOMPOSE, /* core.precomposeunicode */
|
49
|
+
GIT_CVAR_SAFE_CRLF, /* core.safecrlf */
|
50
|
+
GIT_CVAR_LOGALLREFUPDATES, /* core.logallrefupdates */
|
51
|
+
GIT_CVAR_PROTECTHFS, /* core.protectHFS */
|
52
|
+
GIT_CVAR_PROTECTNTFS, /* core.protectNTFS */
|
53
|
+
GIT_CVAR_FSYNCOBJECTFILES, /* core.fsyncObjectFiles */
|
54
|
+
GIT_CVAR_CACHE_MAX
|
55
|
+
} git_cvar_cached;
|
56
56
|
|
57
57
|
/**
|
58
|
-
*
|
58
|
+
* CVAR value enumerations
|
59
59
|
*
|
60
|
-
* These are the values that are actually stored in the
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
60
|
+
* These are the values that are actually stored in the cvar cache, instead
|
61
|
+
* of their string equivalents. These values are internal and symbolic;
|
62
|
+
* make sure that none of them is set to `-1`, since that is the unique
|
63
|
+
* identifier for "not cached"
|
64
64
|
*/
|
65
65
|
typedef enum {
|
66
66
|
/* The value hasn't been loaded from the cache yet */
|
67
|
-
|
67
|
+
GIT_CVAR_NOT_CACHED = -1,
|
68
68
|
|
69
69
|
/* core.safecrlf: false, 'fail', 'warn' */
|
70
70
|
GIT_SAFE_CRLF_FALSE = 0,
|
@@ -89,34 +89,31 @@ typedef enum {
|
|
89
89
|
GIT_EOL_DEFAULT = GIT_EOL_NATIVE,
|
90
90
|
|
91
91
|
/* core.symlinks: bool */
|
92
|
-
GIT_SYMLINKS_DEFAULT =
|
92
|
+
GIT_SYMLINKS_DEFAULT = GIT_CVAR_TRUE,
|
93
93
|
/* core.ignorecase */
|
94
|
-
GIT_IGNORECASE_DEFAULT =
|
94
|
+
GIT_IGNORECASE_DEFAULT = GIT_CVAR_FALSE,
|
95
95
|
/* core.filemode */
|
96
|
-
GIT_FILEMODE_DEFAULT =
|
96
|
+
GIT_FILEMODE_DEFAULT = GIT_CVAR_TRUE,
|
97
97
|
/* core.ignorestat */
|
98
|
-
GIT_IGNORESTAT_DEFAULT =
|
98
|
+
GIT_IGNORESTAT_DEFAULT = GIT_CVAR_FALSE,
|
99
99
|
/* core.trustctime */
|
100
|
-
GIT_TRUSTCTIME_DEFAULT =
|
100
|
+
GIT_TRUSTCTIME_DEFAULT = GIT_CVAR_TRUE,
|
101
101
|
/* core.abbrev */
|
102
102
|
GIT_ABBREV_DEFAULT = 7,
|
103
103
|
/* core.precomposeunicode */
|
104
|
-
GIT_PRECOMPOSE_DEFAULT =
|
104
|
+
GIT_PRECOMPOSE_DEFAULT = GIT_CVAR_FALSE,
|
105
105
|
/* core.safecrlf */
|
106
|
-
GIT_SAFE_CRLF_DEFAULT =
|
106
|
+
GIT_SAFE_CRLF_DEFAULT = GIT_CVAR_FALSE,
|
107
107
|
/* core.logallrefupdates */
|
108
|
-
GIT_LOGALLREFUPDATES_FALSE = GIT_CONFIGMAP_FALSE,
|
109
|
-
GIT_LOGALLREFUPDATES_TRUE = GIT_CONFIGMAP_TRUE,
|
110
108
|
GIT_LOGALLREFUPDATES_UNSET = 2,
|
111
|
-
GIT_LOGALLREFUPDATES_ALWAYS = 3,
|
112
109
|
GIT_LOGALLREFUPDATES_DEFAULT = GIT_LOGALLREFUPDATES_UNSET,
|
113
110
|
/* core.protectHFS */
|
114
|
-
GIT_PROTECTHFS_DEFAULT =
|
111
|
+
GIT_PROTECTHFS_DEFAULT = GIT_CVAR_FALSE,
|
115
112
|
/* core.protectNTFS */
|
116
|
-
GIT_PROTECTNTFS_DEFAULT =
|
113
|
+
GIT_PROTECTNTFS_DEFAULT = GIT_CVAR_TRUE,
|
117
114
|
/* core.fsyncObjectFiles */
|
118
|
-
GIT_FSYNCOBJECTFILES_DEFAULT =
|
119
|
-
}
|
115
|
+
GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CVAR_FALSE,
|
116
|
+
} git_cvar_value;
|
120
117
|
|
121
118
|
/* internal repository init flags */
|
122
119
|
enum {
|
@@ -154,7 +151,7 @@ struct git_repository {
|
|
154
151
|
|
155
152
|
git_atomic attr_session_key;
|
156
153
|
|
157
|
-
|
154
|
+
git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX];
|
158
155
|
git_strmap *submodule_cache;
|
159
156
|
};
|
160
157
|
|
@@ -176,13 +173,6 @@ int git_repository_create_head(const char *git_dir, const char *ref_name);
|
|
176
173
|
*/
|
177
174
|
typedef int (*git_repository_foreach_head_cb)(git_repository *repo, const char *path, void *payload);
|
178
175
|
|
179
|
-
enum {
|
180
|
-
/* Skip enumeration of the main repository HEAD */
|
181
|
-
GIT_REPOSITORY_FOREACH_HEAD_SKIP_REPO = (1u << 0),
|
182
|
-
/* Skip enumeration of worktree HEADs */
|
183
|
-
GIT_REPOSITORY_FOREACH_HEAD_SKIP_WORKTREES = (1u << 1),
|
184
|
-
};
|
185
|
-
|
186
176
|
/*
|
187
177
|
* Iterate over repository and all worktree HEADs.
|
188
178
|
*
|
@@ -191,9 +181,7 @@ enum {
|
|
191
181
|
* executed with the given payload. The return value equals the
|
192
182
|
* return value of the last executed callback function.
|
193
183
|
*/
|
194
|
-
int git_repository_foreach_head(git_repository *repo,
|
195
|
-
git_repository_foreach_head_cb cb,
|
196
|
-
int flags, void *payload);
|
184
|
+
int git_repository_foreach_head(git_repository *repo, git_repository_foreach_head_cb cb, void *payload);
|
197
185
|
|
198
186
|
/*
|
199
187
|
* Weak pointers to repository internals.
|
@@ -208,13 +196,13 @@ int git_repository_refdb__weakptr(git_refdb **out, git_repository *repo);
|
|
208
196
|
int git_repository_index__weakptr(git_index **out, git_repository *repo);
|
209
197
|
|
210
198
|
/*
|
211
|
-
*
|
199
|
+
* CVAR cache
|
212
200
|
*
|
213
201
|
* Efficient access to the most used config variables of a repository.
|
214
202
|
* The cache is cleared every time the config backend is replaced.
|
215
203
|
*/
|
216
|
-
int
|
217
|
-
void
|
204
|
+
int git_repository__cvar(int *out, git_repository *repo, git_cvar_cached cvar);
|
205
|
+
void git_repository__cvar_cache_clear(git_repository *repo);
|
218
206
|
|
219
207
|
GIT_INLINE(int) git_repository__ensure_not_bare(
|
220
208
|
git_repository *repo,
|
@@ -223,8 +211,8 @@ GIT_INLINE(int) git_repository__ensure_not_bare(
|
|
223
211
|
if (!git_repository_is_bare(repo))
|
224
212
|
return 0;
|
225
213
|
|
226
|
-
|
227
|
-
|
214
|
+
giterr_set(
|
215
|
+
GITERR_REPOSITORY,
|
228
216
|
"cannot %s. This operation is not allowed against bare repositories.",
|
229
217
|
operation_name);
|
230
218
|
|
data/vendor/libgit2/src/reset.c
CHANGED
@@ -42,12 +42,12 @@ int git_reset_default(
|
|
42
42
|
|
43
43
|
if (target) {
|
44
44
|
if (git_object_owner(target) != repo) {
|
45
|
-
|
45
|
+
giterr_set(GITERR_OBJECT,
|
46
46
|
"%s_default - The given target does not belong to this repository.", ERROR_MSG);
|
47
47
|
return -1;
|
48
48
|
}
|
49
49
|
|
50
|
-
if ((error = git_object_peel(&commit, target,
|
50
|
+
if ((error = git_object_peel(&commit, target, GIT_OBJ_COMMIT)) < 0 ||
|
51
51
|
(error = git_commit_tree(&tree, (git_commit *)commit)) < 0)
|
52
52
|
goto cleanup;
|
53
53
|
}
|
@@ -70,7 +70,7 @@ int git_reset_default(
|
|
70
70
|
error = git_index_conflict_remove(index, delta->old_file.path);
|
71
71
|
if (error < 0) {
|
72
72
|
if (delta->status == GIT_DELTA_ADDED && error == GIT_ENOTFOUND)
|
73
|
-
|
73
|
+
giterr_clear();
|
74
74
|
else
|
75
75
|
goto cleanup;
|
76
76
|
}
|
@@ -119,7 +119,7 @@ static int reset(
|
|
119
119
|
opts = *checkout_opts;
|
120
120
|
|
121
121
|
if (git_object_owner(target) != repo) {
|
122
|
-
|
122
|
+
giterr_set(GITERR_OBJECT,
|
123
123
|
"%s - The given target does not belong to this repository.", ERROR_MSG);
|
124
124
|
return -1;
|
125
125
|
}
|
@@ -129,7 +129,7 @@ static int reset(
|
|
129
129
|
reset_type == GIT_RESET_MIXED ? "reset mixed" : "reset hard")) < 0)
|
130
130
|
return error;
|
131
131
|
|
132
|
-
if ((error = git_object_peel(&commit, target,
|
132
|
+
if ((error = git_object_peel(&commit, target, GIT_OBJ_COMMIT)) < 0 ||
|
133
133
|
(error = git_repository_index(&index, repo)) < 0 ||
|
134
134
|
(error = git_commit_tree(&tree, (git_commit *)commit)) < 0)
|
135
135
|
goto cleanup;
|
@@ -138,7 +138,7 @@ static int reset(
|
|
138
138
|
(git_repository_state(repo) == GIT_REPOSITORY_STATE_MERGE ||
|
139
139
|
git_index_has_conflicts(index)))
|
140
140
|
{
|
141
|
-
|
141
|
+
giterr_set(GITERR_OBJECT, "%s (soft) in the middle of a merge", ERROR_MSG);
|
142
142
|
error = GIT_EUNMERGED;
|
143
143
|
goto cleanup;
|
144
144
|
}
|
@@ -167,7 +167,7 @@ static int reset(
|
|
167
167
|
goto cleanup;
|
168
168
|
|
169
169
|
if ((error = git_repository_state_cleanup(repo)) < 0) {
|
170
|
-
|
170
|
+
giterr_set(GITERR_INDEX, "%s - failed to clean up merge data", ERROR_MSG);
|
171
171
|
goto cleanup;
|
172
172
|
}
|
173
173
|
}
|
@@ -176,7 +176,7 @@ cleanup:
|
|
176
176
|
git_object_free(commit);
|
177
177
|
git_index_free(index);
|
178
178
|
git_tree_free(tree);
|
179
|
-
|
179
|
+
git_buf_free(&log_message);
|
180
180
|
|
181
181
|
return error;
|
182
182
|
}
|
data/vendor/libgit2/src/revert.c
CHANGED
@@ -29,14 +29,14 @@ static int write_revert_head(
|
|
29
29
|
int error = 0;
|
30
30
|
|
31
31
|
if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_REVERT_HEAD_FILE)) >= 0 &&
|
32
|
-
(error = git_filebuf_open(&file, file_path.ptr,
|
32
|
+
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_REVERT_FILE_MODE)) >= 0 &&
|
33
33
|
(error = git_filebuf_printf(&file, "%s\n", commit_oidstr)) >= 0)
|
34
34
|
error = git_filebuf_commit(&file);
|
35
35
|
|
36
36
|
if (error < 0)
|
37
37
|
git_filebuf_cleanup(&file);
|
38
38
|
|
39
|
-
|
39
|
+
git_buf_free(&file_path);
|
40
40
|
|
41
41
|
return error;
|
42
42
|
}
|
@@ -51,7 +51,7 @@ static int write_merge_msg(
|
|
51
51
|
int error = 0;
|
52
52
|
|
53
53
|
if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 ||
|
54
|
-
(error = git_filebuf_open(&file, file_path.ptr,
|
54
|
+
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_REVERT_FILE_MODE)) < 0 ||
|
55
55
|
(error = git_filebuf_printf(&file, "Revert \"%s\"\n\nThis reverts commit %s.\n",
|
56
56
|
commit_msgline, commit_oidstr)) < 0)
|
57
57
|
goto cleanup;
|
@@ -62,7 +62,7 @@ cleanup:
|
|
62
62
|
if (error < 0)
|
63
63
|
git_filebuf_cleanup(&file);
|
64
64
|
|
65
|
-
|
65
|
+
git_buf_free(&file_path);
|
66
66
|
|
67
67
|
return error;
|
68
68
|
}
|
@@ -112,7 +112,7 @@ static int revert_seterr(git_commit *commit, const char *fmt)
|
|
112
112
|
git_oid_fmt(commit_oidstr, git_commit_id(commit));
|
113
113
|
commit_oidstr[GIT_OID_HEXSZ] = '\0';
|
114
114
|
|
115
|
-
|
115
|
+
giterr_set(GITERR_REVERT, fmt, commit_oidstr);
|
116
116
|
|
117
117
|
return -1;
|
118
118
|
}
|
@@ -182,7 +182,7 @@ int git_revert(
|
|
182
182
|
|
183
183
|
assert(repo && commit);
|
184
184
|
|
185
|
-
|
185
|
+
GITERR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options");
|
186
186
|
|
187
187
|
if ((error = git_repository__ensure_not_bare(repo, "revert")) < 0)
|
188
188
|
return error;
|
@@ -201,7 +201,7 @@ int git_revert(
|
|
201
201
|
(error = write_revert_head(repo, commit_oidstr)) < 0 ||
|
202
202
|
(error = write_merge_msg(repo, commit_oidstr, commit_msg)) < 0 ||
|
203
203
|
(error = git_repository_head(&our_ref, repo)) < 0 ||
|
204
|
-
(error = git_reference_peel((git_object **)&our_commit, our_ref,
|
204
|
+
(error = git_reference_peel((git_object **)&our_commit, our_ref, GIT_OBJ_COMMIT)) < 0 ||
|
205
205
|
(error = git_revert_commit(&index, repo, commit, our_commit, opts.mainline, &opts.merge_opts)) < 0 ||
|
206
206
|
(error = git_merge__check_result(repo, index)) < 0 ||
|
207
207
|
(error = git_merge__append_conflicts_to_merge_msg(repo, index)) < 0 ||
|
@@ -219,19 +219,14 @@ done:
|
|
219
219
|
git_index_free(index);
|
220
220
|
git_commit_free(our_commit);
|
221
221
|
git_reference_free(our_ref);
|
222
|
-
|
222
|
+
git_buf_free(&their_label);
|
223
223
|
|
224
224
|
return error;
|
225
225
|
}
|
226
226
|
|
227
|
-
int
|
227
|
+
int git_revert_init_options(git_revert_options *opts, unsigned int version)
|
228
228
|
{
|
229
229
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
230
230
|
opts, version, git_revert_options, GIT_REVERT_OPTIONS_INIT);
|
231
231
|
return 0;
|
232
232
|
}
|
233
|
-
|
234
|
-
int git_revert_init_options(git_revert_options *opts, unsigned int version)
|
235
|
-
{
|
236
|
-
return git_revert_options_init(opts, version);
|
237
|
-
}
|
@@ -7,10 +7,11 @@
|
|
7
7
|
|
8
8
|
#include "common.h"
|
9
9
|
|
10
|
+
#include <assert.h>
|
11
|
+
|
10
12
|
#include "buffer.h"
|
11
13
|
#include "tree.h"
|
12
14
|
#include "refdb.h"
|
13
|
-
#include "regexp.h"
|
14
15
|
|
15
16
|
#include "git2.h"
|
16
17
|
|
@@ -21,7 +22,7 @@ static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const cha
|
|
21
22
|
if (git_oid_fromstrn(&oid, spec, speclen) < 0)
|
22
23
|
return GIT_ENOTFOUND;
|
23
24
|
|
24
|
-
return git_object_lookup_prefix(out, repo, &oid, speclen,
|
25
|
+
return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJ_ANY);
|
25
26
|
}
|
26
27
|
|
27
28
|
static int maybe_sha(git_object** out, git_repository *repo, const char *spec)
|
@@ -41,20 +42,22 @@ static int maybe_abbrev(git_object** out, git_repository *repo, const char *spec
|
|
41
42
|
return maybe_sha_or_abbrev(out, repo, spec, speclen);
|
42
43
|
}
|
43
44
|
|
44
|
-
static int build_regex(
|
45
|
+
static int build_regex(regex_t *regex, const char *pattern)
|
45
46
|
{
|
46
47
|
int error;
|
47
48
|
|
48
49
|
if (*pattern == '\0') {
|
49
|
-
|
50
|
+
giterr_set(GITERR_REGEX, "empty pattern");
|
50
51
|
return GIT_EINVALIDSPEC;
|
51
52
|
}
|
52
53
|
|
53
|
-
error =
|
54
|
+
error = p_regcomp(regex, pattern, REG_EXTENDED);
|
54
55
|
if (!error)
|
55
56
|
return 0;
|
56
57
|
|
57
|
-
|
58
|
+
error = giterr_set_regex(regex, error);
|
59
|
+
|
60
|
+
regfree(regex);
|
58
61
|
|
59
62
|
return error;
|
60
63
|
}
|
@@ -63,7 +66,7 @@ static int maybe_describe(git_object**out, git_repository *repo, const char *spe
|
|
63
66
|
{
|
64
67
|
const char *substr;
|
65
68
|
int error;
|
66
|
-
|
69
|
+
regex_t regex;
|
67
70
|
|
68
71
|
substr = strstr(spec, "-g");
|
69
72
|
|
@@ -73,8 +76,8 @@ static int maybe_describe(git_object**out, git_repository *repo, const char *spe
|
|
73
76
|
if (build_regex(®ex, ".+-[0-9]+-g[0-9a-fA-F]+") < 0)
|
74
77
|
return -1;
|
75
78
|
|
76
|
-
error =
|
77
|
-
|
79
|
+
error = regexec(®ex, spec, 0, NULL, 0);
|
80
|
+
regfree(®ex);
|
78
81
|
|
79
82
|
if (error)
|
80
83
|
return GIT_ENOTFOUND;
|
@@ -98,7 +101,7 @@ static int revparse_lookup_object(
|
|
98
101
|
if (!error) {
|
99
102
|
|
100
103
|
error = git_object_lookup(
|
101
|
-
object_out, repo, git_reference_target(ref),
|
104
|
+
object_out, repo, git_reference_target(ref), GIT_OBJ_ANY);
|
102
105
|
|
103
106
|
if (!error)
|
104
107
|
*reference_out = ref;
|
@@ -116,7 +119,7 @@ static int revparse_lookup_object(
|
|
116
119
|
if ((error = maybe_describe(object_out, repo, spec)) != GIT_ENOTFOUND)
|
117
120
|
return error;
|
118
121
|
|
119
|
-
|
122
|
+
giterr_set(GITERR_REFERENCE, "revspec '%s' not found", spec);
|
120
123
|
return GIT_ENOTFOUND;
|
121
124
|
}
|
122
125
|
|
@@ -140,11 +143,12 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
|
|
140
143
|
{
|
141
144
|
git_reference *ref = NULL;
|
142
145
|
git_reflog *reflog = NULL;
|
143
|
-
|
146
|
+
regex_t preg;
|
144
147
|
int error = -1;
|
145
148
|
size_t i, numentries, cur;
|
146
149
|
const git_reflog_entry *entry;
|
147
150
|
const char *msg;
|
151
|
+
regmatch_t regexmatches[2];
|
148
152
|
git_buf buf = GIT_BUF_INIT;
|
149
153
|
|
150
154
|
cur = position;
|
@@ -164,14 +168,12 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
|
|
164
168
|
numentries = git_reflog_entrycount(reflog);
|
165
169
|
|
166
170
|
for (i = 0; i < numentries; i++) {
|
167
|
-
git_regmatch regexmatches[2];
|
168
|
-
|
169
171
|
entry = git_reflog_entry_byindex(reflog, i);
|
170
172
|
msg = git_reflog_entry_message(entry);
|
171
173
|
if (!msg)
|
172
174
|
continue;
|
173
175
|
|
174
|
-
if (
|
176
|
+
if (regexec(&preg, msg, 2, regexmatches, 0))
|
175
177
|
continue;
|
176
178
|
|
177
179
|
cur--;
|
@@ -179,8 +181,7 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
|
|
179
181
|
if (cur > 0)
|
180
182
|
continue;
|
181
183
|
|
182
|
-
|
183
|
-
goto cleanup;
|
184
|
+
git_buf_put(&buf, msg+regexmatches[1].rm_so, regexmatches[1].rm_eo - regexmatches[1].rm_so);
|
184
185
|
|
185
186
|
if ((error = git_reference_dwim(base_ref, repo, git_buf_cstr(&buf))) == 0)
|
186
187
|
goto cleanup;
|
@@ -197,8 +198,8 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
|
|
197
198
|
|
198
199
|
cleanup:
|
199
200
|
git_reference_free(ref);
|
200
|
-
|
201
|
-
|
201
|
+
git_buf_free(&buf);
|
202
|
+
regfree(&preg);
|
202
203
|
git_reflog_free(reflog);
|
203
204
|
return error;
|
204
205
|
}
|
@@ -244,8 +245,8 @@ static int retrieve_oid_from_reflog(git_oid *oid, git_reference *ref, size_t ide
|
|
244
245
|
return 0;
|
245
246
|
|
246
247
|
notfound:
|
247
|
-
|
248
|
-
|
248
|
+
giterr_set(
|
249
|
+
GITERR_REFERENCE,
|
249
250
|
"reflog for '%s' has only %"PRIuZ" entries, asked for %"PRIuZ,
|
250
251
|
git_reference_name(ref), numentries, identifier);
|
251
252
|
|
@@ -268,14 +269,14 @@ static int retrieve_revobject_from_reflog(git_object **out, git_reference **base
|
|
268
269
|
}
|
269
270
|
|
270
271
|
if (position == 0) {
|
271
|
-
error = git_object_lookup(out, repo, git_reference_target(ref),
|
272
|
+
error = git_object_lookup(out, repo, git_reference_target(ref), GIT_OBJ_ANY);
|
272
273
|
goto cleanup;
|
273
274
|
}
|
274
275
|
|
275
276
|
if ((error = retrieve_oid_from_reflog(&oid, ref, position)) < 0)
|
276
277
|
goto cleanup;
|
277
278
|
|
278
|
-
error = git_object_lookup(out, repo, &oid,
|
279
|
+
error = git_object_lookup(out, repo, &oid, GIT_OBJ_ANY);
|
279
280
|
|
280
281
|
cleanup:
|
281
282
|
git_reference_free(ref);
|
@@ -350,30 +351,30 @@ static int handle_at_syntax(git_object **out, git_reference **ref, const char *s
|
|
350
351
|
error = retrieve_revobject_from_reflog(out, ref, repo, git_buf_cstr(&identifier), (size_t)timestamp);
|
351
352
|
|
352
353
|
cleanup:
|
353
|
-
|
354
|
+
git_buf_free(&identifier);
|
354
355
|
return error;
|
355
356
|
}
|
356
357
|
|
357
|
-
static
|
358
|
+
static git_otype parse_obj_type(const char *str)
|
358
359
|
{
|
359
360
|
if (!strcmp(str, "commit"))
|
360
|
-
return
|
361
|
+
return GIT_OBJ_COMMIT;
|
361
362
|
|
362
363
|
if (!strcmp(str, "tree"))
|
363
|
-
return
|
364
|
+
return GIT_OBJ_TREE;
|
364
365
|
|
365
366
|
if (!strcmp(str, "blob"))
|
366
|
-
return
|
367
|
+
return GIT_OBJ_BLOB;
|
367
368
|
|
368
369
|
if (!strcmp(str, "tag"))
|
369
|
-
return
|
370
|
+
return GIT_OBJ_TAG;
|
370
371
|
|
371
|
-
return
|
372
|
+
return GIT_OBJ_BAD;
|
372
373
|
}
|
373
374
|
|
374
375
|
static int dereference_to_non_tag(git_object **out, git_object *obj)
|
375
376
|
{
|
376
|
-
if (git_object_type(obj) ==
|
377
|
+
if (git_object_type(obj) == GIT_OBJ_TAG)
|
377
378
|
return git_tag_peel(out, (git_tag *)obj);
|
378
379
|
|
379
380
|
return git_object_dup(out, obj);
|
@@ -384,7 +385,7 @@ static int handle_caret_parent_syntax(git_object **out, git_object *obj, int n)
|
|
384
385
|
git_object *temp_commit = NULL;
|
385
386
|
int error;
|
386
387
|
|
387
|
-
if ((error = git_object_peel(&temp_commit, obj,
|
388
|
+
if ((error = git_object_peel(&temp_commit, obj, GIT_OBJ_COMMIT)) < 0)
|
388
389
|
return (error == GIT_EAMBIGUOUS || error == GIT_ENOTFOUND) ?
|
389
390
|
GIT_EINVALIDSPEC : error;
|
390
391
|
|
@@ -404,7 +405,7 @@ static int handle_linear_syntax(git_object **out, git_object *obj, int n)
|
|
404
405
|
git_object *temp_commit = NULL;
|
405
406
|
int error;
|
406
407
|
|
407
|
-
if ((error = git_object_peel(&temp_commit, obj,
|
408
|
+
if ((error = git_object_peel(&temp_commit, obj, GIT_OBJ_COMMIT)) < 0)
|
408
409
|
return (error == GIT_EAMBIGUOUS || error == GIT_ENOTFOUND) ?
|
409
410
|
GIT_EINVALIDSPEC : error;
|
410
411
|
|
@@ -423,7 +424,7 @@ static int handle_colon_syntax(
|
|
423
424
|
int error = -1;
|
424
425
|
git_tree_entry *entry = NULL;
|
425
426
|
|
426
|
-
if ((error = git_object_peel(&tree, obj,
|
427
|
+
if ((error = git_object_peel(&tree, obj, GIT_OBJ_TREE)) < 0)
|
427
428
|
return error == GIT_ENOTFOUND ? GIT_EINVALIDSPEC : error;
|
428
429
|
|
429
430
|
if (*path == '\0') {
|
@@ -447,7 +448,7 @@ cleanup:
|
|
447
448
|
return error;
|
448
449
|
}
|
449
450
|
|
450
|
-
static int walk_and_search(git_object **out, git_revwalk *walk,
|
451
|
+
static int walk_and_search(git_object **out, git_revwalk *walk, regex_t *regex)
|
451
452
|
{
|
452
453
|
int error;
|
453
454
|
git_oid oid;
|
@@ -455,11 +456,11 @@ static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *rege
|
|
455
456
|
|
456
457
|
while (!(error = git_revwalk_next(&oid, walk))) {
|
457
458
|
|
458
|
-
error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid,
|
459
|
+
error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid, GIT_OBJ_COMMIT);
|
459
460
|
if ((error < 0) && (error != GIT_ENOTFOUND))
|
460
461
|
return -1;
|
461
462
|
|
462
|
-
if (!
|
463
|
+
if (!regexec(regex, git_commit_message((git_commit*)obj), 0, NULL, 0)) {
|
463
464
|
*out = obj;
|
464
465
|
return 0;
|
465
466
|
}
|
@@ -475,7 +476,7 @@ static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *rege
|
|
475
476
|
|
476
477
|
static int handle_grep_syntax(git_object **out, git_repository *repo, const git_oid *spec_oid, const char *pattern)
|
477
478
|
{
|
478
|
-
|
479
|
+
regex_t preg;
|
479
480
|
git_revwalk *walk = NULL;
|
480
481
|
int error;
|
481
482
|
|
@@ -496,7 +497,7 @@ static int handle_grep_syntax(git_object **out, git_repository *repo, const git_
|
|
496
497
|
error = walk_and_search(out, walk, &preg);
|
497
498
|
|
498
499
|
cleanup:
|
499
|
-
|
500
|
+
regfree(&preg);
|
500
501
|
git_revwalk_free(walk);
|
501
502
|
|
502
503
|
return error;
|
@@ -504,7 +505,7 @@ cleanup:
|
|
504
505
|
|
505
506
|
static int handle_caret_curly_syntax(git_object **out, git_object *obj, const char *curly_braces_content)
|
506
507
|
{
|
507
|
-
|
508
|
+
git_otype expected_type;
|
508
509
|
|
509
510
|
if (*curly_braces_content == '\0')
|
510
511
|
return dereference_to_non_tag(out, obj);
|
@@ -514,7 +515,7 @@ static int handle_caret_curly_syntax(git_object **out, git_object *obj, const ch
|
|
514
515
|
|
515
516
|
expected_type = parse_obj_type(curly_braces_content);
|
516
517
|
|
517
|
-
if (expected_type ==
|
518
|
+
if (expected_type == GIT_OBJ_BAD)
|
518
519
|
return GIT_EINVALIDSPEC;
|
519
520
|
|
520
521
|
return git_object_peel(out, obj, expected_type);
|
@@ -600,7 +601,7 @@ static int object_from_reference(git_object **object, git_reference *reference)
|
|
600
601
|
if (git_reference_resolve(&resolved, reference) < 0)
|
601
602
|
return -1;
|
602
603
|
|
603
|
-
error = git_object_lookup(object, reference->db->repo, git_reference_target(resolved),
|
604
|
+
error = git_object_lookup(object, reference->db->repo, git_reference_target(resolved), GIT_OBJ_ANY);
|
604
605
|
git_reference_free(resolved);
|
605
606
|
|
606
607
|
return error;
|
@@ -624,7 +625,7 @@ static int ensure_base_rev_loaded(git_object **object, git_reference **reference
|
|
624
625
|
return -1;
|
625
626
|
|
626
627
|
error = revparse_lookup_object(object, reference, repo, git_buf_cstr(&identifier));
|
627
|
-
|
628
|
+
git_buf_free(&identifier);
|
628
629
|
|
629
630
|
return error;
|
630
631
|
}
|
@@ -758,7 +759,7 @@ int revparse__ext(
|
|
758
759
|
* TODO: support merge-stage path lookup (":2:Makefile")
|
759
760
|
* and plain index blob lookup (:i-am/a/blob)
|
760
761
|
*/
|
761
|
-
|
762
|
+
giterr_set(GITERR_INVALID, "unimplemented");
|
762
763
|
error = GIT_ERROR;
|
763
764
|
goto cleanup;
|
764
765
|
}
|
@@ -813,14 +814,14 @@ int revparse__ext(
|
|
813
814
|
cleanup:
|
814
815
|
if (error) {
|
815
816
|
if (error == GIT_EINVALIDSPEC)
|
816
|
-
|
817
|
+
giterr_set(GITERR_INVALID,
|
817
818
|
"failed to parse revision specifier - Invalid pattern '%s'", spec);
|
818
819
|
|
819
820
|
git_object_free(base_rev);
|
820
821
|
git_reference_free(reference);
|
821
822
|
}
|
822
823
|
|
823
|
-
|
824
|
+
git_buf_free(&buf);
|
824
825
|
return error;
|
825
826
|
}
|
826
827
|
|
@@ -897,7 +898,7 @@ int git_revparse(
|
|
897
898
|
* allowed.
|
898
899
|
*/
|
899
900
|
if (!git__strcmp(spec, "..")) {
|
900
|
-
|
901
|
+
giterr_set(GITERR_INVALID, "Invalid pattern '..'");
|
901
902
|
return GIT_EINVALIDSPEC;
|
902
903
|
}
|
903
904
|
|