rugged 0.28.4 → 0.28.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +0 -1
- data/vendor/libgit2/CMakeLists.txt +16 -36
- data/vendor/libgit2/COPYING +0 -28
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +1 -5
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
- data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
- data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/regex/COPYING +502 -0
- data/vendor/libgit2/deps/regex/config.h +7 -0
- data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
- data/vendor/libgit2/deps/regex/regex.c +92 -0
- data/vendor/libgit2/deps/regex/regex.h +582 -0
- data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
- data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
- data/vendor/libgit2/deps/regex/regexec.c +4369 -0
- data/vendor/libgit2/deps/zlib/adler32.c +7 -0
- data/vendor/libgit2/deps/zlib/crc32.c +7 -0
- data/vendor/libgit2/include/git2.h +0 -2
- data/vendor/libgit2/include/git2/apply.h +2 -22
- data/vendor/libgit2/include/git2/attr.h +12 -19
- data/vendor/libgit2/include/git2/blame.h +2 -2
- data/vendor/libgit2/include/git2/blob.h +12 -44
- data/vendor/libgit2/include/git2/buffer.h +14 -20
- data/vendor/libgit2/include/git2/checkout.h +14 -46
- data/vendor/libgit2/include/git2/cherrypick.h +3 -3
- data/vendor/libgit2/include/git2/clone.h +2 -2
- data/vendor/libgit2/include/git2/commit.h +1 -23
- data/vendor/libgit2/include/git2/common.h +5 -7
- data/vendor/libgit2/include/git2/config.h +12 -12
- data/vendor/libgit2/include/git2/deprecated.h +3 -243
- data/vendor/libgit2/include/git2/describe.h +4 -4
- data/vendor/libgit2/include/git2/diff.h +14 -16
- data/vendor/libgit2/include/git2/filter.h +0 -8
- data/vendor/libgit2/include/git2/index.h +1 -2
- data/vendor/libgit2/include/git2/indexer.h +4 -48
- data/vendor/libgit2/include/git2/inttypes.h +309 -0
- data/vendor/libgit2/include/git2/merge.h +10 -6
- data/vendor/libgit2/include/git2/net.h +5 -0
- data/vendor/libgit2/include/git2/object.h +14 -2
- data/vendor/libgit2/include/git2/odb.h +2 -3
- data/vendor/libgit2/include/git2/odb_backend.h +4 -5
- data/vendor/libgit2/include/git2/oid.h +1 -1
- data/vendor/libgit2/include/git2/pack.h +1 -12
- data/vendor/libgit2/include/git2/proxy.h +3 -5
- data/vendor/libgit2/include/git2/rebase.h +2 -46
- data/vendor/libgit2/include/git2/refs.h +0 -19
- data/vendor/libgit2/include/git2/remote.h +12 -35
- data/vendor/libgit2/include/git2/repository.h +2 -24
- data/vendor/libgit2/include/git2/revert.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +3 -3
- data/vendor/libgit2/include/git2/status.h +16 -25
- data/vendor/libgit2/include/git2/submodule.h +3 -20
- data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
- data/vendor/libgit2/include/git2/sys/odb_backend.h +4 -48
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +21 -57
- data/vendor/libgit2/include/git2/sys/repository.h +1 -5
- data/vendor/libgit2/include/git2/sys/time.h +31 -0
- data/vendor/libgit2/include/git2/sys/transport.h +2 -2
- data/vendor/libgit2/include/git2/tag.h +2 -11
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transport.h +340 -11
- data/vendor/libgit2/include/git2/tree.h +1 -1
- data/vendor/libgit2/include/git2/types.h +89 -4
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/include/git2/worktree.h +5 -5
- data/vendor/libgit2/libgit2.pc.in +13 -0
- data/vendor/libgit2/src/CMakeLists.txt +222 -88
- data/vendor/libgit2/src/alloc.c +14 -2
- data/vendor/libgit2/src/apply.c +30 -60
- data/vendor/libgit2/src/attr.c +64 -70
- data/vendor/libgit2/src/attr_file.c +96 -189
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +46 -44
- data/vendor/libgit2/src/attrcache.h +1 -2
- data/vendor/libgit2/src/blame.c +5 -17
- data/vendor/libgit2/src/blame.h +1 -1
- data/vendor/libgit2/src/blame_git.c +7 -21
- data/vendor/libgit2/src/blob.c +17 -81
- data/vendor/libgit2/src/blob.h +2 -2
- data/vendor/libgit2/src/branch.c +5 -29
- data/vendor/libgit2/src/buffer.c +7 -14
- data/vendor/libgit2/src/cache.c +33 -26
- data/vendor/libgit2/src/cache.h +1 -1
- data/vendor/libgit2/src/cc-compat.h +0 -5
- data/vendor/libgit2/src/checkout.c +16 -26
- data/vendor/libgit2/src/cherrypick.c +3 -9
- data/vendor/libgit2/src/clone.c +7 -29
- data/vendor/libgit2/src/clone.h +0 -4
- data/vendor/libgit2/src/commit.c +21 -69
- data/vendor/libgit2/src/commit.h +0 -6
- data/vendor/libgit2/src/commit_list.c +76 -28
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +75 -3
- data/vendor/libgit2/src/config.c +40 -31
- data/vendor/libgit2/src/config.h +6 -7
- data/vendor/libgit2/src/config_backend.h +0 -12
- data/vendor/libgit2/src/config_cache.c +39 -39
- data/vendor/libgit2/src/config_entries.c +99 -69
- data/vendor/libgit2/src/config_entries.h +0 -1
- data/vendor/libgit2/src/config_file.c +380 -337
- data/vendor/libgit2/src/config_mem.c +16 -12
- data/vendor/libgit2/src/config_parse.c +29 -49
- data/vendor/libgit2/src/config_parse.h +12 -13
- data/vendor/libgit2/src/crlf.c +14 -14
- data/vendor/libgit2/src/describe.c +20 -21
- data/vendor/libgit2/src/diff.c +58 -43
- data/vendor/libgit2/src/diff.h +1 -2
- data/vendor/libgit2/src/diff_driver.c +38 -37
- data/vendor/libgit2/src/diff_file.c +7 -9
- data/vendor/libgit2/src/diff_file.h +1 -1
- data/vendor/libgit2/src/diff_generate.c +85 -135
- data/vendor/libgit2/src/diff_generate.h +2 -2
- data/vendor/libgit2/src/diff_parse.c +1 -1
- data/vendor/libgit2/src/diff_print.c +13 -25
- data/vendor/libgit2/src/diff_stats.c +1 -1
- data/vendor/libgit2/src/diff_tform.c +4 -4
- data/vendor/libgit2/src/errors.c +22 -12
- data/vendor/libgit2/src/features.h.in +2 -9
- data/vendor/libgit2/src/fetch.c +2 -7
- data/vendor/libgit2/src/fetchhead.c +1 -1
- data/vendor/libgit2/src/filebuf.c +10 -6
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/{futils.c → fileops.c} +17 -21
- data/vendor/libgit2/src/{futils.h → fileops.h} +5 -5
- data/vendor/libgit2/src/filter.c +8 -16
- data/vendor/libgit2/src/fnmatch.c +248 -0
- data/vendor/libgit2/src/fnmatch.h +48 -0
- data/vendor/libgit2/src/global.c +40 -12
- data/vendor/libgit2/src/global.h +2 -0
- data/vendor/libgit2/src/hash.c +0 -61
- data/vendor/libgit2/src/hash.h +21 -19
- data/vendor/libgit2/src/hash/{sha1/collisiondetect.c → hash_collisiondetect.h} +17 -14
- data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +19 -15
- data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
- data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +14 -4
- data/vendor/libgit2/src/hash/{sha1/mbedtls.c → hash_mbedtls.c} +7 -15
- data/vendor/libgit2/src/hash/{sha1/mbedtls.h → hash_mbedtls.h} +11 -6
- data/vendor/libgit2/src/hash/{sha1/openssl.c → hash_openssl.h} +18 -14
- data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +24 -34
- data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
- data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
- data/vendor/libgit2/src/hashsig.c +1 -1
- data/vendor/libgit2/src/idxmap.c +65 -91
- data/vendor/libgit2/src/idxmap.h +15 -151
- data/vendor/libgit2/src/ignore.c +38 -32
- data/vendor/libgit2/src/index.c +43 -66
- data/vendor/libgit2/src/index.h +1 -1
- data/vendor/libgit2/src/indexer.c +70 -69
- data/vendor/libgit2/src/integer.h +4 -39
- data/vendor/libgit2/src/iterator.c +22 -27
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +44 -58
- data/vendor/libgit2/src/merge_driver.c +4 -4
- data/vendor/libgit2/src/merge_file.c +1 -1
- data/vendor/libgit2/src/mwindow.c +23 -18
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/netops.c +165 -55
- data/vendor/libgit2/src/netops.h +25 -3
- data/vendor/libgit2/src/notes.c +2 -2
- data/vendor/libgit2/src/object.c +2 -2
- data/vendor/libgit2/src/object.h +0 -2
- data/vendor/libgit2/src/odb.c +23 -41
- data/vendor/libgit2/src/odb.h +2 -3
- data/vendor/libgit2/src/odb_loose.c +10 -17
- data/vendor/libgit2/src/odb_mempack.c +23 -10
- data/vendor/libgit2/src/odb_pack.c +4 -4
- data/vendor/libgit2/src/offmap.c +55 -43
- data/vendor/libgit2/src/offmap.h +24 -102
- data/vendor/libgit2/src/oid.c +1 -6
- data/vendor/libgit2/src/oidmap.c +57 -39
- data/vendor/libgit2/src/oidmap.h +19 -99
- data/vendor/libgit2/src/pack-objects.c +32 -25
- data/vendor/libgit2/src/pack-objects.h +1 -1
- data/vendor/libgit2/src/pack.c +47 -45
- data/vendor/libgit2/src/pack.h +14 -12
- data/vendor/libgit2/src/parse.c +0 -10
- data/vendor/libgit2/src/parse.h +3 -3
- data/vendor/libgit2/src/patch.c +1 -1
- data/vendor/libgit2/src/patch_generate.c +2 -2
- data/vendor/libgit2/src/patch_parse.c +31 -124
- data/vendor/libgit2/src/path.c +6 -43
- data/vendor/libgit2/src/path.h +0 -2
- data/vendor/libgit2/src/pathspec.c +13 -13
- data/vendor/libgit2/src/pool.c +22 -26
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +7 -7
- data/vendor/libgit2/src/posix.h +1 -12
- data/vendor/libgit2/src/proxy.c +2 -7
- data/vendor/libgit2/src/push.c +5 -10
- data/vendor/libgit2/src/reader.c +2 -2
- data/vendor/libgit2/src/rebase.c +7 -66
- data/vendor/libgit2/src/refdb.c +0 -12
- data/vendor/libgit2/src/refdb_fs.c +165 -214
- data/vendor/libgit2/src/reflog.c +13 -11
- data/vendor/libgit2/src/refs.c +18 -24
- data/vendor/libgit2/src/refspec.c +16 -9
- data/vendor/libgit2/src/remote.c +52 -50
- data/vendor/libgit2/src/remote.h +2 -2
- data/vendor/libgit2/src/repository.c +100 -115
- data/vendor/libgit2/src/repository.h +40 -49
- data/vendor/libgit2/src/revert.c +3 -8
- data/vendor/libgit2/src/revparse.c +19 -18
- data/vendor/libgit2/src/revwalk.c +30 -63
- data/vendor/libgit2/src/revwalk.h +0 -20
- data/vendor/libgit2/src/settings.c +0 -5
- data/vendor/libgit2/src/sortedcache.c +26 -12
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +65 -45
- data/vendor/libgit2/src/status.c +9 -15
- data/vendor/libgit2/src/{allocators/stdalloc.c → stdalloc.c} +4 -3
- data/vendor/libgit2/src/{allocators/stdalloc.h → stdalloc.h} +4 -4
- data/vendor/libgit2/src/streams/openssl.c +0 -20
- data/vendor/libgit2/src/streams/socket.c +2 -2
- data/vendor/libgit2/src/strmap.c +84 -37
- data/vendor/libgit2/src/strmap.h +33 -105
- data/vendor/libgit2/src/submodule.c +70 -102
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +1 -11
- data/vendor/libgit2/src/tag.c +2 -10
- data/vendor/libgit2/src/trace.c +1 -1
- data/vendor/libgit2/src/trace.h +2 -2
- data/vendor/libgit2/src/trailer.c +32 -46
- data/vendor/libgit2/src/transaction.c +9 -10
- data/vendor/libgit2/src/transports/auth.c +9 -10
- data/vendor/libgit2/src/transports/auth.h +4 -11
- data/vendor/libgit2/src/transports/auth_negotiate.c +9 -23
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/cred.c +6 -6
- data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
- data/vendor/libgit2/src/transports/git.c +16 -11
- data/vendor/libgit2/src/transports/http.c +276 -419
- data/vendor/libgit2/src/transports/http.h +1 -1
- data/vendor/libgit2/src/transports/local.c +9 -9
- data/vendor/libgit2/src/transports/smart.c +17 -17
- data/vendor/libgit2/src/transports/smart.h +2 -2
- data/vendor/libgit2/src/transports/smart_protocol.c +60 -36
- data/vendor/libgit2/src/transports/ssh.c +36 -46
- data/vendor/libgit2/src/transports/winhttp.c +207 -231
- data/vendor/libgit2/src/tree-cache.c +7 -14
- data/vendor/libgit2/src/tree.c +24 -10
- data/vendor/libgit2/src/unix/map.c +1 -1
- data/vendor/libgit2/src/unix/posix.h +11 -1
- data/vendor/libgit2/src/userdiff.h +1 -3
- data/vendor/libgit2/src/util.c +53 -51
- data/vendor/libgit2/src/util.h +21 -16
- data/vendor/libgit2/src/win32/map.c +5 -3
- data/vendor/libgit2/src/win32/path_w32.c +2 -12
- data/vendor/libgit2/src/win32/path_w32.h +29 -0
- data/vendor/libgit2/src/win32/posix.h +4 -1
- data/vendor/libgit2/src/win32/posix_w32.c +5 -40
- data/vendor/libgit2/src/win32/precompiled.h +2 -0
- data/vendor/libgit2/src/win32/thread.c +10 -5
- data/vendor/libgit2/src/win32/w32_buffer.c +3 -7
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +93 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +2 -0
- data/vendor/libgit2/src/win32/w32_stack.c +9 -4
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +0 -31
- data/vendor/libgit2/src/win32/w32_util.h +32 -6
- data/vendor/libgit2/src/worktree.c +22 -36
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +0 -12
- data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
- metadata +34 -98
- data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
- data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
- data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
- data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
- data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
- data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
- data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
- data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
- data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
- data/vendor/libgit2/deps/pcre/COPYING +0 -5
- data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
- data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
- data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
- data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
- data/vendor/libgit2/deps/pcre/config.h.in +0 -57
- data/vendor/libgit2/deps/pcre/pcre.h +0 -641
- data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
- data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
- data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
- data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
- data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
- data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
- data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
- data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
- data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
- data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
- data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
- data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
- data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
- data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
- data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
- data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
- data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
- data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
- data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
- data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
- data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
- data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
- data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
- data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
- data/vendor/libgit2/deps/pcre/ucp.h +0 -224
- data/vendor/libgit2/include/git2/cert.h +0 -135
- data/vendor/libgit2/include/git2/cred.h +0 -308
- data/vendor/libgit2/include/git2/sys/cred.h +0 -90
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/config_snapshot.c +0 -206
- data/vendor/libgit2/src/errors.h +0 -81
- data/vendor/libgit2/src/hash/sha1.h +0 -38
- data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
- data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
- data/vendor/libgit2/src/net.c +0 -184
- data/vendor/libgit2/src/net.h +0 -36
- data/vendor/libgit2/src/regexp.c +0 -221
- data/vendor/libgit2/src/regexp.h +0 -97
- data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
- data/vendor/libgit2/src/wildmatch.c +0 -320
- data/vendor/libgit2/src/wildmatch.h +0 -23
- data/vendor/libgit2/src/win32/w32_common.h +0 -39
data/vendor/libgit2/src/diff.c
CHANGED
@@ -323,7 +323,7 @@ int git_diff_commit_as_email(
|
|
323
323
|
git_commit *commit,
|
324
324
|
size_t patch_no,
|
325
325
|
size_t total_patches,
|
326
|
-
|
326
|
+
git_diff_format_email_flags_t flags,
|
327
327
|
const git_diff_options *diff_opts)
|
328
328
|
{
|
329
329
|
git_diff *diff = NULL;
|
@@ -350,19 +350,14 @@ int git_diff_commit_as_email(
|
|
350
350
|
return error;
|
351
351
|
}
|
352
352
|
|
353
|
-
int
|
353
|
+
int git_diff_init_options(git_diff_options *opts, unsigned int version)
|
354
354
|
{
|
355
355
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
356
356
|
opts, version, git_diff_options, GIT_DIFF_OPTIONS_INIT);
|
357
357
|
return 0;
|
358
358
|
}
|
359
359
|
|
360
|
-
int
|
361
|
-
{
|
362
|
-
return git_diff_options_init(opts, version);
|
363
|
-
}
|
364
|
-
|
365
|
-
int git_diff_find_options_init(
|
360
|
+
int git_diff_find_init_options(
|
366
361
|
git_diff_find_options *opts, unsigned int version)
|
367
362
|
{
|
368
363
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
@@ -370,13 +365,7 @@ int git_diff_find_options_init(
|
|
370
365
|
return 0;
|
371
366
|
}
|
372
367
|
|
373
|
-
int
|
374
|
-
git_diff_find_options *opts, unsigned int version)
|
375
|
-
{
|
376
|
-
return git_diff_find_options_init(opts, version);
|
377
|
-
}
|
378
|
-
|
379
|
-
int git_diff_format_email_options_init(
|
368
|
+
int git_diff_format_email_init_options(
|
380
369
|
git_diff_format_email_options *opts, unsigned int version)
|
381
370
|
{
|
382
371
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
@@ -385,12 +374,6 @@ int git_diff_format_email_options_init(
|
|
385
374
|
return 0;
|
386
375
|
}
|
387
376
|
|
388
|
-
int git_diff_format_email_init_options(
|
389
|
-
git_diff_format_email_options *opts, unsigned int version)
|
390
|
-
{
|
391
|
-
return git_diff_format_email_options_init(opts, version);
|
392
|
-
}
|
393
|
-
|
394
377
|
static int flush_hunk(git_oid *result, git_hash_ctx *ctx)
|
395
378
|
{
|
396
379
|
git_oid hash;
|
@@ -426,44 +409,79 @@ static void strip_spaces(git_buf *buf)
|
|
426
409
|
git_buf_truncate(buf, len);
|
427
410
|
}
|
428
411
|
|
429
|
-
int
|
412
|
+
static int file_cb(
|
430
413
|
const git_diff_delta *delta,
|
431
|
-
|
432
|
-
const git_diff_line *line,
|
414
|
+
float progress,
|
433
415
|
void *payload)
|
434
416
|
{
|
435
417
|
struct patch_id_args *args = (struct patch_id_args *) payload;
|
436
418
|
git_buf buf = GIT_BUF_INIT;
|
437
|
-
int error
|
419
|
+
int error;
|
438
420
|
|
439
|
-
|
440
|
-
line->origin == GIT_DIFF_LINE_ADD_EOFNL ||
|
441
|
-
line->origin == GIT_DIFF_LINE_DEL_EOFNL)
|
442
|
-
goto out;
|
421
|
+
GIT_UNUSED(progress);
|
443
422
|
|
444
|
-
if (
|
445
|
-
|
423
|
+
if (!args->first_file &&
|
424
|
+
(error = flush_hunk(&args->result, &args->ctx)) < 0)
|
425
|
+
goto out;
|
426
|
+
args->first_file = 0;
|
427
|
+
|
428
|
+
if ((error = git_buf_printf(&buf,
|
429
|
+
"diff--gita/%sb/%s---a/%s+++b/%s",
|
430
|
+
delta->old_file.path,
|
431
|
+
delta->new_file.path,
|
432
|
+
delta->old_file.path,
|
433
|
+
delta->new_file.path)) < 0)
|
446
434
|
goto out;
|
447
435
|
|
448
436
|
strip_spaces(&buf);
|
449
437
|
|
450
|
-
if (line->origin == GIT_DIFF_LINE_FILE_HDR &&
|
451
|
-
!args->first_file &&
|
452
|
-
(error = flush_hunk(&args->result, &args->ctx) < 0))
|
453
|
-
goto out;
|
454
|
-
|
455
438
|
if ((error = git_hash_update(&args->ctx, buf.ptr, buf.size)) < 0)
|
456
439
|
goto out;
|
457
440
|
|
458
|
-
|
459
|
-
|
441
|
+
out:
|
442
|
+
git_buf_dispose(&buf);
|
443
|
+
return error;
|
444
|
+
}
|
445
|
+
|
446
|
+
static int line_cb(
|
447
|
+
const git_diff_delta *delta,
|
448
|
+
const git_diff_hunk *hunk,
|
449
|
+
const git_diff_line *line,
|
450
|
+
void *payload)
|
451
|
+
{
|
452
|
+
struct patch_id_args *args = (struct patch_id_args *) payload;
|
453
|
+
git_buf buf = GIT_BUF_INIT;
|
454
|
+
int error;
|
455
|
+
|
456
|
+
GIT_UNUSED(delta);
|
457
|
+
GIT_UNUSED(hunk);
|
458
|
+
|
459
|
+
switch (line->origin) {
|
460
|
+
case GIT_DIFF_LINE_ADDITION:
|
461
|
+
git_buf_putc(&buf, '+');
|
462
|
+
break;
|
463
|
+
case GIT_DIFF_LINE_DELETION:
|
464
|
+
git_buf_putc(&buf, '-');
|
465
|
+
break;
|
466
|
+
case GIT_DIFF_LINE_CONTEXT:
|
467
|
+
break;
|
468
|
+
default:
|
469
|
+
git_error_set(GIT_ERROR_PATCH, "invalid line origin for patch");
|
470
|
+
return -1;
|
471
|
+
}
|
472
|
+
|
473
|
+
git_buf_put(&buf, line->content, line->content_len);
|
474
|
+
strip_spaces(&buf);
|
475
|
+
|
476
|
+
if ((error = git_hash_update(&args->ctx, buf.ptr, buf.size)) < 0)
|
477
|
+
goto out;
|
460
478
|
|
461
479
|
out:
|
462
480
|
git_buf_dispose(&buf);
|
463
481
|
return error;
|
464
482
|
}
|
465
483
|
|
466
|
-
int
|
484
|
+
int git_diff_patchid_init_options(git_diff_patchid_options *opts, unsigned int version)
|
467
485
|
{
|
468
486
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE(
|
469
487
|
opts, version, git_diff_patchid_options, GIT_DIFF_PATCHID_OPTIONS_INIT);
|
@@ -483,10 +501,7 @@ int git_diff_patchid(git_oid *out, git_diff *diff, git_diff_patchid_options *opt
|
|
483
501
|
if ((error = git_hash_ctx_init(&args.ctx)) < 0)
|
484
502
|
goto out;
|
485
503
|
|
486
|
-
if ((error =
|
487
|
-
GIT_DIFF_FORMAT_PATCH_ID,
|
488
|
-
git_diff_patchid_print_callback__to_buf,
|
489
|
-
&args)) < 0)
|
504
|
+
if ((error = git_diff_foreach(diff, file_cb, NULL, NULL, line_cb, &args)) < 0)
|
490
505
|
goto out;
|
491
506
|
|
492
507
|
if ((error = (flush_hunk(&args.result, &args.ctx))) < 0)
|
data/vendor/libgit2/src/diff.h
CHANGED
@@ -57,8 +57,7 @@ extern int git_diff_delta__format_file_header(
|
|
57
57
|
const git_diff_delta *delta,
|
58
58
|
const char *oldpfx,
|
59
59
|
const char *newpfx,
|
60
|
-
int oid_strlen
|
61
|
-
bool print_index);
|
60
|
+
int oid_strlen);
|
62
61
|
|
63
62
|
extern int git_diff_delta__cmp(const void *a, const void *b);
|
64
63
|
extern int git_diff_delta__casecmp(const void *a, const void *b);
|
@@ -9,13 +9,11 @@
|
|
9
9
|
|
10
10
|
#include "git2/attr.h"
|
11
11
|
|
12
|
-
#include "common.h"
|
13
12
|
#include "diff.h"
|
14
13
|
#include "strmap.h"
|
15
14
|
#include "map.h"
|
16
15
|
#include "buf_text.h"
|
17
16
|
#include "config.h"
|
18
|
-
#include "regexp.h"
|
19
17
|
#include "repository.h"
|
20
18
|
|
21
19
|
typedef enum {
|
@@ -26,7 +24,7 @@ typedef enum {
|
|
26
24
|
} git_diff_driver_t;
|
27
25
|
|
28
26
|
typedef struct {
|
29
|
-
|
27
|
+
regex_t re;
|
30
28
|
int flags;
|
31
29
|
} git_diff_driver_pattern;
|
32
30
|
|
@@ -40,7 +38,7 @@ struct git_diff_driver {
|
|
40
38
|
uint32_t binary_flags;
|
41
39
|
uint32_t other_flags;
|
42
40
|
git_array_t(git_diff_driver_pattern) fn_patterns;
|
43
|
-
|
41
|
+
regex_t word_pattern;
|
44
42
|
char name[GIT_FLEX_ARRAY];
|
45
43
|
};
|
46
44
|
|
@@ -65,7 +63,7 @@ git_diff_driver_registry *git_diff_driver_registry_new(void)
|
|
65
63
|
if (!reg)
|
66
64
|
return NULL;
|
67
65
|
|
68
|
-
if (
|
66
|
+
if (git_strmap_alloc(®->drivers) < 0) {
|
69
67
|
git_diff_driver_registry_free(reg);
|
70
68
|
return NULL;
|
71
69
|
}
|
@@ -114,7 +112,7 @@ static int diff_driver_add_patterns(
|
|
114
112
|
if (error < 0)
|
115
113
|
break;
|
116
114
|
|
117
|
-
if ((error =
|
115
|
+
if ((error = p_regcomp(&pat->re, buf.ptr, regex_flags)) != 0) {
|
118
116
|
/*
|
119
117
|
* TODO: issue a warning
|
120
118
|
*/
|
@@ -131,7 +129,7 @@ static int diff_driver_add_patterns(
|
|
131
129
|
|
132
130
|
static int diff_driver_xfuncname(const git_config_entry *entry, void *payload)
|
133
131
|
{
|
134
|
-
return diff_driver_add_patterns(payload, entry->value,
|
132
|
+
return diff_driver_add_patterns(payload, entry->value, REG_EXTENDED);
|
135
133
|
}
|
136
134
|
|
137
135
|
static int diff_driver_funcname(const git_config_entry *entry, void *payload)
|
@@ -185,9 +183,9 @@ static int git_diff_driver_builtin(
|
|
185
183
|
git_diff_driver_registry *reg,
|
186
184
|
const char *driver_name)
|
187
185
|
{
|
186
|
+
int error = 0;
|
188
187
|
git_diff_driver_definition *ddef = NULL;
|
189
188
|
git_diff_driver *drv = NULL;
|
190
|
-
int error = 0;
|
191
189
|
size_t idx;
|
192
190
|
|
193
191
|
for (idx = 0; idx < ARRAY_SIZE(builtin_defs); ++idx) {
|
@@ -206,15 +204,20 @@ static int git_diff_driver_builtin(
|
|
206
204
|
|
207
205
|
if (ddef->fns &&
|
208
206
|
(error = diff_driver_add_patterns(
|
209
|
-
drv, ddef->fns, ddef->flags)) < 0)
|
207
|
+
drv, ddef->fns, ddef->flags | REG_EXTENDED)) < 0)
|
210
208
|
goto done;
|
211
209
|
|
212
210
|
if (ddef->words &&
|
213
|
-
|
211
|
+
(error = p_regcomp(
|
212
|
+
&drv->word_pattern, ddef->words, ddef->flags | REG_EXTENDED)))
|
213
|
+
{
|
214
|
+
error = git_error_set_regex(&drv->word_pattern, error);
|
214
215
|
goto done;
|
216
|
+
}
|
215
217
|
|
216
|
-
|
217
|
-
|
218
|
+
git_strmap_insert(reg->drivers, drv->name, drv, &error);
|
219
|
+
if (error > 0)
|
220
|
+
error = 0;
|
218
221
|
|
219
222
|
done:
|
220
223
|
if (error && drv)
|
@@ -230,8 +233,8 @@ static int git_diff_driver_load(
|
|
230
233
|
{
|
231
234
|
int error = 0;
|
232
235
|
git_diff_driver_registry *reg;
|
233
|
-
git_diff_driver *drv;
|
234
|
-
size_t namelen;
|
236
|
+
git_diff_driver *drv = NULL;
|
237
|
+
size_t namelen, pos;
|
235
238
|
git_config *cfg = NULL;
|
236
239
|
git_buf name = GIT_BUF_INIT;
|
237
240
|
git_config_entry *ce = NULL;
|
@@ -240,8 +243,9 @@ static int git_diff_driver_load(
|
|
240
243
|
if ((reg = git_repository_driver_registry(repo)) == NULL)
|
241
244
|
return -1;
|
242
245
|
|
243
|
-
|
244
|
-
|
246
|
+
pos = git_strmap_lookup_index(reg->drivers, driver_name);
|
247
|
+
if (git_strmap_valid_index(reg->drivers, pos)) {
|
248
|
+
*out = git_strmap_value_at(reg->drivers, pos);
|
245
249
|
return 0;
|
246
250
|
}
|
247
251
|
|
@@ -278,9 +282,7 @@ static int git_diff_driver_load(
|
|
278
282
|
/* TODO: warn if diff.<name>.command or diff.<name>.textconv are set */
|
279
283
|
|
280
284
|
git_buf_truncate(&name, namelen + strlen("diff.."));
|
281
|
-
|
282
|
-
goto done;
|
283
|
-
|
285
|
+
git_buf_put(&name, "xfuncname", strlen("xfuncname"));
|
284
286
|
if ((error = git_config_get_multivar_foreach(
|
285
287
|
cfg, name.ptr, NULL, diff_driver_xfuncname, drv)) < 0) {
|
286
288
|
if (error != GIT_ENOTFOUND)
|
@@ -289,9 +291,7 @@ static int git_diff_driver_load(
|
|
289
291
|
}
|
290
292
|
|
291
293
|
git_buf_truncate(&name, namelen + strlen("diff.."));
|
292
|
-
|
293
|
-
goto done;
|
294
|
-
|
294
|
+
git_buf_put(&name, "funcname", strlen("funcname"));
|
295
295
|
if ((error = git_config_get_multivar_foreach(
|
296
296
|
cfg, name.ptr, NULL, diff_driver_funcname, drv)) < 0) {
|
297
297
|
if (error != GIT_ENOTFOUND)
|
@@ -306,17 +306,16 @@ static int git_diff_driver_load(
|
|
306
306
|
}
|
307
307
|
|
308
308
|
git_buf_truncate(&name, namelen + strlen("diff.."));
|
309
|
-
|
310
|
-
goto done;
|
311
|
-
|
309
|
+
git_buf_put(&name, "wordregex", strlen("wordregex"));
|
312
310
|
if ((error = git_config__lookup_entry(&ce, cfg, name.ptr, false)) < 0)
|
313
311
|
goto done;
|
314
312
|
if (!ce || !ce->value)
|
315
313
|
/* no diff.<driver>.wordregex, so just continue */;
|
316
|
-
else if (!(error =
|
314
|
+
else if (!(error = p_regcomp(&drv->word_pattern, ce->value, REG_EXTENDED)))
|
317
315
|
found_driver = true;
|
318
316
|
else {
|
319
317
|
/* TODO: warn about bad regex instead of failure */
|
318
|
+
error = git_error_set_regex(&drv->word_pattern, error);
|
320
319
|
goto done;
|
321
320
|
}
|
322
321
|
|
@@ -329,8 +328,10 @@ static int git_diff_driver_load(
|
|
329
328
|
goto done;
|
330
329
|
|
331
330
|
/* store driver in registry */
|
332
|
-
|
331
|
+
git_strmap_insert(reg->drivers, drv->name, drv, &error);
|
332
|
+
if (error < 0)
|
333
333
|
goto done;
|
334
|
+
error = 0;
|
334
335
|
|
335
336
|
*out = drv;
|
336
337
|
|
@@ -367,11 +368,11 @@ int git_diff_driver_lookup(
|
|
367
368
|
attrsession, 0, path, 1, attrs)) < 0)
|
368
369
|
/* return error below */;
|
369
370
|
|
370
|
-
else if (
|
371
|
+
else if (GIT_ATTR_UNSPECIFIED(values[0]))
|
371
372
|
/* just use the auto value */;
|
372
|
-
else if (
|
373
|
+
else if (GIT_ATTR_FALSE(values[0]))
|
373
374
|
*out = &global_drivers[DIFF_DRIVER_BINARY];
|
374
|
-
else if (
|
375
|
+
else if (GIT_ATTR_TRUE(values[0]))
|
375
376
|
*out = &global_drivers[DIFF_DRIVER_TEXT];
|
376
377
|
|
377
378
|
/* otherwise look for driver information in config and build driver */
|
@@ -396,10 +397,10 @@ void git_diff_driver_free(git_diff_driver *driver)
|
|
396
397
|
return;
|
397
398
|
|
398
399
|
for (i = 0; i < git_array_size(driver->fn_patterns); ++i)
|
399
|
-
|
400
|
+
regfree(& git_array_get(driver->fn_patterns, i)->re);
|
400
401
|
git_array_clear(driver->fn_patterns);
|
401
402
|
|
402
|
-
|
403
|
+
regfree(&driver->word_pattern);
|
403
404
|
|
404
405
|
git__free(driver);
|
405
406
|
}
|
@@ -447,19 +448,19 @@ static int diff_context_line__pattern_match(
|
|
447
448
|
git_diff_driver *driver, git_buf *line)
|
448
449
|
{
|
449
450
|
size_t i, maxi = git_array_size(driver->fn_patterns);
|
450
|
-
|
451
|
+
regmatch_t pmatch[2];
|
451
452
|
|
452
453
|
for (i = 0; i < maxi; ++i) {
|
453
454
|
git_diff_driver_pattern *pat = git_array_get(driver->fn_patterns, i);
|
454
455
|
|
455
|
-
if (!
|
456
|
+
if (!regexec(&pat->re, line->ptr, 2, pmatch, 0)) {
|
456
457
|
if (pat->flags & REG_NEGATE)
|
457
458
|
return false;
|
458
459
|
|
459
460
|
/* use pmatch data to trim line data */
|
460
|
-
i = (pmatch[1].
|
461
|
-
git_buf_consume(line, git_buf_cstr(line) + pmatch[i].
|
462
|
-
git_buf_truncate(line, pmatch[i].
|
461
|
+
i = (pmatch[1].rm_so >= 0) ? 1 : 0;
|
462
|
+
git_buf_consume(line, git_buf_cstr(line) + pmatch[i].rm_so);
|
463
|
+
git_buf_truncate(line, pmatch[i].rm_eo - pmatch[i].rm_so);
|
463
464
|
git_buf_rtrim(line);
|
464
465
|
|
465
466
|
return true;
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#include "diff.h"
|
13
13
|
#include "diff_generate.h"
|
14
14
|
#include "odb.h"
|
15
|
-
#include "
|
15
|
+
#include "fileops.h"
|
16
16
|
#include "filter.h"
|
17
17
|
|
18
18
|
#define DIFF_MAX_FILESIZE 0x20000000
|
@@ -62,7 +62,7 @@ static int diff_file_content_init_common(
|
|
62
62
|
git_diff_driver_update_options(&fc->opts_flags, fc->driver);
|
63
63
|
|
64
64
|
/* make sure file is conceivable mmap-able */
|
65
|
-
if ((size_t)fc->file->size != fc->file->size)
|
65
|
+
if ((git_off_t)((size_t)fc->file->size) != fc->file->size)
|
66
66
|
fc->file->flags |= GIT_DIFF_FLAG_BINARY;
|
67
67
|
/* check if user is forcing text diff the file */
|
68
68
|
else if (fc->opts_flags & GIT_DIFF_FORCE_TEXT) {
|
@@ -232,7 +232,7 @@ static int diff_file_content_load_blob(
|
|
232
232
|
int error = 0;
|
233
233
|
git_odb_object *odb_obj = NULL;
|
234
234
|
|
235
|
-
if (
|
235
|
+
if (git_oid_iszero(&fc->file->id))
|
236
236
|
return 0;
|
237
237
|
|
238
238
|
if (fc->file->mode == GIT_FILEMODE_COMMIT)
|
@@ -290,8 +290,8 @@ static int diff_file_content_load_workdir_symlink(
|
|
290
290
|
ssize_t alloc_len, read_len;
|
291
291
|
int symlink_supported, error;
|
292
292
|
|
293
|
-
if ((error =
|
294
|
-
&symlink_supported, fc->repo,
|
293
|
+
if ((error = git_repository__cvar(
|
294
|
+
&symlink_supported, fc->repo, GIT_CVAR_SYMLINKS)) < 0)
|
295
295
|
return -1;
|
296
296
|
|
297
297
|
if (!symlink_supported)
|
@@ -330,10 +330,8 @@ static int diff_file_content_load_workdir_file(
|
|
330
330
|
if (fd < 0)
|
331
331
|
return fd;
|
332
332
|
|
333
|
-
if (!fc->file->size
|
334
|
-
|
335
|
-
|
336
|
-
if (error < 0 || !fc->file->size)
|
333
|
+
if (!fc->file->size &&
|
334
|
+
!(fc->file->size = git_futils_filesize(fd)))
|
337
335
|
goto cleanup;
|
338
336
|
|
339
337
|
if ((diff_opts->flags & GIT_DIFF_SHOW_BINARY) == 0 &&
|