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/parse.c
CHANGED
@@ -101,16 +101,6 @@ int git_parse_advance_digit(int64_t *out, git_parse_ctx *ctx, int base)
|
|
101
101
|
return 0;
|
102
102
|
}
|
103
103
|
|
104
|
-
int git_parse_advance_oid(git_oid *out, git_parse_ctx *ctx)
|
105
|
-
{
|
106
|
-
if (ctx->line_len < GIT_OID_HEXSZ)
|
107
|
-
return -1;
|
108
|
-
if ((git_oid_fromstrn(out, ctx->line, GIT_OID_HEXSZ)) < 0)
|
109
|
-
return -1;
|
110
|
-
git_parse_advance_chars(ctx, GIT_OID_HEXSZ);
|
111
|
-
return 0;
|
112
|
-
}
|
113
|
-
|
114
104
|
int git_parse_peek(char *out, git_parse_ctx *ctx, int flags)
|
115
105
|
{
|
116
106
|
size_t remain = ctx->line_len;
|
data/vendor/libgit2/src/parse.h
CHANGED
@@ -23,11 +23,12 @@ typedef struct {
|
|
23
23
|
size_t line_num;
|
24
24
|
} git_parse_ctx;
|
25
25
|
|
26
|
-
#define GIT_PARSE_CTX_INIT { 0 }
|
27
|
-
|
28
26
|
int git_parse_ctx_init(git_parse_ctx *ctx, const char *content, size_t content_len);
|
29
27
|
void git_parse_ctx_clear(git_parse_ctx *ctx);
|
30
28
|
|
29
|
+
#define git_parse_err(...) \
|
30
|
+
( git_error_set(GIT_ERROR_PATCH, __VA_ARGS__), -1 )
|
31
|
+
|
31
32
|
#define git_parse_ctx_contains_s(ctx, str) \
|
32
33
|
git_parse_ctx_contains(ctx, str, sizeof(str) - 1)
|
33
34
|
|
@@ -50,7 +51,6 @@ int git_parse_advance_expected(
|
|
50
51
|
int git_parse_advance_ws(git_parse_ctx *ctx);
|
51
52
|
int git_parse_advance_nl(git_parse_ctx *ctx);
|
52
53
|
int git_parse_advance_digit(int64_t *out, git_parse_ctx *ctx, int base);
|
53
|
-
int git_parse_advance_oid(git_oid *out, git_parse_ctx *ctx);
|
54
54
|
|
55
55
|
enum GIT_PARSE_PEEK_FLAGS {
|
56
56
|
GIT_PARSE_PEEK_SKIP_WHITESPACE = (1 << 0)
|
data/vendor/libgit2/src/patch.c
CHANGED
@@ -79,7 +79,7 @@ size_t git_patch_size(
|
|
79
79
|
git_buf file_header = GIT_BUF_INIT;
|
80
80
|
|
81
81
|
if (git_diff_delta__format_file_header(
|
82
|
-
&file_header, patch->delta, NULL, NULL, 0
|
82
|
+
&file_header, patch->delta, NULL, NULL, 0) < 0)
|
83
83
|
git_error_clear();
|
84
84
|
else
|
85
85
|
out += git_buf_len(&file_header);
|
@@ -15,7 +15,7 @@
|
|
15
15
|
#include "diff_xdiff.h"
|
16
16
|
#include "delta.h"
|
17
17
|
#include "zstream.h"
|
18
|
-
#include "
|
18
|
+
#include "fileops.h"
|
19
19
|
|
20
20
|
static void diff_output_init(
|
21
21
|
git_patch_generated_output *, const git_diff_options *, git_diff_file_cb,
|
@@ -836,7 +836,7 @@ static int patch_generated_line_cb(
|
|
836
836
|
{
|
837
837
|
git_patch_generated *patch = payload;
|
838
838
|
git_patch_hunk *hunk;
|
839
|
-
git_diff_line
|
839
|
+
git_diff_line *line;
|
840
840
|
|
841
841
|
GIT_UNUSED(delta);
|
842
842
|
GIT_UNUSED(hunk_);
|
@@ -33,19 +33,7 @@ typedef struct {
|
|
33
33
|
char *old_prefix, *new_prefix;
|
34
34
|
} git_patch_parsed;
|
35
35
|
|
36
|
-
static int
|
37
|
-
static int git_parse_err(const char *fmt, ...)
|
38
|
-
{
|
39
|
-
va_list ap;
|
40
|
-
|
41
|
-
va_start(ap, fmt);
|
42
|
-
git_error_vset(GIT_ERROR_PATCH, fmt, ap);
|
43
|
-
va_end(ap);
|
44
|
-
|
45
|
-
return -1;
|
46
|
-
}
|
47
|
-
|
48
|
-
static size_t header_path_len(git_patch_parse_ctx *ctx)
|
36
|
+
static int header_path_len(git_patch_parse_ctx *ctx)
|
49
37
|
{
|
50
38
|
bool inquote = 0;
|
51
39
|
bool quoted = git_parse_ctx_contains_s(&ctx->parse_ctx, "\"");
|
@@ -70,36 +58,31 @@ static int parse_header_path_buf(git_buf *path, git_patch_parse_ctx *ctx, size_t
|
|
70
58
|
int error;
|
71
59
|
|
72
60
|
if ((error = git_buf_put(path, ctx->parse_ctx.line, path_len)) < 0)
|
73
|
-
|
61
|
+
goto done;
|
74
62
|
|
75
63
|
git_parse_advance_chars(&ctx->parse_ctx, path_len);
|
76
64
|
|
77
65
|
git_buf_rtrim(path);
|
78
66
|
|
79
|
-
if (path->size > 0 && path->ptr[0] == '"'
|
80
|
-
|
81
|
-
return error;
|
67
|
+
if (path->size > 0 && path->ptr[0] == '"')
|
68
|
+
error = git_buf_unquote(path);
|
82
69
|
|
83
|
-
|
70
|
+
if (error < 0)
|
71
|
+
goto done;
|
84
72
|
|
85
|
-
|
86
|
-
return git_parse_err("patch contains empty path at line %"PRIuZ,
|
87
|
-
ctx->parse_ctx.line_num);
|
73
|
+
git_path_squash_slashes(path);
|
88
74
|
|
89
|
-
|
75
|
+
done:
|
76
|
+
return error;
|
90
77
|
}
|
91
78
|
|
92
79
|
static int parse_header_path(char **out, git_patch_parse_ctx *ctx)
|
93
80
|
{
|
94
81
|
git_buf path = GIT_BUF_INIT;
|
95
|
-
int error;
|
82
|
+
int error = parse_header_path_buf(&path, ctx, header_path_len(ctx));
|
96
83
|
|
97
|
-
if ((error = parse_header_path_buf(&path, ctx, header_path_len(ctx))) < 0)
|
98
|
-
goto out;
|
99
84
|
*out = git_buf_detach(&path);
|
100
85
|
|
101
|
-
out:
|
102
|
-
git_buf_dispose(&path);
|
103
86
|
return error;
|
104
87
|
}
|
105
88
|
|
@@ -109,12 +92,6 @@ static int parse_header_git_oldpath(
|
|
109
92
|
git_buf old_path = GIT_BUF_INIT;
|
110
93
|
int error;
|
111
94
|
|
112
|
-
if (patch->old_path) {
|
113
|
-
error = git_parse_err("patch contains duplicate old path at line %"PRIuZ,
|
114
|
-
ctx->parse_ctx.line_num);
|
115
|
-
goto out;
|
116
|
-
}
|
117
|
-
|
118
95
|
if ((error = parse_header_path_buf(&old_path, ctx, ctx->parse_ctx.line_len - 1)) < 0)
|
119
96
|
goto out;
|
120
97
|
|
@@ -131,14 +108,9 @@ static int parse_header_git_newpath(
|
|
131
108
|
git_buf new_path = GIT_BUF_INIT;
|
132
109
|
int error;
|
133
110
|
|
134
|
-
if (patch->new_path) {
|
135
|
-
error = git_parse_err("patch contains duplicate new path at line %"PRIuZ,
|
136
|
-
ctx->parse_ctx.line_num);
|
137
|
-
goto out;
|
138
|
-
}
|
139
|
-
|
140
111
|
if ((error = parse_header_path_buf(&new_path, ctx, ctx->parse_ctx.line_len - 1)) < 0)
|
141
112
|
goto out;
|
113
|
+
|
142
114
|
patch->new_path = git_buf_detach(&new_path);
|
143
115
|
|
144
116
|
out:
|
@@ -231,9 +203,9 @@ static int parse_header_git_deletedfilemode(
|
|
231
203
|
git_patch_parsed *patch,
|
232
204
|
git_patch_parse_ctx *ctx)
|
233
205
|
{
|
234
|
-
git__free((char *)patch->base.delta->
|
206
|
+
git__free((char *)patch->base.delta->old_file.path);
|
235
207
|
|
236
|
-
patch->base.delta->
|
208
|
+
patch->base.delta->old_file.path = NULL;
|
237
209
|
patch->base.delta->status = GIT_DELTA_DELETED;
|
238
210
|
patch->base.delta->nfiles = 1;
|
239
211
|
|
@@ -244,9 +216,9 @@ static int parse_header_git_newfilemode(
|
|
244
216
|
git_patch_parsed *patch,
|
245
217
|
git_patch_parse_ctx *ctx)
|
246
218
|
{
|
247
|
-
git__free((char *)patch->base.delta->
|
219
|
+
git__free((char *)patch->base.delta->new_file.path);
|
248
220
|
|
249
|
-
patch->base.delta->
|
221
|
+
patch->base.delta->new_file.path = NULL;
|
250
222
|
patch->base.delta->status = GIT_DELTA_ADDED;
|
251
223
|
patch->base.delta->nfiles = 1;
|
252
224
|
|
@@ -405,7 +377,6 @@ static const parse_header_transition transitions[] = {
|
|
405
377
|
{ "index " , STATE_DIFF, STATE_INDEX, parse_header_git_index },
|
406
378
|
{ "index " , STATE_END, STATE_INDEX, parse_header_git_index },
|
407
379
|
|
408
|
-
{ "--- " , STATE_DIFF, STATE_PATH, parse_header_git_oldpath },
|
409
380
|
{ "--- " , STATE_INDEX, STATE_PATH, parse_header_git_oldpath },
|
410
381
|
{ "+++ " , STATE_PATH, STATE_END, parse_header_git_newpath },
|
411
382
|
{ "GIT binary patch" , STATE_INDEX, STATE_END, NULL },
|
@@ -423,7 +394,6 @@ static const parse_header_transition transitions[] = {
|
|
423
394
|
/* Next patch */
|
424
395
|
{ "diff --git " , STATE_END, 0, NULL },
|
425
396
|
{ "@@ -" , STATE_END, 0, NULL },
|
426
|
-
{ "-- " , STATE_INDEX, 0, NULL },
|
427
397
|
{ "-- " , STATE_END, 0, NULL },
|
428
398
|
};
|
429
399
|
|
@@ -491,7 +461,7 @@ done:
|
|
491
461
|
|
492
462
|
static int parse_int(int *out, git_patch_parse_ctx *ctx)
|
493
463
|
{
|
494
|
-
|
464
|
+
git_off_t num;
|
495
465
|
|
496
466
|
if (git_parse_advance_digit(&num, &ctx->parse_ctx, 10) < 0 || !git__is_int(num))
|
497
467
|
return -1;
|
@@ -554,14 +524,6 @@ fail:
|
|
554
524
|
return -1;
|
555
525
|
}
|
556
526
|
|
557
|
-
static int eof_for_origin(int origin) {
|
558
|
-
if (origin == GIT_DIFF_LINE_ADDITION)
|
559
|
-
return GIT_DIFF_LINE_ADD_EOFNL;
|
560
|
-
if (origin == GIT_DIFF_LINE_DELETION)
|
561
|
-
return GIT_DIFF_LINE_DEL_EOFNL;
|
562
|
-
return GIT_DIFF_LINE_CONTEXT_EOFNL;
|
563
|
-
}
|
564
|
-
|
565
527
|
static int parse_hunk_body(
|
566
528
|
git_patch_parsed *patch,
|
567
529
|
git_patch_hunk *hunk,
|
@@ -572,7 +534,6 @@ static int parse_hunk_body(
|
|
572
534
|
|
573
535
|
int oldlines = hunk->hunk.old_lines;
|
574
536
|
int newlines = hunk->hunk.new_lines;
|
575
|
-
int last_origin = 0;
|
576
537
|
|
577
538
|
for (;
|
578
539
|
ctx->parse_ctx.remain_len > 1 &&
|
@@ -580,17 +541,11 @@ static int parse_hunk_body(
|
|
580
541
|
!git_parse_ctx_contains_s(&ctx->parse_ctx, "@@ -");
|
581
542
|
git_parse_advance_line(&ctx->parse_ctx)) {
|
582
543
|
|
583
|
-
int old_lineno, new_lineno, origin, prefix = 1;
|
584
544
|
char c;
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
git__sub_int_overflow(&new_lineno, new_lineno, newlines)) {
|
590
|
-
error = git_parse_err("unrepresentable line count at line %"PRIuZ,
|
591
|
-
ctx->parse_ctx.line_num);
|
592
|
-
goto done;
|
593
|
-
}
|
545
|
+
int origin;
|
546
|
+
int prefix = 1;
|
547
|
+
int old_lineno = hunk->hunk.old_start + (hunk->hunk.old_lines - oldlines);
|
548
|
+
int new_lineno = hunk->hunk.new_start + (hunk->hunk.new_lines - newlines);
|
594
549
|
|
595
550
|
if (ctx->parse_ctx.line_len == 0 || ctx->parse_ctx.line[ctx->parse_ctx.line_len - 1] != '\n') {
|
596
551
|
error = git_parse_err("invalid patch instruction at line %"PRIuZ,
|
@@ -623,21 +578,6 @@ static int parse_hunk_body(
|
|
623
578
|
old_lineno = -1;
|
624
579
|
break;
|
625
580
|
|
626
|
-
case '\\':
|
627
|
-
/*
|
628
|
-
* If there are no oldlines left, then this is probably
|
629
|
-
* the "" marker. Do not
|
630
|
-
* verify its format, as it may be localized.
|
631
|
-
*/
|
632
|
-
if (!oldlines) {
|
633
|
-
prefix = 0;
|
634
|
-
origin = eof_for_origin(last_origin);
|
635
|
-
old_lineno = -1;
|
636
|
-
new_lineno = -1;
|
637
|
-
break;
|
638
|
-
}
|
639
|
-
/* fall through */
|
640
|
-
|
641
581
|
default:
|
642
582
|
error = git_parse_err("invalid patch hunk at line %"PRIuZ, ctx->parse_ctx.line_num);
|
643
583
|
goto done;
|
@@ -648,9 +588,8 @@ static int parse_hunk_body(
|
|
648
588
|
|
649
589
|
memset(line, 0x0, sizeof(git_diff_line));
|
650
590
|
|
591
|
+
line->content = ctx->parse_ctx.line + prefix;
|
651
592
|
line->content_len = ctx->parse_ctx.line_len - prefix;
|
652
|
-
line->content = git__strndup(ctx->parse_ctx.line + prefix, line->content_len);
|
653
|
-
GIT_ERROR_CHECK_ALLOC(line->content);
|
654
593
|
line->content_offset = ctx->parse_ctx.content_len - ctx->parse_ctx.remain_len;
|
655
594
|
line->origin = origin;
|
656
595
|
line->num_lines = 1;
|
@@ -658,8 +597,6 @@ static int parse_hunk_body(
|
|
658
597
|
line->new_lineno = new_lineno;
|
659
598
|
|
660
599
|
hunk->line_count++;
|
661
|
-
|
662
|
-
last_origin = origin;
|
663
600
|
}
|
664
601
|
|
665
602
|
if (oldlines || newlines) {
|
@@ -669,8 +606,7 @@ static int parse_hunk_body(
|
|
669
606
|
goto done;
|
670
607
|
}
|
671
608
|
|
672
|
-
/*
|
673
|
-
* Handle "". Only expect the leading
|
609
|
+
/* Handle "". Only expect the leading
|
674
610
|
* backslash, though, because the rest of the string could be
|
675
611
|
* localized. Because `diff` optimizes for the case where you
|
676
612
|
* want to apply the patch by hand.
|
@@ -681,25 +617,11 @@ static int parse_hunk_body(
|
|
681
617
|
line = git_array_get(patch->base.lines, git_array_size(patch->base.lines) - 1);
|
682
618
|
|
683
619
|
if (line->content_len < 1) {
|
684
|
-
error = git_parse_err("
|
620
|
+
error = git_parse_err("cannot trim trailing newline of empty line");
|
685
621
|
goto done;
|
686
622
|
}
|
687
623
|
|
688
|
-
line
|
689
|
-
GIT_ERROR_CHECK_ALLOC(line);
|
690
|
-
|
691
|
-
memset(line, 0x0, sizeof(git_diff_line));
|
692
|
-
|
693
|
-
line->content_len = ctx->parse_ctx.line_len;
|
694
|
-
line->content = git__strndup(ctx->parse_ctx.line, line->content_len);
|
695
|
-
GIT_ERROR_CHECK_ALLOC(line->content);
|
696
|
-
line->content_offset = ctx->parse_ctx.content_len - ctx->parse_ctx.remain_len;
|
697
|
-
line->origin = eof_for_origin(last_origin);
|
698
|
-
line->num_lines = 1;
|
699
|
-
line->old_lineno = -1;
|
700
|
-
line->new_lineno = -1;
|
701
|
-
|
702
|
-
hunk->line_count++;
|
624
|
+
line->content_len--;
|
703
625
|
|
704
626
|
git_parse_advance_line(&ctx->parse_ctx);
|
705
627
|
}
|
@@ -765,7 +687,7 @@ static int parse_patch_binary_side(
|
|
765
687
|
{
|
766
688
|
git_diff_binary_t type = GIT_DIFF_BINARY_NONE;
|
767
689
|
git_buf base85 = GIT_BUF_INIT, decoded = GIT_BUF_INIT;
|
768
|
-
|
690
|
+
git_off_t len;
|
769
691
|
int error = 0;
|
770
692
|
|
771
693
|
if (git_parse_ctx_contains_s(&ctx->parse_ctx, "literal ")) {
|
@@ -808,7 +730,7 @@ static int parse_patch_binary_side(
|
|
808
730
|
|
809
731
|
encoded_len = ((decoded_len / 4) + !!(decoded_len % 4)) * 5;
|
810
732
|
|
811
|
-
if (
|
733
|
+
if (encoded_len > ctx->parse_ctx.line_len - 1) {
|
812
734
|
error = git_parse_err("truncated binary data at line %"PRIuZ, ctx->parse_ctx.line_num);
|
813
735
|
goto done;
|
814
736
|
}
|
@@ -878,23 +800,12 @@ static int parse_patch_binary_nodata(
|
|
878
800
|
git_patch_parsed *patch,
|
879
801
|
git_patch_parse_ctx *ctx)
|
880
802
|
{
|
881
|
-
const char *old = patch->old_path ? patch->old_path : patch->header_old_path;
|
882
|
-
const char *new = patch->new_path ? patch->new_path : patch->header_new_path;
|
883
|
-
|
884
|
-
if (!old || !new)
|
885
|
-
return git_parse_err("corrupt binary data without paths at line %"PRIuZ, ctx->parse_ctx.line_num);
|
886
|
-
|
887
|
-
if (patch->base.delta->status == GIT_DELTA_ADDED)
|
888
|
-
old = "/dev/null";
|
889
|
-
else if (patch->base.delta->status == GIT_DELTA_DELETED)
|
890
|
-
new = "/dev/null";
|
891
|
-
|
892
803
|
if (git_parse_advance_expected_str(&ctx->parse_ctx, "Binary files ") < 0 ||
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
804
|
+
git_parse_advance_expected_str(&ctx->parse_ctx, patch->header_old_path) < 0 ||
|
805
|
+
git_parse_advance_expected_str(&ctx->parse_ctx, " and ") < 0 ||
|
806
|
+
git_parse_advance_expected_str(&ctx->parse_ctx, patch->header_new_path) < 0 ||
|
807
|
+
git_parse_advance_expected_str(&ctx->parse_ctx, " differ") < 0 ||
|
808
|
+
git_parse_advance_nl(&ctx->parse_ctx) < 0)
|
898
809
|
return git_parse_err("corrupt git binary header at line %"PRIuZ, ctx->parse_ctx.line_num);
|
899
810
|
|
900
811
|
patch->base.binary.contains_data = 0;
|
@@ -1127,8 +1038,6 @@ int git_patch_parsed_from_diff(git_patch **out, git_diff *d, size_t idx)
|
|
1127
1038
|
static void patch_parsed__free(git_patch *p)
|
1128
1039
|
{
|
1129
1040
|
git_patch_parsed *patch = (git_patch_parsed *)p;
|
1130
|
-
git_diff_line *line;
|
1131
|
-
size_t i;
|
1132
1041
|
|
1133
1042
|
if (!patch)
|
1134
1043
|
return;
|
@@ -1138,8 +1047,6 @@ static void patch_parsed__free(git_patch *p)
|
|
1138
1047
|
git__free((char *)patch->base.binary.old_file.data);
|
1139
1048
|
git__free((char *)patch->base.binary.new_file.data);
|
1140
1049
|
git_array_clear(patch->base.hunks);
|
1141
|
-
git_array_foreach(patch->base.lines, i, line)
|
1142
|
-
git__free((char *) line->content);
|
1143
1050
|
git_array_clear(patch->base.lines);
|
1144
1051
|
git__free(patch->base.delta);
|
1145
1052
|
|
data/vendor/libgit2/src/path.c
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
#include "win32/w32_buffer.h"
|
15
15
|
#include "win32/w32_util.h"
|
16
16
|
#include "win32/version.h"
|
17
|
-
#include <
|
17
|
+
#include <AclAPI.h>
|
18
18
|
#else
|
19
19
|
#include <dirent.h>
|
20
20
|
#endif
|
@@ -183,13 +183,7 @@ int git_path_dirname_r(git_buf *buffer, const char *path)
|
|
183
183
|
while (endp > path && *endp == '/')
|
184
184
|
endp--;
|
185
185
|
|
186
|
-
if (endp - path + 1 >
|
187
|
-
git_error_set(GIT_ERROR_INVALID, "path too long");
|
188
|
-
len = -1;
|
189
|
-
goto Exit;
|
190
|
-
}
|
191
|
-
|
192
|
-
if ((len = win32_prefix_length(path, (int)(endp - path + 1))) > 0) {
|
186
|
+
if ((len = win32_prefix_length(path, endp - path + 1)) > 0) {
|
193
187
|
is_prefix = 1;
|
194
188
|
goto Exit;
|
195
189
|
}
|
@@ -209,13 +203,7 @@ int git_path_dirname_r(git_buf *buffer, const char *path)
|
|
209
203
|
endp--;
|
210
204
|
} while (endp > path && *endp == '/');
|
211
205
|
|
212
|
-
if (endp - path + 1 >
|
213
|
-
git_error_set(GIT_ERROR_INVALID, "path too long");
|
214
|
-
len = -1;
|
215
|
-
goto Exit;
|
216
|
-
}
|
217
|
-
|
218
|
-
if ((len = win32_prefix_length(path, (int)(endp - path + 1))) > 0) {
|
206
|
+
if ((len = win32_prefix_length(path, endp - path + 1)) > 0) {
|
219
207
|
is_prefix = 1;
|
220
208
|
goto Exit;
|
221
209
|
}
|
@@ -311,12 +299,9 @@ int git_path_root(const char *path)
|
|
311
299
|
while (path[offset] && path[offset] != '/' && path[offset] != '\\')
|
312
300
|
offset++;
|
313
301
|
}
|
314
|
-
|
315
|
-
if (path[offset] == '\\')
|
316
|
-
return offset;
|
317
302
|
#endif
|
318
303
|
|
319
|
-
if (path[offset] == '/')
|
304
|
+
if (path[offset] == '/' || path[offset] == '\\')
|
320
305
|
return offset;
|
321
306
|
|
322
307
|
return -1; /* Not a real error - signals that path is not rooted */
|
@@ -1864,12 +1849,12 @@ GIT_INLINE(unsigned int) dotgit_flags(
|
|
1864
1849
|
#endif
|
1865
1850
|
|
1866
1851
|
if (repo && !protectHFS)
|
1867
|
-
error =
|
1852
|
+
error = git_repository__cvar(&protectHFS, repo, GIT_CVAR_PROTECTHFS);
|
1868
1853
|
if (!error && protectHFS)
|
1869
1854
|
flags |= GIT_PATH_REJECT_DOT_GIT_HFS;
|
1870
1855
|
|
1871
1856
|
if (repo)
|
1872
|
-
error =
|
1857
|
+
error = git_repository__cvar(&protectNTFS, repo, GIT_CVAR_PROTECTNTFS);
|
1873
1858
|
if (!error && protectNTFS)
|
1874
1859
|
flags |= GIT_PATH_REJECT_DOT_GIT_NTFS;
|
1875
1860
|
|
@@ -1957,28 +1942,6 @@ extern int git_path_is_gitfile(const char *path, size_t pathlen, git_path_gitfil
|
|
1957
1942
|
}
|
1958
1943
|
}
|
1959
1944
|
|
1960
|
-
bool git_path_supports_symlinks(const char *dir)
|
1961
|
-
{
|
1962
|
-
git_buf path = GIT_BUF_INIT;
|
1963
|
-
bool supported = false;
|
1964
|
-
struct stat st;
|
1965
|
-
int fd;
|
1966
|
-
|
1967
|
-
if ((fd = git_futils_mktmp(&path, dir, 0666)) < 0 ||
|
1968
|
-
p_close(fd) < 0 ||
|
1969
|
-
p_unlink(path.ptr) < 0 ||
|
1970
|
-
p_symlink("testing", path.ptr) < 0 ||
|
1971
|
-
p_lstat(path.ptr, &st) < 0)
|
1972
|
-
goto done;
|
1973
|
-
|
1974
|
-
supported = (S_ISLNK(st.st_mode) != 0);
|
1975
|
-
done:
|
1976
|
-
if (path.size)
|
1977
|
-
(void)p_unlink(path.ptr);
|
1978
|
-
git_buf_dispose(&path);
|
1979
|
-
return supported;
|
1980
|
-
}
|
1981
|
-
|
1982
1945
|
int git_path_validate_system_file_ownership(const char *path)
|
1983
1946
|
{
|
1984
1947
|
#ifndef GIT_WIN32
|