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
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
#include "diff.h"
|
11
11
|
#include "patch_generate.h"
|
12
|
-
#include "
|
12
|
+
#include "fileops.h"
|
13
13
|
#include "config.h"
|
14
14
|
#include "attr_file.h"
|
15
15
|
#include "filter.h"
|
@@ -179,7 +179,7 @@ static int diff_delta__from_one(
|
|
179
179
|
|
180
180
|
delta->old_file.flags |= GIT_DIFF_FLAG_VALID_ID;
|
181
181
|
|
182
|
-
if (has_old || !
|
182
|
+
if (has_old || !git_oid_iszero(&delta->new_file.id))
|
183
183
|
delta->new_file.flags |= GIT_DIFF_FLAG_VALID_ID;
|
184
184
|
|
185
185
|
return diff_insert_delta(diff, delta, matched_pathspec);
|
@@ -240,7 +240,7 @@ static int diff_delta__from_two(
|
|
240
240
|
delta->old_file.flags |= GIT_DIFF_FLAG_EXISTS;
|
241
241
|
delta->new_file.flags |= GIT_DIFF_FLAG_EXISTS;
|
242
242
|
|
243
|
-
if (!
|
243
|
+
if (!git_oid_iszero(&new_entry->id))
|
244
244
|
delta->new_file.flags |= GIT_DIFF_FLAG_VALID_ID;
|
245
245
|
}
|
246
246
|
|
@@ -472,17 +472,17 @@ static int diff_generated_apply_options(
|
|
472
472
|
if ((val = git_repository_config_snapshot(&cfg, repo)) < 0)
|
473
473
|
return val;
|
474
474
|
|
475
|
-
if (!
|
475
|
+
if (!git_config__cvar(&val, cfg, GIT_CVAR_SYMLINKS) && val)
|
476
476
|
diff->diffcaps |= GIT_DIFFCAPS_HAS_SYMLINKS;
|
477
477
|
|
478
|
-
if (!
|
478
|
+
if (!git_config__cvar(&val, cfg, GIT_CVAR_IGNORESTAT) && val)
|
479
479
|
diff->diffcaps |= GIT_DIFFCAPS_IGNORE_STAT;
|
480
480
|
|
481
481
|
if ((diff->base.opts.flags & GIT_DIFF_IGNORE_FILEMODE) == 0 &&
|
482
|
-
!
|
482
|
+
!git_config__cvar(&val, cfg, GIT_CVAR_FILEMODE) && val)
|
483
483
|
diff->diffcaps |= GIT_DIFFCAPS_TRUST_MODE_BITS;
|
484
484
|
|
485
|
-
if (!
|
485
|
+
if (!git_config__cvar(&val, cfg, GIT_CVAR_TRUSTCTIME) && val)
|
486
486
|
diff->diffcaps |= GIT_DIFFCAPS_TRUST_CTIME;
|
487
487
|
|
488
488
|
/* Don't set GIT_DIFFCAPS_USE_DEV - compile time option in core git */
|
@@ -560,11 +560,11 @@ int git_diff__oid_for_file(
|
|
560
560
|
git_diff *diff,
|
561
561
|
const char *path,
|
562
562
|
uint16_t mode,
|
563
|
-
|
563
|
+
git_off_t size)
|
564
564
|
{
|
565
565
|
git_index_entry entry;
|
566
566
|
|
567
|
-
if (size > UINT32_MAX) {
|
567
|
+
if (size < 0 || size > UINT32_MAX) {
|
568
568
|
git_error_set(GIT_ERROR_NOMEMORY, "file size overflow (for 32-bits) on '%s'", path);
|
569
569
|
return -1;
|
570
570
|
}
|
@@ -797,13 +797,13 @@ static int maybe_modified(
|
|
797
797
|
/* if oids and modes match (and are valid), then file is unmodified */
|
798
798
|
} else if (git_oid_equal(&oitem->id, &nitem->id) &&
|
799
799
|
omode == nmode &&
|
800
|
-
!
|
800
|
+
!git_oid_iszero(&oitem->id)) {
|
801
801
|
status = GIT_DELTA_UNMODIFIED;
|
802
802
|
|
803
803
|
/* if we have an unknown OID and a workdir iterator, then check some
|
804
804
|
* circumstances that can accelerate things or need special handling
|
805
805
|
*/
|
806
|
-
} else if (
|
806
|
+
} else if (git_oid_iszero(&nitem->id) && new_is_workdir) {
|
807
807
|
bool use_ctime =
|
808
808
|
((diff->diffcaps & GIT_DIFFCAPS_TRUST_CTIME) != 0);
|
809
809
|
git_index *index = git_iterator_index(info->new_iter);
|
@@ -843,7 +843,7 @@ static int maybe_modified(
|
|
843
843
|
/* if we got here and decided that the files are modified, but we
|
844
844
|
* haven't calculated the OID of the new item, then calculate it now
|
845
845
|
*/
|
846
|
-
if (modified_uncertain &&
|
846
|
+
if (modified_uncertain && git_oid_iszero(&nitem->id)) {
|
847
847
|
const git_oid *update_check =
|
848
848
|
DIFF_FLAG_IS_SET(diff, GIT_DIFF_UPDATE_INDEX) && omode == nmode ?
|
849
849
|
&oitem->id : NULL;
|
@@ -877,7 +877,7 @@ static int maybe_modified(
|
|
877
877
|
|
878
878
|
return diff_delta__from_two(
|
879
879
|
diff, status, oitem, omode, nitem, nmode,
|
880
|
-
|
880
|
+
git_oid_iszero(&noid) ? NULL : &noid, matched_pathspec);
|
881
881
|
}
|
882
882
|
|
883
883
|
static bool entry_is_prefixed(
|
@@ -1262,31 +1262,29 @@ cleanup:
|
|
1262
1262
|
return error;
|
1263
1263
|
}
|
1264
1264
|
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
a
|
1287
|
-
|
1288
|
-
return 0;
|
1289
|
-
}
|
1265
|
+
#define DIFF_FROM_ITERATORS(MAKE_FIRST, FLAGS_FIRST, MAKE_SECOND, FLAGS_SECOND) do { \
|
1266
|
+
git_iterator *a = NULL, *b = NULL; \
|
1267
|
+
char *pfx = (opts && !(opts->flags & GIT_DIFF_DISABLE_PATHSPEC_MATCH)) ? \
|
1268
|
+
git_pathspec_prefix(&opts->pathspec) : NULL; \
|
1269
|
+
git_iterator_options a_opts = GIT_ITERATOR_OPTIONS_INIT, \
|
1270
|
+
b_opts = GIT_ITERATOR_OPTIONS_INIT; \
|
1271
|
+
a_opts.flags = FLAGS_FIRST; \
|
1272
|
+
a_opts.start = pfx; \
|
1273
|
+
a_opts.end = pfx; \
|
1274
|
+
b_opts.flags = FLAGS_SECOND; \
|
1275
|
+
b_opts.start = pfx; \
|
1276
|
+
b_opts.end = pfx; \
|
1277
|
+
GIT_ERROR_CHECK_VERSION(opts, GIT_DIFF_OPTIONS_VERSION, "git_diff_options"); \
|
1278
|
+
if (opts && (opts->flags & GIT_DIFF_DISABLE_PATHSPEC_MATCH)) { \
|
1279
|
+
a_opts.pathlist.strings = opts->pathspec.strings; \
|
1280
|
+
a_opts.pathlist.count = opts->pathspec.count; \
|
1281
|
+
b_opts.pathlist.strings = opts->pathspec.strings; \
|
1282
|
+
b_opts.pathlist.count = opts->pathspec.count; \
|
1283
|
+
} \
|
1284
|
+
if (!error && !(error = MAKE_FIRST) && !(error = MAKE_SECOND)) \
|
1285
|
+
error = git_diff__from_iterators(&diff, repo, a, b, opts); \
|
1286
|
+
git__free(pfx); git_iterator_free(a); git_iterator_free(b); \
|
1287
|
+
} while (0)
|
1290
1288
|
|
1291
1289
|
int git_diff_tree_to_tree(
|
1292
1290
|
git_diff **out,
|
@@ -1295,12 +1293,8 @@ int git_diff_tree_to_tree(
|
|
1295
1293
|
git_tree *new_tree,
|
1296
1294
|
const git_diff_options *opts)
|
1297
1295
|
{
|
1298
|
-
git_iterator_flag_t iflag = GIT_ITERATOR_DONT_IGNORE_CASE;
|
1299
|
-
git_iterator_options a_opts = GIT_ITERATOR_OPTIONS_INIT,
|
1300
|
-
b_opts = GIT_ITERATOR_OPTIONS_INIT;
|
1301
|
-
git_iterator *a = NULL, *b = NULL;
|
1302
1296
|
git_diff *diff = NULL;
|
1303
|
-
|
1297
|
+
git_iterator_flag_t iflag = GIT_ITERATOR_DONT_IGNORE_CASE;
|
1304
1298
|
int error = 0;
|
1305
1299
|
|
1306
1300
|
assert(out && repo);
|
@@ -1314,19 +1308,13 @@ int git_diff_tree_to_tree(
|
|
1314
1308
|
if (opts && (opts->flags & GIT_DIFF_IGNORE_CASE) != 0)
|
1315
1309
|
iflag = GIT_ITERATOR_IGNORE_CASE;
|
1316
1310
|
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
goto out;
|
1311
|
+
DIFF_FROM_ITERATORS(
|
1312
|
+
git_iterator_for_tree(&a, old_tree, &a_opts), iflag,
|
1313
|
+
git_iterator_for_tree(&b, new_tree, &b_opts), iflag
|
1314
|
+
);
|
1322
1315
|
|
1323
|
-
|
1324
|
-
|
1325
|
-
out:
|
1326
|
-
git_iterator_free(a);
|
1327
|
-
git_iterator_free(b);
|
1328
|
-
git_diff_free(diff);
|
1329
|
-
git__free(prefix);
|
1316
|
+
if (!error)
|
1317
|
+
*out = diff;
|
1330
1318
|
|
1331
1319
|
return error;
|
1332
1320
|
}
|
@@ -1349,13 +1337,9 @@ int git_diff_tree_to_index(
|
|
1349
1337
|
git_index *index,
|
1350
1338
|
const git_diff_options *opts)
|
1351
1339
|
{
|
1340
|
+
git_diff *diff = NULL;
|
1352
1341
|
git_iterator_flag_t iflag = GIT_ITERATOR_DONT_IGNORE_CASE |
|
1353
1342
|
GIT_ITERATOR_INCLUDE_CONFLICTS;
|
1354
|
-
git_iterator_options a_opts = GIT_ITERATOR_OPTIONS_INIT,
|
1355
|
-
b_opts = GIT_ITERATOR_OPTIONS_INIT;
|
1356
|
-
git_iterator *a = NULL, *b = NULL;
|
1357
|
-
git_diff *diff = NULL;
|
1358
|
-
char *prefix = NULL;
|
1359
1343
|
bool index_ignore_case = false;
|
1360
1344
|
int error = 0;
|
1361
1345
|
|
@@ -1368,23 +1352,17 @@ int git_diff_tree_to_index(
|
|
1368
1352
|
|
1369
1353
|
index_ignore_case = index->ignore_case;
|
1370
1354
|
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
goto out;
|
1355
|
+
DIFF_FROM_ITERATORS(
|
1356
|
+
git_iterator_for_tree(&a, old_tree, &a_opts), iflag,
|
1357
|
+
git_iterator_for_index(&b, repo, index, &b_opts), iflag
|
1358
|
+
);
|
1376
1359
|
|
1377
1360
|
/* if index is in case-insensitive order, re-sort deltas to match */
|
1378
|
-
if (index_ignore_case)
|
1361
|
+
if (!error && index_ignore_case)
|
1379
1362
|
git_diff__set_ignore_case(diff, true);
|
1380
1363
|
|
1381
|
-
|
1382
|
-
|
1383
|
-
out:
|
1384
|
-
git_iterator_free(a);
|
1385
|
-
git_iterator_free(b);
|
1386
|
-
git_diff_free(diff);
|
1387
|
-
git__free(prefix);
|
1364
|
+
if (!error)
|
1365
|
+
*out = diff;
|
1388
1366
|
|
1389
1367
|
return error;
|
1390
1368
|
}
|
@@ -1395,11 +1373,7 @@ int git_diff_index_to_workdir(
|
|
1395
1373
|
git_index *index,
|
1396
1374
|
const git_diff_options *opts)
|
1397
1375
|
{
|
1398
|
-
git_iterator_options a_opts = GIT_ITERATOR_OPTIONS_INIT,
|
1399
|
-
b_opts = GIT_ITERATOR_OPTIONS_INIT;
|
1400
|
-
git_iterator *a = NULL, *b = NULL;
|
1401
1376
|
git_diff *diff = NULL;
|
1402
|
-
char *prefix = NULL;
|
1403
1377
|
int error = 0;
|
1404
1378
|
|
1405
1379
|
assert(out && repo);
|
@@ -1409,24 +1383,20 @@ int git_diff_index_to_workdir(
|
|
1409
1383
|
if (!index && (error = diff_load_index(&index, repo)) < 0)
|
1410
1384
|
return error;
|
1411
1385
|
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
out
|
1426
|
-
git_iterator_free(a);
|
1427
|
-
git_iterator_free(b);
|
1428
|
-
git_diff_free(diff);
|
1429
|
-
git__free(prefix);
|
1386
|
+
DIFF_FROM_ITERATORS(
|
1387
|
+
git_iterator_for_index(&a, repo, index, &a_opts),
|
1388
|
+
GIT_ITERATOR_INCLUDE_CONFLICTS,
|
1389
|
+
|
1390
|
+
git_iterator_for_workdir(&b, repo, index, NULL, &b_opts),
|
1391
|
+
GIT_ITERATOR_DONT_AUTOEXPAND
|
1392
|
+
);
|
1393
|
+
|
1394
|
+
if (!error && (diff->opts.flags & GIT_DIFF_UPDATE_INDEX) != 0 &&
|
1395
|
+
((git_diff_generated *)diff)->index_updated)
|
1396
|
+
error = git_index_write(index);
|
1397
|
+
|
1398
|
+
if (!error)
|
1399
|
+
*out = diff;
|
1430
1400
|
|
1431
1401
|
return error;
|
1432
1402
|
}
|
@@ -1437,33 +1407,24 @@ int git_diff_tree_to_workdir(
|
|
1437
1407
|
git_tree *old_tree,
|
1438
1408
|
const git_diff_options *opts)
|
1439
1409
|
{
|
1440
|
-
git_iterator_options a_opts = GIT_ITERATOR_OPTIONS_INIT,
|
1441
|
-
b_opts = GIT_ITERATOR_OPTIONS_INIT;
|
1442
|
-
git_iterator *a = NULL, *b = NULL;
|
1443
1410
|
git_diff *diff = NULL;
|
1444
|
-
char *prefix = NULL;
|
1445
1411
|
git_index *index;
|
1446
|
-
int error;
|
1412
|
+
int error = 0;
|
1447
1413
|
|
1448
1414
|
assert(out && repo);
|
1449
1415
|
|
1450
1416
|
*out = NULL;
|
1451
1417
|
|
1452
|
-
if ((error =
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
out:
|
1463
|
-
git_iterator_free(a);
|
1464
|
-
git_iterator_free(b);
|
1465
|
-
git_diff_free(diff);
|
1466
|
-
git__free(prefix);
|
1418
|
+
if ((error = git_repository_index__weakptr(&index, repo)))
|
1419
|
+
return error;
|
1420
|
+
|
1421
|
+
DIFF_FROM_ITERATORS(
|
1422
|
+
git_iterator_for_tree(&a, old_tree, &a_opts), 0,
|
1423
|
+
git_iterator_for_workdir(&b, repo, index, old_tree, &b_opts), GIT_ITERATOR_DONT_AUTOEXPAND
|
1424
|
+
);
|
1425
|
+
|
1426
|
+
if (!error)
|
1427
|
+
*out = diff;
|
1467
1428
|
|
1468
1429
|
return error;
|
1469
1430
|
}
|
@@ -1507,35 +1468,24 @@ int git_diff_index_to_index(
|
|
1507
1468
|
git_index *new_index,
|
1508
1469
|
const git_diff_options *opts)
|
1509
1470
|
{
|
1510
|
-
|
1511
|
-
|
1512
|
-
git_iterator *a = NULL, *b = NULL;
|
1513
|
-
git_diff *diff = NULL;
|
1514
|
-
char *prefix = NULL;
|
1515
|
-
int error;
|
1471
|
+
git_diff *diff;
|
1472
|
+
int error = 0;
|
1516
1473
|
|
1517
1474
|
assert(out && old_index && new_index);
|
1518
1475
|
|
1519
1476
|
*out = NULL;
|
1520
1477
|
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
(error = git_diff__from_iterators(&diff, repo, a, b, opts)) < 0)
|
1526
|
-
goto out;
|
1478
|
+
DIFF_FROM_ITERATORS(
|
1479
|
+
git_iterator_for_index(&a, repo, old_index, &a_opts), GIT_ITERATOR_DONT_IGNORE_CASE,
|
1480
|
+
git_iterator_for_index(&b, repo, new_index, &b_opts), GIT_ITERATOR_DONT_IGNORE_CASE
|
1481
|
+
);
|
1527
1482
|
|
1528
1483
|
/* if index is in case-insensitive order, re-sort deltas to match */
|
1529
|
-
if (old_index->ignore_case || new_index->ignore_case)
|
1484
|
+
if (!error && (old_index->ignore_case || new_index->ignore_case))
|
1530
1485
|
git_diff__set_ignore_case(diff, true);
|
1531
1486
|
|
1532
|
-
|
1533
|
-
|
1534
|
-
out:
|
1535
|
-
git_iterator_free(a);
|
1536
|
-
git_iterator_free(b);
|
1537
|
-
git_diff_free(diff);
|
1538
|
-
git__free(prefix);
|
1487
|
+
if (!error)
|
1488
|
+
*out = diff;
|
1539
1489
|
|
1540
1490
|
return error;
|
1541
1491
|
}
|
@@ -88,7 +88,7 @@ extern int git_diff__oid_for_file(
|
|
88
88
|
git_diff *diff,
|
89
89
|
const char *path,
|
90
90
|
uint16_t mode,
|
91
|
-
|
91
|
+
git_off_t size);
|
92
92
|
|
93
93
|
extern int git_diff__oid_for_entry(
|
94
94
|
git_oid *out,
|
@@ -120,7 +120,7 @@ GIT_INLINE(int) git_diff_file__resolve_zero_size(
|
|
120
120
|
git_odb_free(odb);
|
121
121
|
|
122
122
|
if (!error)
|
123
|
-
file->size = (
|
123
|
+
file->size = (git_off_t)len;
|
124
124
|
|
125
125
|
return error;
|
126
126
|
}
|
@@ -45,7 +45,7 @@ static git_diff_parsed *diff_parsed_alloc(void)
|
|
45
45
|
diff->base.patch_fn = git_patch_parsed_from_diff;
|
46
46
|
diff->base.free_fn = diff_parsed_free;
|
47
47
|
|
48
|
-
if (
|
48
|
+
if (git_diff_init_options(&diff->base.opts, GIT_DIFF_OPTIONS_VERSION) < 0) {
|
49
49
|
git__free(diff);
|
50
50
|
return NULL;
|
51
51
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
#include "diff.h"
|
11
11
|
#include "diff_file.h"
|
12
12
|
#include "patch_generate.h"
|
13
|
-
#include "
|
13
|
+
#include "fileops.h"
|
14
14
|
#include "zstream.h"
|
15
15
|
#include "blob.h"
|
16
16
|
#include "delta.h"
|
@@ -48,7 +48,7 @@ static int diff_print_info_init__common(
|
|
48
48
|
if (!pi->id_strlen) {
|
49
49
|
if (!repo)
|
50
50
|
pi->id_strlen = GIT_ABBREV_DEFAULT;
|
51
|
-
else if (
|
51
|
+
else if (git_repository__cvar(&pi->id_strlen, repo, GIT_CVAR_ABBREV) < 0)
|
52
52
|
return -1;
|
53
53
|
}
|
54
54
|
|
@@ -269,8 +269,7 @@ static int diff_print_modes(
|
|
269
269
|
}
|
270
270
|
|
271
271
|
static int diff_print_oid_range(
|
272
|
-
git_buf *out, const git_diff_delta *delta, int id_strlen
|
273
|
-
bool print_index)
|
272
|
+
git_buf *out, const git_diff_delta *delta, int id_strlen)
|
274
273
|
{
|
275
274
|
char start_oid[GIT_OID_HEXSZ+1], end_oid[GIT_OID_HEXSZ+1];
|
276
275
|
|
@@ -294,9 +293,8 @@ static int diff_print_oid_range(
|
|
294
293
|
git_oid_tostr(end_oid, id_strlen + 1, &delta->new_file.id);
|
295
294
|
|
296
295
|
if (delta->old_file.mode == delta->new_file.mode) {
|
297
|
-
|
298
|
-
|
299
|
-
start_oid, end_oid, delta->old_file.mode);
|
296
|
+
git_buf_printf(out, "index %s..%s %o\n",
|
297
|
+
start_oid, end_oid, delta->old_file.mode);
|
300
298
|
} else {
|
301
299
|
if (delta->old_file.mode == 0)
|
302
300
|
git_buf_printf(out, "new file mode %o\n", delta->new_file.mode);
|
@@ -305,8 +303,7 @@ static int diff_print_oid_range(
|
|
305
303
|
else
|
306
304
|
diff_print_modes(out, delta);
|
307
305
|
|
308
|
-
|
309
|
-
git_buf_printf(out, "index %s..%s\n", start_oid, end_oid);
|
306
|
+
git_buf_printf(out, "index %s..%s\n", start_oid, end_oid);
|
310
307
|
}
|
311
308
|
|
312
309
|
return git_buf_oom(out) ? -1 : 0;
|
@@ -328,10 +325,10 @@ static int diff_delta_format_with_paths(
|
|
328
325
|
const char *oldpath,
|
329
326
|
const char *newpath)
|
330
327
|
{
|
331
|
-
if (
|
328
|
+
if (git_oid_iszero(&delta->old_file.id))
|
332
329
|
oldpath = "/dev/null";
|
333
330
|
|
334
|
-
if (
|
331
|
+
if (git_oid_iszero(&delta->new_file.id))
|
335
332
|
newpath = "/dev/null";
|
336
333
|
|
337
334
|
return git_buf_printf(out, template, oldpath, newpath);
|
@@ -384,8 +381,8 @@ done:
|
|
384
381
|
|
385
382
|
static bool delta_is_unchanged(const git_diff_delta *delta)
|
386
383
|
{
|
387
|
-
if (
|
388
|
-
|
384
|
+
if (git_oid_iszero(&delta->old_file.id) &&
|
385
|
+
git_oid_iszero(&delta->new_file.id))
|
389
386
|
return true;
|
390
387
|
|
391
388
|
if (delta->old_file.mode == GIT_FILEMODE_COMMIT ||
|
@@ -403,8 +400,7 @@ int git_diff_delta__format_file_header(
|
|
403
400
|
const git_diff_delta *delta,
|
404
401
|
const char *oldpfx,
|
405
402
|
const char *newpfx,
|
406
|
-
int id_strlen
|
407
|
-
bool print_index)
|
403
|
+
int id_strlen)
|
408
404
|
{
|
409
405
|
git_buf old_path = GIT_BUF_INIT, new_path = GIT_BUF_INIT;
|
410
406
|
bool unchanged = delta_is_unchanged(delta);
|
@@ -435,8 +431,7 @@ int git_diff_delta__format_file_header(
|
|
435
431
|
}
|
436
432
|
|
437
433
|
if (!unchanged) {
|
438
|
-
if ((error = diff_print_oid_range(out, delta,
|
439
|
-
id_strlen, print_index)) < 0)
|
434
|
+
if ((error = diff_print_oid_range(out, delta, id_strlen)) < 0)
|
440
435
|
goto done;
|
441
436
|
|
442
437
|
if ((delta->flags & GIT_DIFF_FLAG_BINARY) == 0)
|
@@ -571,7 +566,6 @@ static int diff_print_patch_file(
|
|
571
566
|
(pi->flags & GIT_DIFF_FORCE_BINARY);
|
572
567
|
bool show_binary = !!(pi->flags & GIT_DIFF_SHOW_BINARY);
|
573
568
|
int id_strlen = pi->id_strlen;
|
574
|
-
bool print_index = (pi->format != GIT_DIFF_FORMAT_PATCH_ID);
|
575
569
|
|
576
570
|
if (binary && show_binary)
|
577
571
|
id_strlen = delta->old_file.id_abbrev ? delta->old_file.id_abbrev :
|
@@ -588,8 +582,7 @@ static int diff_print_patch_file(
|
|
588
582
|
return 0;
|
589
583
|
|
590
584
|
if ((error = git_diff_delta__format_file_header(
|
591
|
-
pi->buf, delta, oldpfx, newpfx,
|
592
|
-
id_strlen, print_index)) < 0)
|
585
|
+
pi->buf, delta, oldpfx, newpfx, id_strlen)) < 0)
|
593
586
|
return error;
|
594
587
|
|
595
588
|
pi->line.origin = GIT_DIFF_LINE_FILE_HDR;
|
@@ -677,11 +670,6 @@ int git_diff_print(
|
|
677
670
|
print_hunk = diff_print_patch_hunk;
|
678
671
|
print_line = diff_print_patch_line;
|
679
672
|
break;
|
680
|
-
case GIT_DIFF_FORMAT_PATCH_ID:
|
681
|
-
print_file = diff_print_patch_file;
|
682
|
-
print_binary = diff_print_patch_binary;
|
683
|
-
print_line = diff_print_patch_line;
|
684
|
-
break;
|
685
673
|
case GIT_DIFF_FORMAT_PATCH_HEADER:
|
686
674
|
print_file = diff_print_patch_file;
|
687
675
|
break;
|