rugged 0.27.7 → 0.27.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +99 -51
- data/vendor/libgit2/COPYING +28 -0
- data/vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake +15 -1
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +29 -0
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +96 -0
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +9 -8
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
- data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +28 -0
- data/vendor/libgit2/cmake/Modules/FindIconv.cmake +11 -6
- data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +38 -0
- data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +37 -0
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +6 -0
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +110 -0
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +53 -0
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +124 -0
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +66 -0
- data/vendor/libgit2/deps/http-parser/http_parser.c +11 -6
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +21 -0
- data/vendor/libgit2/deps/ntlmclient/compat.h +33 -0
- data/vendor/libgit2/deps/ntlmclient/crypt.h +64 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +120 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +18 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +145 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +18 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +130 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +21 -0
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +1420 -0
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +174 -0
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +320 -0
- data/vendor/libgit2/deps/ntlmclient/unicode.h +36 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +445 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +201 -0
- data/vendor/libgit2/deps/ntlmclient/utf8.h +1257 -0
- data/vendor/libgit2/deps/ntlmclient/util.c +21 -0
- data/vendor/libgit2/deps/ntlmclient/util.h +14 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +140 -0
- data/vendor/libgit2/deps/pcre/COPYING +5 -0
- data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +22 -0
- data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +17 -0
- data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +58 -0
- data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +29 -0
- data/vendor/libgit2/deps/pcre/config.h.in +57 -0
- data/vendor/libgit2/deps/pcre/pcre.h +641 -0
- data/vendor/libgit2/deps/pcre/pcre_byte_order.c +319 -0
- data/vendor/libgit2/deps/pcre/pcre_chartables.c +198 -0
- data/vendor/libgit2/deps/pcre/pcre_compile.c +9800 -0
- data/vendor/libgit2/deps/pcre/pcre_config.c +190 -0
- data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +3676 -0
- data/vendor/libgit2/deps/pcre/pcre_exec.c +7173 -0
- data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +245 -0
- data/vendor/libgit2/deps/pcre/pcre_get.c +669 -0
- data/vendor/libgit2/deps/pcre/pcre_globals.c +86 -0
- data/vendor/libgit2/deps/pcre/pcre_internal.h +2787 -0
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +11913 -0
- data/vendor/libgit2/deps/pcre/pcre_maketables.c +156 -0
- data/vendor/libgit2/deps/pcre/pcre_newline.c +210 -0
- data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +94 -0
- data/vendor/libgit2/deps/pcre/pcre_printint.c +834 -0
- data/vendor/libgit2/deps/pcre/pcre_refcount.c +92 -0
- data/vendor/libgit2/deps/pcre/pcre_string_utils.c +211 -0
- data/vendor/libgit2/deps/pcre/pcre_study.c +1686 -0
- data/vendor/libgit2/deps/pcre/pcre_tables.c +727 -0
- data/vendor/libgit2/deps/pcre/pcre_ucd.c +3644 -0
- data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +301 -0
- data/vendor/libgit2/deps/pcre/pcre_version.c +98 -0
- data/vendor/libgit2/deps/pcre/pcre_xclass.c +268 -0
- data/vendor/libgit2/deps/pcre/pcreposix.c +421 -0
- data/vendor/libgit2/deps/pcre/pcreposix.h +117 -0
- data/vendor/libgit2/deps/pcre/ucp.h +224 -0
- data/vendor/libgit2/deps/winhttp/COPYING.GPL +993 -0
- data/vendor/libgit2/deps/winhttp/COPYING.LGPL +502 -0
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +1 -0
- data/vendor/libgit2/deps/zlib/COPYING +27 -0
- data/vendor/libgit2/deps/zlib/adler32.c +0 -7
- data/vendor/libgit2/deps/zlib/crc32.c +0 -7
- data/vendor/libgit2/include/git2/annotated_commit.h +9 -0
- data/vendor/libgit2/include/git2/apply.h +149 -0
- data/vendor/libgit2/include/git2/attr.h +20 -13
- data/vendor/libgit2/include/git2/blame.h +4 -4
- data/vendor/libgit2/include/git2/blob.h +44 -12
- data/vendor/libgit2/include/git2/buffer.h +20 -26
- data/vendor/libgit2/include/git2/cert.h +135 -0
- data/vendor/libgit2/include/git2/checkout.h +53 -21
- data/vendor/libgit2/include/git2/cherrypick.h +3 -3
- data/vendor/libgit2/include/git2/clone.h +5 -5
- data/vendor/libgit2/include/git2/commit.h +25 -3
- data/vendor/libgit2/include/git2/common.h +35 -10
- data/vendor/libgit2/include/git2/config.h +29 -19
- data/vendor/libgit2/include/git2/cred.h +308 -0
- data/vendor/libgit2/include/git2/deprecated.h +493 -0
- data/vendor/libgit2/include/git2/describe.h +4 -4
- data/vendor/libgit2/include/git2/diff.h +177 -135
- data/vendor/libgit2/include/git2/errors.h +53 -46
- data/vendor/libgit2/include/git2/filter.h +8 -0
- data/vendor/libgit2/include/git2/index.h +74 -52
- data/vendor/libgit2/include/git2/indexer.h +76 -6
- data/vendor/libgit2/include/git2/merge.h +25 -10
- data/vendor/libgit2/include/git2/net.h +0 -5
- data/vendor/libgit2/include/git2/notes.h +1 -1
- data/vendor/libgit2/include/git2/object.h +17 -29
- data/vendor/libgit2/include/git2/odb.h +12 -11
- data/vendor/libgit2/include/git2/odb_backend.h +10 -9
- data/vendor/libgit2/include/git2/oid.h +2 -2
- data/vendor/libgit2/include/git2/pack.h +14 -3
- data/vendor/libgit2/include/git2/proxy.h +5 -3
- data/vendor/libgit2/include/git2/rebase.h +46 -2
- data/vendor/libgit2/include/git2/refs.h +34 -16
- data/vendor/libgit2/include/git2/remote.h +111 -14
- data/vendor/libgit2/include/git2/repository.h +69 -34
- data/vendor/libgit2/include/git2/revert.h +1 -1
- 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 +5 -5
- data/vendor/libgit2/include/git2/status.h +26 -17
- data/vendor/libgit2/include/git2/submodule.h +23 -6
- data/vendor/libgit2/include/git2/sys/alloc.h +18 -18
- 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/cred.h +90 -0
- data/vendor/libgit2/include/git2/sys/filter.h +6 -6
- data/vendor/libgit2/include/git2/sys/merge.h +3 -3
- data/vendor/libgit2/include/git2/sys/odb_backend.h +66 -22
- data/vendor/libgit2/include/git2/sys/path.h +14 -5
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +76 -40
- data/vendor/libgit2/include/git2/sys/repository.h +5 -1
- data/vendor/libgit2/include/git2/sys/stream.h +92 -12
- data/vendor/libgit2/include/git2/sys/transport.h +129 -83
- data/vendor/libgit2/include/git2/tag.h +13 -4
- data/vendor/libgit2/include/git2/trace.h +2 -2
- data/vendor/libgit2/include/git2/transport.h +11 -311
- data/vendor/libgit2/include/git2/tree.h +4 -4
- data/vendor/libgit2/include/git2/types.h +25 -106
- data/vendor/libgit2/include/git2/version.h +3 -3
- data/vendor/libgit2/include/git2/worktree.h +5 -5
- data/vendor/libgit2/include/git2.h +4 -0
- data/vendor/libgit2/src/CMakeLists.txt +104 -235
- data/vendor/libgit2/src/alloc.c +14 -18
- data/vendor/libgit2/src/{stdalloc.c → allocators/stdalloc.c} +7 -8
- data/vendor/libgit2/src/{stdalloc.h → allocators/stdalloc.h} +4 -4
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +118 -0
- data/vendor/libgit2/src/{transports/cred.h → allocators/win32_crtdbg.h} +5 -4
- data/vendor/libgit2/src/annotated_commit.c +18 -11
- data/vendor/libgit2/src/apply.c +535 -28
- data/vendor/libgit2/src/apply.h +3 -1
- data/vendor/libgit2/src/array.h +2 -2
- data/vendor/libgit2/src/attr.c +77 -71
- data/vendor/libgit2/src/attr_file.c +203 -117
- data/vendor/libgit2/src/attr_file.h +9 -9
- data/vendor/libgit2/src/attrcache.c +49 -51
- data/vendor/libgit2/src/attrcache.h +2 -1
- data/vendor/libgit2/src/blame.c +38 -18
- data/vendor/libgit2/src/blame.h +1 -1
- data/vendor/libgit2/src/blame_git.c +29 -15
- data/vendor/libgit2/src/blob.c +123 -37
- data/vendor/libgit2/src/blob.h +19 -2
- data/vendor/libgit2/src/branch.c +47 -23
- data/vendor/libgit2/src/buf_text.c +7 -6
- data/vendor/libgit2/src/buffer.c +60 -53
- data/vendor/libgit2/src/cache.c +38 -45
- data/vendor/libgit2/src/cache.h +3 -3
- data/vendor/libgit2/src/cc-compat.h +20 -3
- data/vendor/libgit2/src/checkout.c +77 -67
- data/vendor/libgit2/src/cherrypick.c +12 -6
- data/vendor/libgit2/src/clone.c +36 -14
- data/vendor/libgit2/src/clone.h +4 -0
- data/vendor/libgit2/src/commit.c +103 -48
- data/vendor/libgit2/src/commit.h +7 -0
- data/vendor/libgit2/src/commit_list.c +36 -78
- data/vendor/libgit2/src/commit_list.h +2 -2
- data/vendor/libgit2/src/common.h +24 -90
- data/vendor/libgit2/src/config.c +203 -176
- data/vendor/libgit2/src/config.h +8 -20
- data/vendor/libgit2/src/config_backend.h +96 -0
- data/vendor/libgit2/src/config_cache.c +41 -35
- data/vendor/libgit2/src/config_entries.c +229 -0
- data/vendor/libgit2/src/config_entries.h +24 -0
- data/vendor/libgit2/src/config_file.c +422 -680
- data/vendor/libgit2/src/config_mem.c +220 -0
- data/vendor/libgit2/src/config_parse.c +96 -68
- data/vendor/libgit2/src/config_parse.h +15 -14
- data/vendor/libgit2/src/config_snapshot.c +206 -0
- data/vendor/libgit2/src/crlf.c +219 -196
- data/vendor/libgit2/src/delta.c +25 -18
- data/vendor/libgit2/src/describe.c +42 -41
- data/vendor/libgit2/src/diff.c +52 -67
- data/vendor/libgit2/src/diff.h +2 -1
- data/vendor/libgit2/src/diff_driver.c +44 -46
- data/vendor/libgit2/src/diff_file.c +16 -14
- data/vendor/libgit2/src/diff_file.h +1 -1
- data/vendor/libgit2/src/diff_generate.c +158 -103
- 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 +34 -22
- data/vendor/libgit2/src/diff_stats.c +22 -7
- data/vendor/libgit2/src/diff_tform.c +18 -16
- data/vendor/libgit2/src/diff_xdiff.c +3 -3
- data/vendor/libgit2/src/errors.c +51 -39
- data/vendor/libgit2/src/errors.h +81 -0
- data/vendor/libgit2/src/features.h.in +9 -3
- data/vendor/libgit2/src/fetch.c +8 -3
- data/vendor/libgit2/src/fetchhead.c +12 -12
- data/vendor/libgit2/src/filebuf.c +28 -32
- data/vendor/libgit2/src/filebuf.h +2 -2
- data/vendor/libgit2/src/filter.c +47 -33
- data/vendor/libgit2/src/filter.h +0 -10
- data/vendor/libgit2/src/{fileops.c → futils.c} +70 -63
- data/vendor/libgit2/src/{fileops.h → futils.h} +6 -6
- data/vendor/libgit2/src/global.c +35 -55
- data/vendor/libgit2/src/global.h +0 -2
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +48 -0
- data/vendor/libgit2/src/hash/sha1/collisiondetect.h +19 -0
- data/vendor/libgit2/src/hash/{hash_common_crypto.h → sha1/common_crypto.c} +17 -17
- data/vendor/libgit2/src/hash/sha1/common_crypto.h +19 -0
- data/vendor/libgit2/src/hash/{hash_generic.c → sha1/generic.c} +22 -10
- data/vendor/libgit2/src/hash/{hash_generic.h → sha1/generic.h} +4 -10
- data/vendor/libgit2/src/hash/{hash_mbedtls.c → sha1/mbedtls.c} +15 -7
- data/vendor/libgit2/src/hash/{hash_mbedtls.h → sha1/mbedtls.h} +6 -7
- data/vendor/libgit2/src/hash/sha1/openssl.c +59 -0
- data/vendor/libgit2/src/hash/sha1/openssl.h +19 -0
- data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/sha1.c +14 -3
- data/vendor/libgit2/src/hash/{hash_win32.c → sha1/win32.c} +47 -37
- data/vendor/libgit2/src/hash/{hash_win32.h → sha1/win32.h} +6 -19
- data/vendor/libgit2/src/hash/sha1.h +38 -0
- data/vendor/libgit2/src/hash.c +61 -0
- data/vendor/libgit2/src/hash.h +20 -21
- data/vendor/libgit2/src/hashsig.c +5 -5
- data/vendor/libgit2/src/idxmap.c +107 -61
- data/vendor/libgit2/src/idxmap.h +153 -31
- data/vendor/libgit2/src/ignore.c +38 -42
- data/vendor/libgit2/src/index.c +264 -199
- data/vendor/libgit2/src/index.h +7 -1
- data/vendor/libgit2/src/indexer.c +338 -167
- data/vendor/libgit2/src/integer.h +71 -26
- data/vendor/libgit2/src/iterator.c +134 -62
- data/vendor/libgit2/src/iterator.h +15 -0
- data/vendor/libgit2/src/mailmap.c +8 -8
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +137 -93
- data/vendor/libgit2/src/merge_driver.c +11 -11
- data/vendor/libgit2/src/merge_file.c +2 -2
- data/vendor/libgit2/src/mwindow.c +24 -29
- data/vendor/libgit2/src/mwindow.h +4 -4
- data/vendor/libgit2/src/net.c +184 -0
- data/vendor/libgit2/src/net.h +36 -0
- data/vendor/libgit2/src/netops.c +55 -156
- data/vendor/libgit2/src/netops.h +3 -23
- data/vendor/libgit2/src/notes.c +14 -9
- data/vendor/libgit2/src/object.c +120 -69
- data/vendor/libgit2/src/object.h +22 -9
- data/vendor/libgit2/src/object_api.c +8 -8
- data/vendor/libgit2/src/odb.c +111 -88
- data/vendor/libgit2/src/odb.h +8 -7
- data/vendor/libgit2/src/odb_loose.c +58 -47
- data/vendor/libgit2/src/odb_mempack.c +21 -34
- data/vendor/libgit2/src/odb_pack.c +17 -13
- data/vendor/libgit2/src/offmap.c +53 -35
- data/vendor/libgit2/src/offmap.h +108 -21
- data/vendor/libgit2/src/oid.c +12 -7
- data/vendor/libgit2/src/oidmap.c +49 -47
- data/vendor/libgit2/src/oidmap.h +101 -24
- data/vendor/libgit2/src/pack-objects.c +87 -86
- data/vendor/libgit2/src/pack-objects.h +2 -8
- data/vendor/libgit2/src/pack.c +94 -96
- data/vendor/libgit2/src/pack.h +16 -18
- data/vendor/libgit2/src/parse.c +17 -4
- data/vendor/libgit2/src/parse.h +3 -3
- data/vendor/libgit2/src/patch.c +3 -3
- data/vendor/libgit2/src/patch_generate.c +18 -18
- data/vendor/libgit2/src/patch_parse.c +147 -79
- data/vendor/libgit2/src/path.c +207 -62
- data/vendor/libgit2/src/path.h +14 -0
- data/vendor/libgit2/src/pathspec.c +18 -18
- data/vendor/libgit2/src/pool.c +26 -22
- data/vendor/libgit2/src/pool.h +7 -7
- data/vendor/libgit2/src/posix.c +10 -10
- data/vendor/libgit2/src/posix.h +12 -1
- data/vendor/libgit2/src/proxy.c +8 -3
- data/vendor/libgit2/src/push.c +35 -29
- data/vendor/libgit2/src/push.h +2 -1
- data/vendor/libgit2/src/reader.c +265 -0
- data/vendor/libgit2/src/reader.h +107 -0
- data/vendor/libgit2/src/rebase.c +97 -38
- data/vendor/libgit2/src/refdb.c +15 -3
- data/vendor/libgit2/src/refdb_fs.c +318 -222
- data/vendor/libgit2/src/reflog.c +13 -15
- data/vendor/libgit2/src/refs.c +122 -89
- data/vendor/libgit2/src/refs.h +5 -3
- data/vendor/libgit2/src/refspec.c +27 -33
- data/vendor/libgit2/src/regexp.c +221 -0
- data/vendor/libgit2/src/regexp.h +97 -0
- data/vendor/libgit2/src/remote.c +229 -178
- data/vendor/libgit2/src/remote.h +11 -2
- data/vendor/libgit2/src/repository.c +227 -172
- data/vendor/libgit2/src/repository.h +52 -40
- data/vendor/libgit2/src/reset.c +7 -7
- data/vendor/libgit2/src/revert.c +11 -6
- data/vendor/libgit2/src/revparse.c +46 -46
- data/vendor/libgit2/src/revwalk.c +89 -54
- data/vendor/libgit2/src/revwalk.h +20 -0
- data/vendor/libgit2/src/settings.c +22 -9
- data/vendor/libgit2/src/signature.c +15 -13
- data/vendor/libgit2/src/sortedcache.c +22 -36
- data/vendor/libgit2/src/sortedcache.h +1 -1
- data/vendor/libgit2/src/stash.c +56 -76
- data/vendor/libgit2/src/status.c +27 -21
- data/vendor/libgit2/src/stream.h +17 -2
- data/vendor/libgit2/src/streams/mbedtls.c +100 -80
- data/vendor/libgit2/src/streams/mbedtls.h +5 -2
- data/vendor/libgit2/src/streams/openssl.c +93 -81
- data/vendor/libgit2/src/streams/openssl.h +5 -2
- data/vendor/libgit2/src/streams/registry.c +118 -0
- data/vendor/libgit2/src/streams/registry.h +19 -0
- data/vendor/libgit2/src/streams/socket.c +55 -30
- data/vendor/libgit2/src/streams/stransport.c +57 -32
- data/vendor/libgit2/src/streams/stransport.h +5 -0
- data/vendor/libgit2/src/streams/tls.c +48 -20
- data/vendor/libgit2/src/streams/tls.h +12 -4
- data/vendor/libgit2/src/strmap.c +47 -74
- data/vendor/libgit2/src/strmap.h +108 -33
- data/vendor/libgit2/src/submodule.c +190 -169
- data/vendor/libgit2/src/submodule.h +1 -1
- data/vendor/libgit2/src/sysdir.c +25 -15
- data/vendor/libgit2/src/tag.c +39 -26
- data/vendor/libgit2/src/tag.h +2 -1
- data/vendor/libgit2/src/trace.c +2 -2
- data/vendor/libgit2/src/trace.h +2 -2
- data/vendor/libgit2/src/trailer.c +46 -32
- data/vendor/libgit2/src/transaction.c +30 -29
- data/vendor/libgit2/src/transport.c +3 -3
- data/vendor/libgit2/src/transports/auth.c +14 -10
- data/vendor/libgit2/src/transports/auth.h +10 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +31 -16
- data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
- data/vendor/libgit2/src/transports/auth_ntlm.c +223 -0
- data/vendor/libgit2/src/transports/auth_ntlm.h +35 -0
- data/vendor/libgit2/src/transports/cred.c +24 -24
- data/vendor/libgit2/src/transports/git.c +25 -30
- data/vendor/libgit2/src/transports/http.c +871 -335
- data/vendor/libgit2/src/transports/http.h +2 -0
- data/vendor/libgit2/src/transports/local.c +28 -28
- data/vendor/libgit2/src/transports/smart.c +64 -46
- data/vendor/libgit2/src/transports/smart.h +5 -6
- data/vendor/libgit2/src/transports/smart_pkt.c +162 -151
- data/vendor/libgit2/src/transports/smart_protocol.c +64 -94
- data/vendor/libgit2/src/transports/ssh.c +76 -65
- data/vendor/libgit2/src/transports/winhttp.c +328 -319
- data/vendor/libgit2/src/tree-cache.c +21 -14
- data/vendor/libgit2/src/tree.c +119 -112
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/unix/map.c +3 -3
- data/vendor/libgit2/src/unix/posix.h +1 -11
- data/vendor/libgit2/src/userdiff.h +3 -1
- data/vendor/libgit2/src/util.c +154 -93
- data/vendor/libgit2/src/util.h +19 -23
- data/vendor/libgit2/src/vector.c +15 -10
- data/vendor/libgit2/src/wildmatch.c +320 -0
- data/vendor/libgit2/src/wildmatch.h +23 -0
- data/vendor/libgit2/src/win32/dir.c +3 -3
- data/vendor/libgit2/src/win32/findfile.c +1 -1
- data/vendor/libgit2/src/win32/map.c +9 -11
- data/vendor/libgit2/src/win32/msvc-compat.h +6 -0
- data/vendor/libgit2/src/win32/path_w32.c +113 -9
- data/vendor/libgit2/src/win32/path_w32.h +18 -29
- data/vendor/libgit2/src/win32/posix.h +1 -4
- data/vendor/libgit2/src/win32/posix_w32.c +69 -44
- data/vendor/libgit2/src/win32/precompiled.h +0 -2
- data/vendor/libgit2/src/win32/thread.c +5 -10
- data/vendor/libgit2/src/win32/w32_buffer.c +9 -5
- data/vendor/libgit2/src/win32/w32_common.h +39 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -95
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -2
- data/vendor/libgit2/src/win32/w32_stack.c +6 -11
- data/vendor/libgit2/src/win32/w32_stack.h +3 -3
- data/vendor/libgit2/src/win32/w32_util.c +27 -64
- data/vendor/libgit2/src/win32/w32_util.h +5 -49
- data/vendor/libgit2/src/worktree.c +44 -30
- data/vendor/libgit2/src/xdiff/xdiffi.c +5 -5
- data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +27 -15
- data/vendor/libgit2/src/xdiff/xpatience.c +3 -0
- data/vendor/libgit2/src/zstream.c +4 -4
- metadata +115 -38
- data/vendor/libgit2/deps/regex/CMakeLists.txt +0 -2
- data/vendor/libgit2/deps/regex/config.h +0 -7
- data/vendor/libgit2/deps/regex/regcomp.c +0 -3857
- data/vendor/libgit2/deps/regex/regex.c +0 -92
- data/vendor/libgit2/deps/regex/regex.h +0 -582
- data/vendor/libgit2/deps/regex/regex_internal.c +0 -1744
- data/vendor/libgit2/deps/regex/regex_internal.h +0 -819
- data/vendor/libgit2/deps/regex/regexec.c +0 -4369
- data/vendor/libgit2/include/git2/inttypes.h +0 -309
- data/vendor/libgit2/include/git2/sys/time.h +0 -31
- data/vendor/libgit2/libgit2.pc.in +0 -13
- data/vendor/libgit2/src/config_file.h +0 -73
- data/vendor/libgit2/src/fnmatch.c +0 -248
- data/vendor/libgit2/src/fnmatch.h +0 -48
- data/vendor/libgit2/src/hash/hash_collisiondetect.h +0 -47
- data/vendor/libgit2/src/hash/hash_openssl.h +0 -59
- data/vendor/libgit2/src/streams/curl.c +0 -385
- data/vendor/libgit2/src/streams/curl.h +0 -17
- /data/vendor/libgit2/deps/http-parser/{LICENSE-MIT → COPYING} +0 -0
- /data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/sha1.h +0 -0
- /data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/ubc_check.c +0 -0
- /data/vendor/libgit2/src/hash/{sha1dc → sha1/sha1dc}/ubc_check.h +0 -0
|
@@ -16,50 +16,6 @@
|
|
|
16
16
|
/**
|
|
17
17
|
* @file git2/diff.h
|
|
18
18
|
* @brief Git tree and file differencing routines.
|
|
19
|
-
*
|
|
20
|
-
* Overview
|
|
21
|
-
* --------
|
|
22
|
-
*
|
|
23
|
-
* Calculating diffs is generally done in two phases: building a list of
|
|
24
|
-
* diffs then traversing it. This makes is easier to share logic across
|
|
25
|
-
* the various types of diffs (tree vs tree, workdir vs index, etc.), and
|
|
26
|
-
* also allows you to insert optional diff post-processing phases,
|
|
27
|
-
* such as rename detection, in between the steps. When you are done with
|
|
28
|
-
* a diff object, it must be freed.
|
|
29
|
-
*
|
|
30
|
-
* Terminology
|
|
31
|
-
* -----------
|
|
32
|
-
*
|
|
33
|
-
* To understand the diff APIs, you should know the following terms:
|
|
34
|
-
*
|
|
35
|
-
* - A `diff` represents the cumulative list of differences between two
|
|
36
|
-
* snapshots of a repository (possibly filtered by a set of file name
|
|
37
|
-
* patterns). This is the `git_diff` object.
|
|
38
|
-
*
|
|
39
|
-
* - A `delta` is a file pair with an old and new revision. The old version
|
|
40
|
-
* may be absent if the file was just created and the new version may be
|
|
41
|
-
* absent if the file was deleted. A diff is mostly just a list of deltas.
|
|
42
|
-
*
|
|
43
|
-
* - A `binary` file / delta is a file (or pair) for which no text diffs
|
|
44
|
-
* should be generated. A diff can contain delta entries that are
|
|
45
|
-
* binary, but no diff content will be output for those files. There is
|
|
46
|
-
* a base heuristic for binary detection and you can further tune the
|
|
47
|
-
* behavior with git attributes or diff flags and option settings.
|
|
48
|
-
*
|
|
49
|
-
* - A `hunk` is a span of modified lines in a delta along with some stable
|
|
50
|
-
* surrounding context. You can configure the amount of context and other
|
|
51
|
-
* properties of how hunks are generated. Each hunk also comes with a
|
|
52
|
-
* header that described where it starts and ends in both the old and new
|
|
53
|
-
* versions in the delta.
|
|
54
|
-
*
|
|
55
|
-
* - A `line` is a range of characters inside a hunk. It could be a context
|
|
56
|
-
* line (i.e. in both old and new versions), an added line (i.e. only in
|
|
57
|
-
* the new version), or a removed line (i.e. only in the old version).
|
|
58
|
-
* Unfortunately, we don't know anything about the encoding of data in the
|
|
59
|
-
* file being diffed, so we cannot tell you much about the line content.
|
|
60
|
-
* Line data will not be NUL-byte terminated, however, because it will be
|
|
61
|
-
* just a span of bytes inside the larger file.
|
|
62
|
-
*
|
|
63
19
|
* @ingroup Git
|
|
64
20
|
* @{
|
|
65
21
|
*/
|
|
@@ -163,7 +119,7 @@ typedef enum {
|
|
|
163
119
|
|
|
164
120
|
/** Include unreadable files in the diff */
|
|
165
121
|
GIT_DIFF_INCLUDE_UNREADABLE = (1u << 16),
|
|
166
|
-
|
|
122
|
+
|
|
167
123
|
/** Include unreadable files in the diff */
|
|
168
124
|
GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 17),
|
|
169
125
|
|
|
@@ -217,10 +173,22 @@ typedef enum {
|
|
|
217
173
|
/**
|
|
218
174
|
* The diff object that contains all individual file deltas.
|
|
219
175
|
*
|
|
176
|
+
* A `diff` represents the cumulative list of differences between two
|
|
177
|
+
* snapshots of a repository (possibly filtered by a set of file name
|
|
178
|
+
* patterns).
|
|
179
|
+
*
|
|
180
|
+
* Calculating diffs is generally done in two phases: building a list of
|
|
181
|
+
* diffs then traversing it. This makes is easier to share logic across
|
|
182
|
+
* the various types of diffs (tree vs tree, workdir vs index, etc.), and
|
|
183
|
+
* also allows you to insert optional diff post-processing phases,
|
|
184
|
+
* such as rename detection, in between the steps. When you are done with
|
|
185
|
+
* a diff object, it must be freed.
|
|
186
|
+
*
|
|
220
187
|
* This is an opaque structure which will be allocated by one of the diff
|
|
221
|
-
* generator functions below (such as `git_diff_tree_to_tree`).
|
|
188
|
+
* generator functions below (such as `git_diff_tree_to_tree`). You are
|
|
222
189
|
* responsible for releasing the object memory when done, using the
|
|
223
190
|
* `git_diff_free()` function.
|
|
191
|
+
*
|
|
224
192
|
*/
|
|
225
193
|
typedef struct git_diff git_diff;
|
|
226
194
|
|
|
@@ -290,17 +258,21 @@ typedef enum {
|
|
|
290
258
|
* abbreviated to something reasonable, like 7 characters.
|
|
291
259
|
*/
|
|
292
260
|
typedef struct {
|
|
293
|
-
git_oid
|
|
294
|
-
const char
|
|
295
|
-
|
|
296
|
-
uint32_t
|
|
297
|
-
uint16_t
|
|
298
|
-
uint16_t
|
|
261
|
+
git_oid id;
|
|
262
|
+
const char *path;
|
|
263
|
+
git_object_size_t size;
|
|
264
|
+
uint32_t flags;
|
|
265
|
+
uint16_t mode;
|
|
266
|
+
uint16_t id_abbrev;
|
|
299
267
|
} git_diff_file;
|
|
300
268
|
|
|
301
269
|
/**
|
|
302
270
|
* Description of changes to one entry.
|
|
303
271
|
*
|
|
272
|
+
* A `delta` is a file pair with an old and new revision. The old version
|
|
273
|
+
* may be absent if the file was just created and the new version may be
|
|
274
|
+
* absent if the file was deleted. A diff is mostly just a list of deltas.
|
|
275
|
+
*
|
|
304
276
|
* When iterating over a diff, this will be passed to most callbacks and
|
|
305
277
|
* you can use the contents to understand exactly what has changed.
|
|
306
278
|
*
|
|
@@ -346,7 +318,7 @@ typedef struct {
|
|
|
346
318
|
/**
|
|
347
319
|
* Diff notification callback function.
|
|
348
320
|
*
|
|
349
|
-
* The callback will be called for each file, just before the `
|
|
321
|
+
* The callback will be called for each file, just before the `git_diff_delta`
|
|
350
322
|
* gets inserted into the diff.
|
|
351
323
|
*
|
|
352
324
|
* When the callback:
|
|
@@ -356,7 +328,7 @@ typedef struct {
|
|
|
356
328
|
* - returns 0, the delta is inserted into the diff, and the diff process
|
|
357
329
|
* continues.
|
|
358
330
|
*/
|
|
359
|
-
typedef int (
|
|
331
|
+
typedef int GIT_CALLBACK(git_diff_notify_cb)(
|
|
360
332
|
const git_diff *diff_so_far,
|
|
361
333
|
const git_diff_delta *delta_to_add,
|
|
362
334
|
const char *matched_pathspec,
|
|
@@ -372,7 +344,7 @@ typedef int (*git_diff_notify_cb)(
|
|
|
372
344
|
* @param new_path The path to the new file or NULL.
|
|
373
345
|
* @return Non-zero to abort the diff.
|
|
374
346
|
*/
|
|
375
|
-
typedef int (
|
|
347
|
+
typedef int GIT_CALLBACK(git_diff_progress_cb)(
|
|
376
348
|
const git_diff *diff_so_far,
|
|
377
349
|
const char *old_path,
|
|
378
350
|
const char *new_path,
|
|
@@ -385,46 +357,79 @@ typedef int (*git_diff_progress_cb)(
|
|
|
385
357
|
* values. Similarly, passing NULL for the options structure will
|
|
386
358
|
* give the defaults. The default values are marked below.
|
|
387
359
|
*
|
|
388
|
-
* - `flags` is a combination of the `git_diff_option_t` values above
|
|
389
|
-
* - `context_lines` is the number of unchanged lines that define the
|
|
390
|
-
* boundary of a hunk (and to display before and after)
|
|
391
|
-
* - `interhunk_lines` is the maximum number of unchanged lines between
|
|
392
|
-
* hunk boundaries before the hunks will be merged into a one.
|
|
393
|
-
* - `old_prefix` is the virtual "directory" to prefix to old file names
|
|
394
|
-
* in hunk headers (default "a")
|
|
395
|
-
* - `new_prefix` is the virtual "directory" to prefix to new file names
|
|
396
|
-
* in hunk headers (default "b")
|
|
397
|
-
* - `pathspec` is an array of paths / fnmatch patterns to constrain diff
|
|
398
|
-
* - `max_size` is a file size (in bytes) above which a blob will be marked
|
|
399
|
-
* as binary automatically; pass a negative value to disable.
|
|
400
|
-
* - `notify_cb` is an optional callback function, notifying the consumer of
|
|
401
|
-
* changes to the diff as new deltas are added.
|
|
402
|
-
* - `progress_cb` is an optional callback function, notifying the consumer of
|
|
403
|
-
* which files are being examined as the diff is generated.
|
|
404
|
-
* - `payload` is the payload to pass to the callback functions.
|
|
405
|
-
* - `ignore_submodules` overrides the submodule ignore setting for all
|
|
406
|
-
* submodules in the diff.
|
|
407
360
|
*/
|
|
408
361
|
typedef struct {
|
|
409
362
|
unsigned int version; /**< version for the struct */
|
|
410
|
-
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* A combination of `git_diff_option_t` values above.
|
|
366
|
+
* Defaults to GIT_DIFF_NORMAL
|
|
367
|
+
*/
|
|
368
|
+
uint32_t flags;
|
|
411
369
|
|
|
412
370
|
/* options controlling which files are in the diff */
|
|
413
371
|
|
|
414
|
-
|
|
415
|
-
|
|
372
|
+
/** Overrides the submodule ignore setting for all submodules in the diff. */
|
|
373
|
+
git_submodule_ignore_t ignore_submodules;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* An array of paths / fnmatch patterns to constrain diff.
|
|
377
|
+
* All paths are included by default.
|
|
378
|
+
*/
|
|
379
|
+
git_strarray pathspec;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* An optional callback function, notifying the consumer of changes to
|
|
383
|
+
* the diff as new deltas are added.
|
|
384
|
+
*/
|
|
416
385
|
git_diff_notify_cb notify_cb;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* An optional callback function, notifying the consumer of which files
|
|
389
|
+
* are being examined as the diff is generated.
|
|
390
|
+
*/
|
|
417
391
|
git_diff_progress_cb progress_cb;
|
|
392
|
+
|
|
393
|
+
/** The payload to pass to the callback functions. */
|
|
418
394
|
void *payload;
|
|
419
395
|
|
|
420
396
|
/* options controlling how to diff text is generated */
|
|
421
397
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
398
|
+
/**
|
|
399
|
+
* The number of unchanged lines that define the boundary of a hunk
|
|
400
|
+
* (and to display before and after). Defaults to 3.
|
|
401
|
+
*/
|
|
402
|
+
uint32_t context_lines;
|
|
403
|
+
/**
|
|
404
|
+
* The maximum number of unchanged lines between hunk boundaries before
|
|
405
|
+
* the hunks will be merged into one. Defaults to 0.
|
|
406
|
+
*/
|
|
407
|
+
uint32_t interhunk_lines;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* The abbreviation length to use when formatting object ids.
|
|
411
|
+
* Defaults to the value of 'core.abbrev' from the config, or 7 if unset.
|
|
412
|
+
*/
|
|
413
|
+
uint16_t id_abbrev;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* A size (in bytes) above which a blob will be marked as binary
|
|
417
|
+
* automatically; pass a negative value to disable.
|
|
418
|
+
* Defaults to 512MB.
|
|
419
|
+
*/
|
|
420
|
+
git_off_t max_size;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The virtual "directory" prefix for old file names in hunk headers.
|
|
424
|
+
* Default is "a".
|
|
425
|
+
*/
|
|
426
|
+
const char *old_prefix;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The virtual "directory" prefix for new file names in hunk headers.
|
|
430
|
+
* Defaults to "b".
|
|
431
|
+
*/
|
|
432
|
+
const char *new_prefix;
|
|
428
433
|
} git_diff_options;
|
|
429
434
|
|
|
430
435
|
/* The current version of the diff options structure */
|
|
@@ -446,7 +451,7 @@ typedef struct {
|
|
|
446
451
|
* @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`.
|
|
447
452
|
* @return Zero on success; -1 on failure.
|
|
448
453
|
*/
|
|
449
|
-
GIT_EXTERN(int)
|
|
454
|
+
GIT_EXTERN(int) git_diff_options_init(
|
|
450
455
|
git_diff_options *opts,
|
|
451
456
|
unsigned int version);
|
|
452
457
|
|
|
@@ -457,7 +462,7 @@ GIT_EXTERN(int) git_diff_init_options(
|
|
|
457
462
|
* @param progress Goes from 0 to 1 over the diff
|
|
458
463
|
* @param payload User-specified pointer from foreach function
|
|
459
464
|
*/
|
|
460
|
-
typedef int (
|
|
465
|
+
typedef int GIT_CALLBACK(git_diff_file_cb)(
|
|
461
466
|
const git_diff_delta *delta,
|
|
462
467
|
float progress,
|
|
463
468
|
void *payload);
|
|
@@ -496,12 +501,21 @@ typedef struct {
|
|
|
496
501
|
size_t inflatedlen;
|
|
497
502
|
} git_diff_binary_file;
|
|
498
503
|
|
|
499
|
-
/**
|
|
504
|
+
/**
|
|
505
|
+
* Structure describing the binary contents of a diff.
|
|
506
|
+
*
|
|
507
|
+
* A `binary` file / delta is a file (or pair) for which no text diffs
|
|
508
|
+
* should be generated. A diff can contain delta entries that are
|
|
509
|
+
* binary, but no diff content will be output for those files. There is
|
|
510
|
+
* a base heuristic for binary detection and you can further tune the
|
|
511
|
+
* behavior with git attributes or diff flags and option settings.
|
|
512
|
+
*/
|
|
500
513
|
typedef struct {
|
|
501
514
|
/**
|
|
502
|
-
* Whether there is data in this binary structure or not.
|
|
503
|
-
*
|
|
504
|
-
* this is `
|
|
515
|
+
* Whether there is data in this binary structure or not.
|
|
516
|
+
*
|
|
517
|
+
* If this is `1`, then this was produced and included binary content.
|
|
518
|
+
* If this is `0` then this was generated knowing only that a binary
|
|
505
519
|
* file changed but without providing the data, probably from a patch
|
|
506
520
|
* that said `Binary files a/file.txt and b/file.txt differ`.
|
|
507
521
|
*/
|
|
@@ -511,16 +525,22 @@ typedef struct {
|
|
|
511
525
|
} git_diff_binary;
|
|
512
526
|
|
|
513
527
|
/**
|
|
514
|
-
* When iterating over a diff, callback that will be made for
|
|
515
|
-
* binary content within the diff.
|
|
516
|
-
*/
|
|
517
|
-
typedef int(
|
|
528
|
+
* When iterating over a diff, callback that will be made for
|
|
529
|
+
* binary content within the diff.
|
|
530
|
+
*/
|
|
531
|
+
typedef int GIT_CALLBACK(git_diff_binary_cb)(
|
|
518
532
|
const git_diff_delta *delta,
|
|
519
533
|
const git_diff_binary *binary,
|
|
520
534
|
void *payload);
|
|
521
535
|
|
|
522
536
|
/**
|
|
523
537
|
* Structure describing a hunk of a diff.
|
|
538
|
+
*
|
|
539
|
+
* A `hunk` is a span of modified lines in a delta along with some stable
|
|
540
|
+
* surrounding context. You can configure the amount of context and other
|
|
541
|
+
* properties of how hunks are generated. Each hunk also comes with a
|
|
542
|
+
* header that described where it starts and ends in both the old and new
|
|
543
|
+
* versions in the delta.
|
|
524
544
|
*/
|
|
525
545
|
typedef struct {
|
|
526
546
|
int old_start; /**< Starting line number in old_file */
|
|
@@ -534,7 +554,7 @@ typedef struct {
|
|
|
534
554
|
/**
|
|
535
555
|
* When iterating over a diff, callback that will be made per hunk.
|
|
536
556
|
*/
|
|
537
|
-
typedef int (
|
|
557
|
+
typedef int GIT_CALLBACK(git_diff_hunk_cb)(
|
|
538
558
|
const git_diff_delta *delta,
|
|
539
559
|
const git_diff_hunk *hunk,
|
|
540
560
|
void *payload);
|
|
@@ -568,6 +588,14 @@ typedef enum {
|
|
|
568
588
|
|
|
569
589
|
/**
|
|
570
590
|
* Structure describing a line (or data span) of a diff.
|
|
591
|
+
*
|
|
592
|
+
* A `line` is a range of characters inside a hunk. It could be a context
|
|
593
|
+
* line (i.e. in both old and new versions), an added line (i.e. only in
|
|
594
|
+
* the new version), or a removed line (i.e. only in the old version).
|
|
595
|
+
* Unfortunately, we don't know anything about the encoding of data in the
|
|
596
|
+
* file being diffed, so we cannot tell you much about the line content.
|
|
597
|
+
* Line data will not be NUL-byte terminated, however, because it will be
|
|
598
|
+
* just a span of bytes inside the larger file.
|
|
571
599
|
*/
|
|
572
600
|
typedef struct {
|
|
573
601
|
char origin; /**< A git_diff_line_t value */
|
|
@@ -587,7 +615,7 @@ typedef struct {
|
|
|
587
615
|
* of text. This uses some extra GIT_DIFF_LINE_... constants for output
|
|
588
616
|
* of lines of file and hunk headers.
|
|
589
617
|
*/
|
|
590
|
-
typedef int (
|
|
618
|
+
typedef int GIT_CALLBACK(git_diff_line_cb)(
|
|
591
619
|
const git_diff_delta *delta, /**< delta that contains this data */
|
|
592
620
|
const git_diff_hunk *hunk, /**< hunk containing this data */
|
|
593
621
|
const git_diff_line *line, /**< line data */
|
|
@@ -671,14 +699,14 @@ typedef enum {
|
|
|
671
699
|
* Pluggable similarity metric
|
|
672
700
|
*/
|
|
673
701
|
typedef struct {
|
|
674
|
-
int (
|
|
702
|
+
int GIT_CALLBACK(file_signature)(
|
|
675
703
|
void **out, const git_diff_file *file,
|
|
676
704
|
const char *fullpath, void *payload);
|
|
677
|
-
int (
|
|
705
|
+
int GIT_CALLBACK(buffer_signature)(
|
|
678
706
|
void **out, const git_diff_file *file,
|
|
679
707
|
const char *buf, size_t buflen, void *payload);
|
|
680
|
-
void (
|
|
681
|
-
int (
|
|
708
|
+
void GIT_CALLBACK(free_signature)(void *sig, void *payload);
|
|
709
|
+
int GIT_CALLBACK(similarity)(int *score, void *siga, void *sigb, void *payload);
|
|
682
710
|
void *payload;
|
|
683
711
|
} git_diff_similarity_metric;
|
|
684
712
|
|
|
@@ -686,21 +714,6 @@ typedef struct {
|
|
|
686
714
|
* Control behavior of rename and copy detection
|
|
687
715
|
*
|
|
688
716
|
* These options mostly mimic parameters that can be passed to git-diff.
|
|
689
|
-
*
|
|
690
|
-
* - `rename_threshold` is the same as the -M option with a value
|
|
691
|
-
* - `copy_threshold` is the same as the -C option with a value
|
|
692
|
-
* - `rename_from_rewrite_threshold` matches the top of the -B option
|
|
693
|
-
* - `break_rewrite_threshold` matches the bottom of the -B option
|
|
694
|
-
* - `rename_limit` is the maximum number of matches to consider for
|
|
695
|
-
* a particular file. This is a little different from the `-l` option
|
|
696
|
-
* to regular Git because we will still process up to this many matches
|
|
697
|
-
* before abandoning the search.
|
|
698
|
-
*
|
|
699
|
-
* The `metric` option allows you to plug in a custom similarity metric.
|
|
700
|
-
* Set it to NULL for the default internal metric which is based on sampling
|
|
701
|
-
* hashes of ranges of data in the file. The default metric is a pretty
|
|
702
|
-
* good similarity approximation that should work fairly well for both text
|
|
703
|
-
* and binary data, and is pretty fast with fixed memory overhead.
|
|
704
717
|
*/
|
|
705
718
|
typedef struct {
|
|
706
719
|
unsigned int version;
|
|
@@ -712,21 +725,49 @@ typedef struct {
|
|
|
712
725
|
*/
|
|
713
726
|
uint32_t flags;
|
|
714
727
|
|
|
715
|
-
/**
|
|
728
|
+
/**
|
|
729
|
+
* Threshold above which similar files will be considered renames.
|
|
730
|
+
* This is equivalent to the -M option. Defaults to 50.
|
|
731
|
+
*/
|
|
716
732
|
uint16_t rename_threshold;
|
|
717
|
-
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Threshold below which similar files will be eligible to be a rename source.
|
|
736
|
+
* This is equivalent to the first part of the -B option. Defaults to 50.
|
|
737
|
+
*/
|
|
718
738
|
uint16_t rename_from_rewrite_threshold;
|
|
719
|
-
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Threshold above which similar files will be considered copies.
|
|
742
|
+
* This is equivalent to the -C option. Defaults to 50.
|
|
743
|
+
*/
|
|
720
744
|
uint16_t copy_threshold;
|
|
721
|
-
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Treshold below which similar files will be split into a delete/add pair.
|
|
748
|
+
* This is equivalent to the last part of the -B option. Defaults to 60.
|
|
749
|
+
*/
|
|
722
750
|
uint16_t break_rewrite_threshold;
|
|
723
751
|
|
|
724
|
-
/**
|
|
725
|
-
*
|
|
752
|
+
/**
|
|
753
|
+
* Maximum number of matches to consider for a particular file.
|
|
754
|
+
*
|
|
755
|
+
* This is a little different from the `-l` option from Git because we
|
|
756
|
+
* will still process up to this many matches before abandoning the search.
|
|
757
|
+
* Defaults to 200.
|
|
726
758
|
*/
|
|
727
759
|
size_t rename_limit;
|
|
728
760
|
|
|
729
|
-
/**
|
|
761
|
+
/**
|
|
762
|
+
* The `metric` option allows you to plug in a custom similarity metric.
|
|
763
|
+
*
|
|
764
|
+
* Set it to NULL to use the default internal metric.
|
|
765
|
+
*
|
|
766
|
+
* The default metric is based on sampling hashes of ranges of data in
|
|
767
|
+
* the file, which is a pretty good similarity approximation that should
|
|
768
|
+
* work fairly well for both text and binary data while still being
|
|
769
|
+
* pretty fast with a fixed memory overhead.
|
|
770
|
+
*/
|
|
730
771
|
git_diff_similarity_metric *metric;
|
|
731
772
|
} git_diff_find_options;
|
|
732
773
|
|
|
@@ -743,7 +784,7 @@ typedef struct {
|
|
|
743
784
|
* @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`.
|
|
744
785
|
* @return Zero on success; -1 on failure.
|
|
745
786
|
*/
|
|
746
|
-
GIT_EXTERN(int)
|
|
787
|
+
GIT_EXTERN(int) git_diff_find_options_init(
|
|
747
788
|
git_diff_find_options *opts,
|
|
748
789
|
unsigned int version);
|
|
749
790
|
|
|
@@ -782,7 +823,7 @@ GIT_EXTERN(int) git_diff_tree_to_tree(
|
|
|
782
823
|
git_repository *repo,
|
|
783
824
|
git_tree *old_tree,
|
|
784
825
|
git_tree *new_tree,
|
|
785
|
-
const git_diff_options *opts);
|
|
826
|
+
const git_diff_options *opts);
|
|
786
827
|
|
|
787
828
|
/**
|
|
788
829
|
* Create a diff between a tree and repository index.
|
|
@@ -808,7 +849,7 @@ GIT_EXTERN(int) git_diff_tree_to_index(
|
|
|
808
849
|
git_repository *repo,
|
|
809
850
|
git_tree *old_tree,
|
|
810
851
|
git_index *index,
|
|
811
|
-
const git_diff_options *opts);
|
|
852
|
+
const git_diff_options *opts);
|
|
812
853
|
|
|
813
854
|
/**
|
|
814
855
|
* Create a diff between the repository index and the workdir directory.
|
|
@@ -834,7 +875,7 @@ GIT_EXTERN(int) git_diff_index_to_workdir(
|
|
|
834
875
|
git_diff **diff,
|
|
835
876
|
git_repository *repo,
|
|
836
877
|
git_index *index,
|
|
837
|
-
const git_diff_options *opts);
|
|
878
|
+
const git_diff_options *opts);
|
|
838
879
|
|
|
839
880
|
/**
|
|
840
881
|
* Create a diff between a tree and the working directory.
|
|
@@ -863,7 +904,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir(
|
|
|
863
904
|
git_diff **diff,
|
|
864
905
|
git_repository *repo,
|
|
865
906
|
git_tree *old_tree,
|
|
866
|
-
const git_diff_options *opts);
|
|
907
|
+
const git_diff_options *opts);
|
|
867
908
|
|
|
868
909
|
/**
|
|
869
910
|
* Create a diff between a tree and the working directory using index data
|
|
@@ -882,7 +923,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
|
|
|
882
923
|
git_diff **diff,
|
|
883
924
|
git_repository *repo,
|
|
884
925
|
git_tree *old_tree,
|
|
885
|
-
const git_diff_options *opts);
|
|
926
|
+
const git_diff_options *opts);
|
|
886
927
|
|
|
887
928
|
/**
|
|
888
929
|
* Create a diff with the difference between two index objects.
|
|
@@ -901,7 +942,7 @@ GIT_EXTERN(int) git_diff_index_to_index(
|
|
|
901
942
|
git_repository *repo,
|
|
902
943
|
git_index *old_index,
|
|
903
944
|
git_index *new_index,
|
|
904
|
-
const git_diff_options *opts);
|
|
945
|
+
const git_diff_options *opts);
|
|
905
946
|
|
|
906
947
|
/**
|
|
907
948
|
* Merge one diff into another.
|
|
@@ -1052,6 +1093,7 @@ typedef enum {
|
|
|
1052
1093
|
GIT_DIFF_FORMAT_RAW = 3u, /**< like git diff --raw */
|
|
1053
1094
|
GIT_DIFF_FORMAT_NAME_ONLY = 4u, /**< like git diff --name-only */
|
|
1054
1095
|
GIT_DIFF_FORMAT_NAME_STATUS = 5u, /**< like git diff --name-status */
|
|
1096
|
+
GIT_DIFF_FORMAT_PATCH_ID = 6u, /**< git diff as used by git patch-id */
|
|
1055
1097
|
} git_diff_format_t;
|
|
1056
1098
|
|
|
1057
1099
|
/**
|
|
@@ -1337,7 +1379,8 @@ typedef enum {
|
|
|
1337
1379
|
typedef struct {
|
|
1338
1380
|
unsigned int version;
|
|
1339
1381
|
|
|
1340
|
-
git_diff_format_email_flags_t
|
|
1382
|
+
/** see `git_diff_format_email_flags_t` above */
|
|
1383
|
+
uint32_t flags;
|
|
1341
1384
|
|
|
1342
1385
|
/** This patch number */
|
|
1343
1386
|
size_t patch_no;
|
|
@@ -1394,7 +1437,7 @@ GIT_EXTERN(int) git_diff_commit_as_email(
|
|
|
1394
1437
|
git_commit *commit,
|
|
1395
1438
|
size_t patch_no,
|
|
1396
1439
|
size_t total_patches,
|
|
1397
|
-
|
|
1440
|
+
uint32_t flags,
|
|
1398
1441
|
const git_diff_options *diff_opts);
|
|
1399
1442
|
|
|
1400
1443
|
/**
|
|
@@ -1407,7 +1450,7 @@ GIT_EXTERN(int) git_diff_commit_as_email(
|
|
|
1407
1450
|
* @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
|
|
1408
1451
|
* @return Zero on success; -1 on failure.
|
|
1409
1452
|
*/
|
|
1410
|
-
GIT_EXTERN(int)
|
|
1453
|
+
GIT_EXTERN(int) git_diff_format_email_options_init(
|
|
1411
1454
|
git_diff_format_email_options *opts,
|
|
1412
1455
|
unsigned int version);
|
|
1413
1456
|
|
|
@@ -1415,7 +1458,7 @@ GIT_EXTERN(int) git_diff_format_email_init_options(
|
|
|
1415
1458
|
* Patch ID options structure
|
|
1416
1459
|
*
|
|
1417
1460
|
* Initialize with `GIT_PATCHID_OPTIONS_INIT`. Alternatively, you can
|
|
1418
|
-
* use `
|
|
1461
|
+
* use `git_diff_patchid_options_init`.
|
|
1419
1462
|
*
|
|
1420
1463
|
*/
|
|
1421
1464
|
typedef struct git_diff_patchid_options {
|
|
@@ -1435,7 +1478,7 @@ typedef struct git_diff_patchid_options {
|
|
|
1435
1478
|
* @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`.
|
|
1436
1479
|
* @return Zero on success; -1 on failure.
|
|
1437
1480
|
*/
|
|
1438
|
-
GIT_EXTERN(int)
|
|
1481
|
+
GIT_EXTERN(int) git_diff_patchid_options_init(
|
|
1439
1482
|
git_diff_patchid_options *opts,
|
|
1440
1483
|
unsigned int version);
|
|
1441
1484
|
|
|
@@ -1451,8 +1494,7 @@ GIT_EXTERN(int) git_diff_patchid_init_options(
|
|
|
1451
1494
|
* defined in git-patch-id(1), and should in fact generate the
|
|
1452
1495
|
* same IDs as the upstream git project does.
|
|
1453
1496
|
*
|
|
1454
|
-
* @param out Pointer where the calculated patch ID
|
|
1455
|
-
* stored
|
|
1497
|
+
* @param out Pointer where the calculated patch ID should be stored
|
|
1456
1498
|
* @param diff The diff to calculate the ID for
|
|
1457
1499
|
* @param opts Options for how to calculate the patch ID. This is
|
|
1458
1500
|
* intended for future changes, as currently no options are
|