rugged 1.1.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -0
- data/README.md +1 -1
- data/ext/rugged/extconf.rb +2 -2
- data/ext/rugged/rugged.c +7 -4
- data/ext/rugged/rugged_config.c +7 -2
- data/ext/rugged/rugged_object.c +1 -1
- data/ext/rugged/rugged_remote.c +17 -0
- data/ext/rugged/rugged_repo.c +3 -3
- data/lib/rugged/repository.rb +2 -2
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +103 -271
- data/vendor/libgit2/COPYING +149 -24
- data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
- data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
- data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
- data/vendor/libgit2/cmake/FindCoreFoundation.cmake +13 -13
- data/vendor/libgit2/cmake/FindGSSAPI.cmake +171 -287
- data/vendor/libgit2/cmake/FindGSSFramework.cmake +13 -13
- data/vendor/libgit2/cmake/{FindHTTP_Parser.cmake → FindHTTPParser.cmake} +17 -17
- data/vendor/libgit2/cmake/FindIconv.cmake +27 -27
- data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
- data/vendor/libgit2/cmake/FindPCRE.cmake +13 -13
- data/vendor/libgit2/cmake/FindPCRE2.cmake +12 -12
- data/vendor/libgit2/cmake/FindPkgLibraries.cmake +19 -19
- data/vendor/libgit2/cmake/FindSecurity.cmake +14 -14
- data/vendor/libgit2/cmake/FindStatNsec.cmake +12 -18
- data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
- data/vendor/libgit2/cmake/FindmbedTLS.cmake +63 -70
- data/vendor/libgit2/cmake/IdeSplitSources.cmake +18 -18
- data/vendor/libgit2/cmake/PkgBuildConfig.cmake +60 -60
- data/vendor/libgit2/cmake/SanitizeBool.cmake +20 -20
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +37 -37
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +19 -0
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +100 -96
- data/vendor/libgit2/cmake/SelectHashes.cmake +39 -48
- data/vendor/libgit2/cmake/SelectRegex.cmake +51 -0
- data/vendor/libgit2/cmake/SelectSSH.cmake +41 -0
- data/vendor/libgit2/cmake/SelectWinHTTP.cmake +17 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +34 -0
- data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +32 -20
- data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +154 -122
- data/vendor/libgit2/deps/ntlmclient/ntlm.h +17 -13
- data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +17 -4
- data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +88 -88
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
- data/vendor/libgit2/include/git2/apply.h +16 -2
- data/vendor/libgit2/include/git2/attr.h +106 -2
- data/vendor/libgit2/include/git2/blame.h +97 -43
- data/vendor/libgit2/include/git2/blob.h +33 -2
- data/vendor/libgit2/include/git2/branch.h +27 -0
- data/vendor/libgit2/include/git2/buffer.h +18 -78
- data/vendor/libgit2/include/git2/cert.h +43 -6
- data/vendor/libgit2/include/git2/checkout.h +32 -13
- data/vendor/libgit2/include/git2/clone.h +4 -4
- data/vendor/libgit2/include/git2/commit.h +37 -19
- data/vendor/libgit2/include/git2/common.h +46 -5
- data/vendor/libgit2/include/git2/config.h +19 -3
- data/vendor/libgit2/include/git2/credential.h +2 -1
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +326 -6
- data/vendor/libgit2/include/git2/describe.h +7 -2
- data/vendor/libgit2/include/git2/diff.h +50 -121
- data/vendor/libgit2/include/git2/email.h +127 -0
- data/vendor/libgit2/include/git2/errors.h +7 -6
- data/vendor/libgit2/include/git2/filter.h +69 -18
- data/vendor/libgit2/include/git2/graph.h +21 -2
- data/vendor/libgit2/include/git2/ignore.h +1 -1
- data/vendor/libgit2/include/git2/index.h +13 -7
- data/vendor/libgit2/include/git2/indexer.h +19 -0
- data/vendor/libgit2/include/git2/merge.h +23 -3
- data/vendor/libgit2/include/git2/message.h +2 -0
- data/vendor/libgit2/include/git2/notes.h +2 -2
- data/vendor/libgit2/include/git2/object.h +23 -0
- data/vendor/libgit2/include/git2/odb.h +65 -6
- data/vendor/libgit2/include/git2/odb_backend.h +1 -1
- data/vendor/libgit2/include/git2/oidarray.h +5 -8
- data/vendor/libgit2/include/git2/pack.h +24 -8
- data/vendor/libgit2/include/git2/patch.h +16 -0
- data/vendor/libgit2/include/git2/pathspec.h +1 -1
- data/vendor/libgit2/include/git2/proxy.h +1 -1
- data/vendor/libgit2/include/git2/rebase.h +34 -2
- data/vendor/libgit2/include/git2/refdb.h +3 -0
- data/vendor/libgit2/include/git2/reflog.h +1 -1
- data/vendor/libgit2/include/git2/refs.h +8 -4
- data/vendor/libgit2/include/git2/remote.h +246 -46
- data/vendor/libgit2/include/git2/repository.h +25 -18
- data/vendor/libgit2/include/git2/reset.h +2 -2
- data/vendor/libgit2/include/git2/revparse.h +5 -5
- data/vendor/libgit2/include/git2/revwalk.h +4 -1
- data/vendor/libgit2/include/git2/signature.h +1 -1
- data/vendor/libgit2/include/git2/stash.h +4 -4
- data/vendor/libgit2/include/git2/status.h +124 -62
- data/vendor/libgit2/include/git2/stdint.h +3 -3
- data/vendor/libgit2/include/git2/submodule.h +16 -2
- data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
- data/vendor/libgit2/include/git2/sys/email.h +45 -0
- data/vendor/libgit2/include/git2/sys/filter.h +49 -28
- data/vendor/libgit2/include/git2/sys/midx.h +74 -0
- data/vendor/libgit2/include/git2/sys/odb_backend.h +9 -5
- data/vendor/libgit2/include/git2/sys/remote.h +31 -0
- data/vendor/libgit2/include/git2/sys/stream.h +1 -1
- data/vendor/libgit2/include/git2/sys/transport.h +26 -34
- data/vendor/libgit2/include/git2/tag.h +13 -0
- data/vendor/libgit2/include/git2/tree.h +4 -17
- data/vendor/libgit2/include/git2/types.h +16 -7
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +13 -2
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/src/CMakeLists.txt +192 -290
- data/vendor/libgit2/src/alloc.c +21 -8
- data/vendor/libgit2/src/allocators/failalloc.c +92 -0
- data/vendor/libgit2/src/allocators/failalloc.h +23 -0
- data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
- data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
- data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
- data/vendor/libgit2/src/annotated_commit.c +21 -9
- data/vendor/libgit2/src/annotated_commit.h +1 -1
- data/vendor/libgit2/src/apply.c +34 -25
- data/vendor/libgit2/src/apply.h +2 -2
- data/vendor/libgit2/src/array.h +11 -11
- data/vendor/libgit2/src/attr.c +204 -82
- data/vendor/libgit2/src/attr_file.c +105 -52
- data/vendor/libgit2/src/attr_file.h +36 -15
- data/vendor/libgit2/src/attrcache.c +55 -45
- data/vendor/libgit2/src/attrcache.h +4 -5
- data/vendor/libgit2/src/blame.c +15 -9
- data/vendor/libgit2/src/blame_git.c +2 -2
- data/vendor/libgit2/src/blob.c +76 -52
- data/vendor/libgit2/src/blob.h +1 -1
- data/vendor/libgit2/src/branch.c +203 -110
- data/vendor/libgit2/src/branch.h +15 -3
- data/vendor/libgit2/src/buf.c +126 -0
- data/vendor/libgit2/src/buf.h +50 -0
- data/vendor/libgit2/src/cache.c +2 -2
- data/vendor/libgit2/src/cache.h +7 -7
- data/vendor/libgit2/src/cc-compat.h +11 -9
- data/vendor/libgit2/src/checkout.c +118 -91
- data/vendor/libgit2/src/cherrypick.c +16 -12
- data/vendor/libgit2/src/clone.c +97 -103
- data/vendor/libgit2/src/commit.c +167 -84
- data/vendor/libgit2/src/commit.h +24 -1
- data/vendor/libgit2/src/commit_graph.c +1224 -0
- data/vendor/libgit2/src/commit_graph.h +169 -0
- data/vendor/libgit2/src/commit_list.c +48 -3
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +35 -5
- data/vendor/libgit2/src/config.c +119 -64
- data/vendor/libgit2/src/config.h +15 -2
- data/vendor/libgit2/src/config_cache.c +5 -3
- data/vendor/libgit2/src/config_file.c +120 -100
- data/vendor/libgit2/src/config_mem.c +9 -9
- data/vendor/libgit2/src/config_parse.c +29 -27
- data/vendor/libgit2/src/crlf.c +36 -23
- data/vendor/libgit2/src/date.c +13 -19
- data/vendor/libgit2/src/date.h +33 -0
- data/vendor/libgit2/src/delta.c +1 -1
- data/vendor/libgit2/src/describe.c +32 -21
- data/vendor/libgit2/src/diff.c +71 -183
- data/vendor/libgit2/src/diff.h +2 -4
- data/vendor/libgit2/src/diff_driver.c +53 -51
- data/vendor/libgit2/src/diff_driver.h +3 -3
- data/vendor/libgit2/src/diff_file.c +31 -26
- data/vendor/libgit2/src/diff_generate.c +76 -23
- data/vendor/libgit2/src/diff_generate.h +5 -3
- data/vendor/libgit2/src/diff_print.c +120 -95
- data/vendor/libgit2/src/diff_stats.c +47 -34
- data/vendor/libgit2/src/{message.h → diff_stats.h} +7 -6
- data/vendor/libgit2/src/diff_tform.c +18 -16
- data/vendor/libgit2/src/diff_xdiff.c +7 -10
- data/vendor/libgit2/src/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/email.c +315 -0
- data/vendor/libgit2/src/email.h +25 -0
- data/vendor/libgit2/src/errors.c +37 -32
- data/vendor/libgit2/src/features.h.in +11 -2
- data/vendor/libgit2/src/fetch.c +77 -26
- data/vendor/libgit2/src/fetch.h +1 -1
- data/vendor/libgit2/src/fetchhead.c +27 -23
- data/vendor/libgit2/src/filebuf.c +36 -34
- data/vendor/libgit2/src/filebuf.h +1 -1
- data/vendor/libgit2/src/filter.c +278 -132
- data/vendor/libgit2/src/filter.h +46 -6
- data/vendor/libgit2/src/fs_path.c +2071 -0
- data/vendor/libgit2/src/fs_path.h +772 -0
- data/vendor/libgit2/src/futils.c +96 -90
- data/vendor/libgit2/src/futils.h +27 -15
- data/vendor/libgit2/src/graph.c +64 -9
- data/vendor/libgit2/src/hash/sha1/collisiondetect.c +5 -5
- data/vendor/libgit2/src/hash/sha1/common_crypto.c +5 -5
- data/vendor/libgit2/src/hash/sha1/generic.c +2 -2
- data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
- data/vendor/libgit2/src/hash/sha1/mbedtls.c +13 -13
- data/vendor/libgit2/src/hash/sha1/openssl.c +5 -5
- data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +9 -11
- data/vendor/libgit2/src/hash/sha1/win32.c +21 -17
- data/vendor/libgit2/src/hash/sha1.h +3 -1
- data/vendor/libgit2/src/hash.c +71 -36
- data/vendor/libgit2/src/hash.h +13 -13
- data/vendor/libgit2/src/hashsig.c +23 -10
- data/vendor/libgit2/src/ident.c +30 -20
- data/vendor/libgit2/src/ignore.c +63 -46
- data/vendor/libgit2/src/ignore.h +2 -2
- data/vendor/libgit2/src/index.c +184 -149
- data/vendor/libgit2/src/index.h +7 -4
- data/vendor/libgit2/src/indexer.c +143 -89
- data/vendor/libgit2/src/integer.h +64 -2
- data/vendor/libgit2/src/iterator.c +93 -73
- data/vendor/libgit2/src/iterator.h +6 -6
- data/vendor/libgit2/src/khash.h +3 -12
- data/vendor/libgit2/src/{settings.c → libgit2.c} +165 -56
- data/vendor/libgit2/src/libgit2.h +15 -0
- data/vendor/libgit2/src/mailmap.c +60 -45
- data/vendor/libgit2/src/map.h +3 -3
- data/vendor/libgit2/src/merge.c +104 -61
- data/vendor/libgit2/src/merge.h +3 -15
- data/vendor/libgit2/src/merge_driver.c +21 -15
- data/vendor/libgit2/src/merge_file.c +24 -6
- data/vendor/libgit2/src/message.c +21 -8
- data/vendor/libgit2/src/midx.c +501 -18
- data/vendor/libgit2/src/midx.h +29 -2
- data/vendor/libgit2/src/mwindow.c +103 -59
- data/vendor/libgit2/src/mwindow.h +3 -3
- data/vendor/libgit2/src/net.c +405 -71
- data/vendor/libgit2/src/net.h +26 -5
- data/vendor/libgit2/src/netops.c +7 -5
- data/vendor/libgit2/src/netops.h +3 -3
- data/vendor/libgit2/src/notes.c +40 -49
- data/vendor/libgit2/src/object.c +68 -20
- data/vendor/libgit2/src/object.h +1 -1
- data/vendor/libgit2/src/odb.c +320 -80
- data/vendor/libgit2/src/odb.h +17 -3
- data/vendor/libgit2/src/odb_loose.c +96 -86
- data/vendor/libgit2/src/odb_mempack.c +19 -6
- data/vendor/libgit2/src/odb_pack.c +402 -125
- data/vendor/libgit2/src/oid.c +16 -8
- data/vendor/libgit2/src/oid.h +15 -0
- data/vendor/libgit2/src/oidarray.c +10 -1
- data/vendor/libgit2/src/pack-objects.c +90 -69
- data/vendor/libgit2/src/pack-objects.h +11 -6
- data/vendor/libgit2/src/pack.c +337 -127
- data/vendor/libgit2/src/pack.h +25 -7
- data/vendor/libgit2/src/patch.c +17 -10
- data/vendor/libgit2/src/patch.h +1 -0
- data/vendor/libgit2/src/patch_generate.c +29 -13
- data/vendor/libgit2/src/patch_generate.h +5 -5
- data/vendor/libgit2/src/patch_parse.c +26 -25
- data/vendor/libgit2/src/path.c +86 -1768
- data/vendor/libgit2/src/path.h +39 -635
- data/vendor/libgit2/src/pathspec.c +12 -12
- data/vendor/libgit2/src/pathspec.h +2 -2
- data/vendor/libgit2/src/pool.c +13 -7
- data/vendor/libgit2/src/posix.c +14 -6
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/pqueue.h +1 -1
- data/vendor/libgit2/src/proxy.c +4 -1
- data/vendor/libgit2/src/proxy.h +1 -1
- data/vendor/libgit2/src/push.c +30 -35
- data/vendor/libgit2/src/push.h +4 -16
- data/vendor/libgit2/src/rand.c +226 -0
- data/vendor/libgit2/src/rand.h +37 -0
- data/vendor/libgit2/src/reader.c +18 -14
- data/vendor/libgit2/src/reader.h +2 -2
- data/vendor/libgit2/src/rebase.c +177 -132
- data/vendor/libgit2/src/refdb.c +30 -13
- data/vendor/libgit2/src/refdb_fs.c +548 -222
- data/vendor/libgit2/src/reflog.c +19 -14
- data/vendor/libgit2/src/refs.c +107 -72
- data/vendor/libgit2/src/refs.h +2 -2
- data/vendor/libgit2/src/refspec.c +53 -38
- data/vendor/libgit2/src/refspec.h +5 -2
- data/vendor/libgit2/src/regexp.c +1 -1
- data/vendor/libgit2/src/remote.c +960 -486
- data/vendor/libgit2/src/remote.h +16 -10
- data/vendor/libgit2/src/repository.c +702 -422
- data/vendor/libgit2/src/repository.h +26 -8
- data/vendor/libgit2/src/reset.c +16 -12
- data/vendor/libgit2/src/revert.c +16 -12
- data/vendor/libgit2/src/revparse.c +66 -48
- data/vendor/libgit2/src/revwalk.c +39 -22
- data/vendor/libgit2/src/runtime.c +162 -0
- data/vendor/libgit2/src/runtime.h +62 -0
- data/vendor/libgit2/src/settings.h +11 -0
- data/vendor/libgit2/src/signature.c +18 -11
- data/vendor/libgit2/src/signature.h +1 -1
- data/vendor/libgit2/src/sortedcache.c +1 -1
- data/vendor/libgit2/src/sortedcache.h +10 -8
- data/vendor/libgit2/src/stash.c +39 -38
- data/vendor/libgit2/src/status.c +11 -5
- data/vendor/libgit2/src/{buffer.c → str.c} +459 -136
- data/vendor/libgit2/src/str.h +357 -0
- data/vendor/libgit2/src/strarray.c +2 -1
- data/vendor/libgit2/src/streams/mbedtls.c +22 -23
- data/vendor/libgit2/src/streams/mbedtls.h +1 -1
- data/vendor/libgit2/src/streams/openssl.c +101 -201
- data/vendor/libgit2/src/streams/openssl.h +9 -1
- data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
- data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
- data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
- data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
- data/vendor/libgit2/src/streams/registry.c +5 -6
- data/vendor/libgit2/src/streams/socket.c +6 -2
- data/vendor/libgit2/src/streams/stransport.c +6 -3
- data/vendor/libgit2/src/streams/tls.c +5 -3
- data/vendor/libgit2/src/submodule.c +290 -212
- data/vendor/libgit2/src/submodule.h +10 -10
- data/vendor/libgit2/src/sysdir.c +70 -56
- data/vendor/libgit2/src/sysdir.h +15 -10
- data/vendor/libgit2/src/tag.c +72 -34
- data/vendor/libgit2/src/thread.c +140 -0
- data/vendor/libgit2/src/thread.h +479 -0
- data/vendor/libgit2/src/threadstate.c +84 -0
- data/vendor/libgit2/src/threadstate.h +24 -0
- data/vendor/libgit2/src/trace.c +3 -16
- data/vendor/libgit2/src/trace.h +17 -30
- data/vendor/libgit2/src/trailer.c +2 -2
- data/vendor/libgit2/src/transaction.c +20 -9
- data/vendor/libgit2/src/transport.c +13 -13
- data/vendor/libgit2/src/transports/auth.c +8 -10
- data/vendor/libgit2/src/transports/auth.h +2 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +23 -17
- data/vendor/libgit2/src/transports/auth_ntlm.c +20 -16
- data/vendor/libgit2/src/transports/auth_ntlm.h +0 -1
- data/vendor/libgit2/src/transports/credential.c +15 -7
- data/vendor/libgit2/src/transports/git.c +10 -14
- data/vendor/libgit2/src/transports/http.c +56 -34
- data/vendor/libgit2/src/transports/http.h +3 -3
- data/vendor/libgit2/src/transports/httpclient.c +106 -79
- data/vendor/libgit2/src/transports/httpclient.h +1 -1
- data/vendor/libgit2/src/transports/local.c +127 -119
- data/vendor/libgit2/src/transports/smart.c +61 -144
- data/vendor/libgit2/src/transports/smart.h +26 -32
- data/vendor/libgit2/src/transports/smart_pkt.c +33 -33
- data/vendor/libgit2/src/transports/smart_protocol.c +68 -44
- data/vendor/libgit2/src/transports/ssh.c +100 -131
- data/vendor/libgit2/src/transports/winhttp.c +86 -82
- data/vendor/libgit2/src/tree-cache.c +5 -5
- data/vendor/libgit2/src/tree-cache.h +2 -2
- data/vendor/libgit2/src/tree.c +150 -116
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/tsort.c +0 -2
- data/vendor/libgit2/src/unix/map.c +3 -3
- data/vendor/libgit2/src/unix/posix.h +1 -4
- data/vendor/libgit2/src/unix/pthread.h +2 -1
- data/vendor/libgit2/src/unix/realpath.c +0 -2
- data/vendor/libgit2/src/utf8.c +150 -0
- data/vendor/libgit2/src/utf8.h +52 -0
- data/vendor/libgit2/src/util.c +68 -144
- data/vendor/libgit2/src/util.h +36 -68
- data/vendor/libgit2/src/vector.c +23 -19
- data/vendor/libgit2/src/vector.h +5 -3
- data/vendor/libgit2/src/win32/findfile.c +172 -114
- data/vendor/libgit2/src/win32/findfile.h +7 -4
- data/vendor/libgit2/src/win32/map.c +1 -1
- data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
- data/vendor/libgit2/src/win32/path_w32.c +162 -33
- data/vendor/libgit2/src/win32/path_w32.h +2 -1
- data/vendor/libgit2/src/win32/posix.h +6 -7
- data/vendor/libgit2/src/win32/posix_w32.c +26 -33
- data/vendor/libgit2/src/win32/precompiled.h +0 -1
- data/vendor/libgit2/src/win32/reparse.h +4 -4
- data/vendor/libgit2/src/win32/thread.c +24 -15
- data/vendor/libgit2/src/win32/thread.h +1 -1
- data/vendor/libgit2/src/win32/w32_buffer.c +5 -6
- data/vendor/libgit2/src/win32/w32_buffer.h +2 -3
- data/vendor/libgit2/src/win32/w32_common.h +18 -9
- data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
- data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
- data/vendor/libgit2/src/win32/w32_util.h +6 -6
- data/vendor/libgit2/src/worktree.c +138 -105
- data/vendor/libgit2/src/worktree.h +1 -1
- data/vendor/libgit2/src/xdiff/git-xdiff.h +53 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +15 -15
- data/vendor/libgit2/src/xdiff/xdiffi.c +134 -108
- data/vendor/libgit2/src/xdiff/xemit.c +23 -7
- data/vendor/libgit2/src/xdiff/xhistogram.c +87 -78
- data/vendor/libgit2/src/xdiff/xinclude.h +1 -12
- data/vendor/libgit2/src/xdiff/xmerge.c +104 -117
- data/vendor/libgit2/src/xdiff/xpatience.c +6 -17
- data/vendor/libgit2/src/xdiff/xprepare.c +15 -20
- data/vendor/libgit2/src/xdiff/xutils.c +18 -7
- data/vendor/libgit2/src/zstream.c +6 -6
- data/vendor/libgit2/src/zstream.h +4 -4
- metadata +60 -24
- data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
- data/vendor/libgit2/src/buf_text.c +0 -316
- data/vendor/libgit2/src/buf_text.h +0 -122
- data/vendor/libgit2/src/buffer.h +0 -222
- data/vendor/libgit2/src/global.c +0 -363
- data/vendor/libgit2/src/global.h +0 -41
- data/vendor/libgit2/src/thread-utils.c +0 -58
- data/vendor/libgit2/src/thread-utils.h +0 -369
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
- data/vendor/libgit2/src/win32/w32_stack.c +0 -188
- data/vendor/libgit2/src/win32/w32_stack.h +0 -140
@@ -141,7 +141,7 @@ typedef enum {
|
|
141
141
|
* `git_repository_open_ext` with this flag will error out if either
|
142
142
|
* $GIT_WORK_TREE or $GIT_COMMON_DIR is set.
|
143
143
|
*/
|
144
|
-
GIT_REPOSITORY_OPEN_FROM_ENV = (1 << 4)
|
144
|
+
GIT_REPOSITORY_OPEN_FROM_ENV = (1 << 4)
|
145
145
|
} git_repository_open_flag_t;
|
146
146
|
|
147
147
|
/**
|
@@ -267,7 +267,7 @@ typedef enum {
|
|
267
267
|
* If an alternate workdir is specified, use relative paths for the gitdir
|
268
268
|
* and core.worktree.
|
269
269
|
*/
|
270
|
-
GIT_REPOSITORY_INIT_RELATIVE_GITLINK = (1u << 6)
|
270
|
+
GIT_REPOSITORY_INIT_RELATIVE_GITLINK = (1u << 6)
|
271
271
|
} git_repository_init_flag_t;
|
272
272
|
|
273
273
|
/**
|
@@ -292,7 +292,7 @@ typedef enum {
|
|
292
292
|
/**
|
293
293
|
* Use "--shared=all" behavior, adding world readability.
|
294
294
|
*/
|
295
|
-
GIT_REPOSITORY_INIT_SHARED_ALL = 0002777
|
295
|
+
GIT_REPOSITORY_INIT_SHARED_ALL = 0002777
|
296
296
|
} git_repository_init_mode_t;
|
297
297
|
|
298
298
|
/**
|
@@ -673,6 +673,9 @@ GIT_EXTERN(int) git_repository_message(git_buf *out, git_repository *repo);
|
|
673
673
|
* Remove git's prepared message.
|
674
674
|
*
|
675
675
|
* Remove the message that `git_repository_message` retrieves.
|
676
|
+
*
|
677
|
+
* @param repo Repository to remove prepared message from.
|
678
|
+
* @return 0 or an error code.
|
676
679
|
*/
|
677
680
|
GIT_EXTERN(int) git_repository_message_remove(git_repository *repo);
|
678
681
|
|
@@ -762,13 +765,15 @@ GIT_EXTERN(int) git_repository_mergehead_foreach(
|
|
762
765
|
*
|
763
766
|
* @param out Output value of calculated SHA
|
764
767
|
* @param repo Repository pointer
|
765
|
-
* @param path Path to file on disk whose contents should be hashed.
|
766
|
-
*
|
768
|
+
* @param path Path to file on disk whose contents should be hashed. This
|
769
|
+
* may be an absolute path or a relative path, in which case it
|
770
|
+
* will be treated as a path within the working directory.
|
767
771
|
* @param type The object type to hash as (e.g. GIT_OBJECT_BLOB)
|
768
772
|
* @param as_path The path to use to look up filtering rules. If this is
|
769
|
-
*
|
770
|
-
*
|
771
|
-
*
|
773
|
+
* an empty string then no filters will be applied when
|
774
|
+
* calculating the hash. If this is `NULL` and the `path`
|
775
|
+
* parameter is a file within the repository's working
|
776
|
+
* directory, then the `path` will be used.
|
772
777
|
* @return 0 on success, or an error code
|
773
778
|
*/
|
774
779
|
GIT_EXTERN(int) git_repository_hashfile(
|
@@ -797,8 +802,8 @@ GIT_EXTERN(int) git_repository_hashfile(
|
|
797
802
|
* @return 0 on success, or an error code
|
798
803
|
*/
|
799
804
|
GIT_EXTERN(int) git_repository_set_head(
|
800
|
-
git_repository*
|
801
|
-
const char*
|
805
|
+
git_repository *repo,
|
806
|
+
const char *refname);
|
802
807
|
|
803
808
|
/**
|
804
809
|
* Make the repository HEAD directly point to the Commit.
|
@@ -806,19 +811,19 @@ GIT_EXTERN(int) git_repository_set_head(
|
|
806
811
|
* If the provided committish cannot be found in the repository, the HEAD
|
807
812
|
* is unaltered and GIT_ENOTFOUND is returned.
|
808
813
|
*
|
809
|
-
* If the provided
|
814
|
+
* If the provided committish cannot be peeled into a commit, the HEAD
|
810
815
|
* is unaltered and -1 is returned.
|
811
816
|
*
|
812
817
|
* Otherwise, the HEAD will eventually be detached and will directly point to
|
813
818
|
* the peeled Commit.
|
814
819
|
*
|
815
820
|
* @param repo Repository pointer
|
816
|
-
* @param
|
821
|
+
* @param committish Object id of the Commit the HEAD should point to
|
817
822
|
* @return 0 on success, or an error code
|
818
823
|
*/
|
819
824
|
GIT_EXTERN(int) git_repository_set_head_detached(
|
820
|
-
git_repository*
|
821
|
-
const git_oid*
|
825
|
+
git_repository *repo,
|
826
|
+
const git_oid *committish);
|
822
827
|
|
823
828
|
/**
|
824
829
|
* Make the repository HEAD directly point to the Commit.
|
@@ -834,7 +839,7 @@ GIT_EXTERN(int) git_repository_set_head_detached(
|
|
834
839
|
*/
|
835
840
|
GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
|
836
841
|
git_repository *repo,
|
837
|
-
const git_annotated_commit *
|
842
|
+
const git_annotated_commit *committish);
|
838
843
|
|
839
844
|
/**
|
840
845
|
* Detach the HEAD.
|
@@ -844,7 +849,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
|
|
844
849
|
* If the HEAD is already detached and points to a Tag, the HEAD is
|
845
850
|
* updated into making it point to the peeled Commit, and 0 is returned.
|
846
851
|
*
|
847
|
-
* If the HEAD is already detached and points to a non
|
852
|
+
* If the HEAD is already detached and points to a non committish, the HEAD is
|
848
853
|
* unaltered, and -1 is returned.
|
849
854
|
*
|
850
855
|
* Otherwise, the HEAD will be detached and point to the peeled Commit.
|
@@ -854,7 +859,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
|
|
854
859
|
* branch or an error code
|
855
860
|
*/
|
856
861
|
GIT_EXTERN(int) git_repository_detach_head(
|
857
|
-
git_repository*
|
862
|
+
git_repository *repo);
|
858
863
|
|
859
864
|
/**
|
860
865
|
* Repository state
|
@@ -874,7 +879,7 @@ typedef enum {
|
|
874
879
|
GIT_REPOSITORY_STATE_REBASE_INTERACTIVE,
|
875
880
|
GIT_REPOSITORY_STATE_REBASE_MERGE,
|
876
881
|
GIT_REPOSITORY_STATE_APPLY_MAILBOX,
|
877
|
-
GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE
|
882
|
+
GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE
|
878
883
|
} git_repository_state_t;
|
879
884
|
|
880
885
|
/**
|
@@ -926,6 +931,7 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
|
|
926
931
|
* @param name where to store the pointer to the name
|
927
932
|
* @param email where to store the pointer to the email
|
928
933
|
* @param repo the repository
|
934
|
+
* @return 0 or an error code
|
929
935
|
*/
|
930
936
|
GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, const git_repository *repo);
|
931
937
|
|
@@ -939,6 +945,7 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
|
|
939
945
|
* @param repo the repository to configure
|
940
946
|
* @param name the name to use for the reflog entries
|
941
947
|
* @param email the email to use for the reflog entries
|
948
|
+
* @return 0 or an error code.
|
942
949
|
*/
|
943
950
|
GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name, const char *email);
|
944
951
|
|
@@ -26,7 +26,7 @@ GIT_BEGIN_DECL
|
|
26
26
|
typedef enum {
|
27
27
|
GIT_RESET_SOFT = 1, /**< Move the head to the given commit */
|
28
28
|
GIT_RESET_MIXED = 2, /**< SOFT plus reset index to the commit */
|
29
|
-
GIT_RESET_HARD = 3
|
29
|
+
GIT_RESET_HARD = 3 /**< MIXED plus changes in working tree discarded */
|
30
30
|
} git_reset_t;
|
31
31
|
|
32
32
|
/**
|
@@ -48,7 +48,7 @@ typedef enum {
|
|
48
48
|
*
|
49
49
|
* @param target Committish to which the Head should be moved to. This object
|
50
50
|
* must belong to the given `repo` and can either be a git_commit or a
|
51
|
-
* git_tag. When a git_tag is being passed, it should be
|
51
|
+
* git_tag. When a git_tag is being passed, it should be dereferenceable
|
52
52
|
* to a git_commit which oid will be used as the target of the branch.
|
53
53
|
*
|
54
54
|
* @param reset_type Kind of reset operation to perform.
|
@@ -70,12 +70,12 @@ GIT_EXTERN(int) git_revparse_ext(
|
|
70
70
|
*/
|
71
71
|
typedef enum {
|
72
72
|
/** The spec targeted a single object. */
|
73
|
-
|
73
|
+
GIT_REVSPEC_SINGLE = 1 << 0,
|
74
74
|
/** The spec targeted a range of commits. */
|
75
|
-
|
75
|
+
GIT_REVSPEC_RANGE = 1 << 1,
|
76
76
|
/** The spec used the '...' operator, which invokes special semantics. */
|
77
|
-
|
78
|
-
}
|
77
|
+
GIT_REVSPEC_MERGE_BASE = 1 << 2
|
78
|
+
} git_revspec_t;
|
79
79
|
|
80
80
|
/**
|
81
81
|
* Git Revision Spec: output of a `git_revparse` operation
|
@@ -85,7 +85,7 @@ typedef struct {
|
|
85
85
|
git_object *from;
|
86
86
|
/** The right element of the revspec; must be freed by the user */
|
87
87
|
git_object *to;
|
88
|
-
/** The intent of the revspec (i.e. `
|
88
|
+
/** The intent of the revspec (i.e. `git_revspec_mode_t` flags) */
|
89
89
|
unsigned int flags;
|
90
90
|
} git_revspec;
|
91
91
|
|
@@ -49,7 +49,7 @@ typedef enum {
|
|
49
49
|
* order; this sorting mode can be combined with
|
50
50
|
* any of the above.
|
51
51
|
*/
|
52
|
-
GIT_SORT_REVERSE = 1 << 2
|
52
|
+
GIT_SORT_REVERSE = 1 << 2
|
53
53
|
} git_sort_t;
|
54
54
|
|
55
55
|
/**
|
@@ -249,6 +249,7 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
|
|
249
249
|
*
|
250
250
|
* No parents other than the first for each commit will be enqueued.
|
251
251
|
*
|
252
|
+
* @param walk The revision walker.
|
252
253
|
* @return 0 or an error code
|
253
254
|
*/
|
254
255
|
GIT_EXTERN(int) git_revwalk_simplify_first_parent(git_revwalk *walk);
|
@@ -277,6 +278,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
|
|
277
278
|
*
|
278
279
|
* @param commit_id oid of Commit
|
279
280
|
* @param payload User-specified pointer to data to be passed as data payload
|
281
|
+
* @return non-zero to hide the commmit and it parent.
|
280
282
|
*/
|
281
283
|
typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
|
282
284
|
const git_oid *commit_id,
|
@@ -288,6 +290,7 @@ typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
|
|
288
290
|
* @param walk the revision walker
|
289
291
|
* @param hide_cb callback function to hide a commit and its parents
|
290
292
|
* @param payload data payload to be passed to callback function
|
293
|
+
* @return 0 or an error code.
|
291
294
|
*/
|
292
295
|
GIT_EXTERN(int) git_revwalk_add_hide_cb(
|
293
296
|
git_revwalk *walk,
|
@@ -71,7 +71,7 @@ GIT_EXTERN(int) git_signature_default(git_signature **out, git_repository *repo)
|
|
71
71
|
*
|
72
72
|
* @param out new signature
|
73
73
|
* @param buf signature string
|
74
|
-
* @return 0 on success, or an error code
|
74
|
+
* @return 0 on success, GIT_EINVALID if the signature is not parseable, or an error code
|
75
75
|
*/
|
76
76
|
GIT_EXTERN(int) git_signature_from_buffer(git_signature **out, const char *buf);
|
77
77
|
|
@@ -44,7 +44,7 @@ typedef enum {
|
|
44
44
|
* All ignored files are also stashed and then cleaned up from
|
45
45
|
* the working directory
|
46
46
|
*/
|
47
|
-
GIT_STASH_INCLUDE_IGNORED = (1 << 2)
|
47
|
+
GIT_STASH_INCLUDE_IGNORED = (1 << 2)
|
48
48
|
} git_stash_flags;
|
49
49
|
|
50
50
|
/**
|
@@ -78,7 +78,7 @@ typedef enum {
|
|
78
78
|
/* Try to reinstate not only the working tree's changes,
|
79
79
|
* but also the index's changes.
|
80
80
|
*/
|
81
|
-
GIT_STASH_APPLY_REINSTATE_INDEX = (1 << 0)
|
81
|
+
GIT_STASH_APPLY_REINSTATE_INDEX = (1 << 0)
|
82
82
|
} git_stash_apply_flags;
|
83
83
|
|
84
84
|
/** Stash apply progression states */
|
@@ -104,7 +104,7 @@ typedef enum {
|
|
104
104
|
GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED,
|
105
105
|
|
106
106
|
/** The stash was applied successfully. */
|
107
|
-
GIT_STASH_APPLY_PROGRESS_DONE
|
107
|
+
GIT_STASH_APPLY_PROGRESS_DONE
|
108
108
|
} git_stash_apply_progress_t;
|
109
109
|
|
110
110
|
/**
|
@@ -200,7 +200,7 @@ GIT_EXTERN(int) git_stash_apply(
|
|
200
200
|
*/
|
201
201
|
typedef int GIT_CALLBACK(git_stash_cb)(
|
202
202
|
size_t index,
|
203
|
-
const char*
|
203
|
+
const char *message,
|
204
204
|
const git_oid *stash_id,
|
205
205
|
void *payload);
|
206
206
|
|
@@ -48,7 +48,7 @@ typedef enum {
|
|
48
48
|
GIT_STATUS_WT_UNREADABLE = (1u << 12),
|
49
49
|
|
50
50
|
GIT_STATUS_IGNORED = (1u << 14),
|
51
|
-
GIT_STATUS_CONFLICTED = (1u << 15)
|
51
|
+
GIT_STATUS_CONFLICTED = (1u << 15)
|
52
52
|
} git_status_t;
|
53
53
|
|
54
54
|
/**
|
@@ -69,90 +69,142 @@ typedef int GIT_CALLBACK(git_status_cb)(
|
|
69
69
|
* With `git_status_foreach_ext`, this will control which changes get
|
70
70
|
* callbacks. With `git_status_list_new`, these will control which
|
71
71
|
* changes are included in the list.
|
72
|
-
*
|
73
|
-
* - GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This roughly
|
74
|
-
* matches `git status --porcelain` regarding which files are
|
75
|
-
* included and in what order.
|
76
|
-
* - GIT_STATUS_SHOW_INDEX_ONLY only gives status based on HEAD to index
|
77
|
-
* comparison, not looking at working directory changes.
|
78
|
-
* - GIT_STATUS_SHOW_WORKDIR_ONLY only gives status based on index to
|
79
|
-
* working directory comparison, not comparing the index to the HEAD.
|
80
72
|
*/
|
81
73
|
typedef enum {
|
74
|
+
/**
|
75
|
+
* The default. This roughly matches `git status --porcelain` regarding
|
76
|
+
* which files are included and in what order.
|
77
|
+
*/
|
82
78
|
GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0,
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Only gives status based on HEAD to index comparison, not looking at
|
82
|
+
* working directory changes.
|
83
|
+
*/
|
83
84
|
GIT_STATUS_SHOW_INDEX_ONLY = 1,
|
84
|
-
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Only gives status based on index to working directory comparison,
|
88
|
+
* not comparing the index to the HEAD.
|
89
|
+
*/
|
90
|
+
GIT_STATUS_SHOW_WORKDIR_ONLY = 2
|
85
91
|
} git_status_show_t;
|
86
92
|
|
87
93
|
/**
|
88
94
|
* Flags to control status callbacks
|
89
95
|
*
|
90
|
-
* - GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made
|
91
|
-
* on untracked files. These will only be made if the workdir files are
|
92
|
-
* included in the status "show" option.
|
93
|
-
* - GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files get callbacks.
|
94
|
-
* Again, these callbacks will only be made if the workdir files are
|
95
|
-
* included in the status "show" option.
|
96
|
-
* - GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be
|
97
|
-
* made even on unmodified files.
|
98
|
-
* - GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that submodules should be
|
99
|
-
* skipped. This only applies if there are no pending typechanges to
|
100
|
-
* the submodule (either from or to another type).
|
101
|
-
* - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that all files in
|
102
|
-
* untracked directories should be included. Normally if an entire
|
103
|
-
* directory is new, then just the top-level directory is included (with
|
104
|
-
* a trailing slash on the entry name). This flag says to include all
|
105
|
-
* of the individual files in the directory instead.
|
106
|
-
* - GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path
|
107
|
-
* should be treated as a literal path, and not as a pathspec pattern.
|
108
|
-
* - GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of
|
109
|
-
* ignored directories should be included in the status. This is like
|
110
|
-
* doing `git ls-files -o -i --exclude-standard` with core git.
|
111
|
-
* - GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX indicates that rename detection
|
112
|
-
* should be processed between the head and the index and enables
|
113
|
-
* the GIT_STATUS_INDEX_RENAMED as a possible status flag.
|
114
|
-
* - GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR indicates that rename
|
115
|
-
* detection should be run between the index and the working directory
|
116
|
-
* and enabled GIT_STATUS_WT_RENAMED as a possible status flag.
|
117
|
-
* - GIT_STATUS_OPT_SORT_CASE_SENSITIVELY overrides the native case
|
118
|
-
* sensitivity for the file system and forces the output to be in
|
119
|
-
* case-sensitive order
|
120
|
-
* - GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY overrides the native case
|
121
|
-
* sensitivity for the file system and forces the output to be in
|
122
|
-
* case-insensitive order
|
123
|
-
* - GIT_STATUS_OPT_RENAMES_FROM_REWRITES indicates that rename detection
|
124
|
-
* should include rewritten files
|
125
|
-
* - GIT_STATUS_OPT_NO_REFRESH bypasses the default status behavior of
|
126
|
-
* doing a "soft" index reload (i.e. reloading the index data if the
|
127
|
-
* file on disk has been modified outside libgit2).
|
128
|
-
* - GIT_STATUS_OPT_UPDATE_INDEX tells libgit2 to refresh the stat cache
|
129
|
-
* in the index for files that are unchanged but have out of date stat
|
130
|
-
* information in the index. It will result in less work being done on
|
131
|
-
* subsequent calls to get status. This is mutually exclusive with the
|
132
|
-
* NO_REFRESH option.
|
133
|
-
*
|
134
96
|
* Calling `git_status_foreach()` is like calling the extended version
|
135
97
|
* with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,
|
136
98
|
* and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled
|
137
99
|
* together as `GIT_STATUS_OPT_DEFAULTS` if you want them as a baseline.
|
138
100
|
*/
|
139
101
|
typedef enum {
|
102
|
+
/**
|
103
|
+
* Says that callbacks should be made on untracked files.
|
104
|
+
* These will only be made if the workdir files are included in the status
|
105
|
+
* "show" option.
|
106
|
+
*/
|
140
107
|
GIT_STATUS_OPT_INCLUDE_UNTRACKED = (1u << 0),
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Says that ignored files get callbacks.
|
111
|
+
* Again, these callbacks will only be made if the workdir files are
|
112
|
+
* included in the status "show" option.
|
113
|
+
*/
|
141
114
|
GIT_STATUS_OPT_INCLUDE_IGNORED = (1u << 1),
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Indicates that callback should be made even on unmodified files.
|
118
|
+
*/
|
142
119
|
GIT_STATUS_OPT_INCLUDE_UNMODIFIED = (1u << 2),
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Indicates that submodules should be skipped.
|
123
|
+
* This only applies if there are no pending typechanges to the submodule
|
124
|
+
* (either from or to another type).
|
125
|
+
*/
|
143
126
|
GIT_STATUS_OPT_EXCLUDE_SUBMODULES = (1u << 3),
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Indicates that all files in untracked directories should be included.
|
130
|
+
* Normally if an entire directory is new, then just the top-level
|
131
|
+
* directory is included (with a trailing slash on the entry name).
|
132
|
+
* This flag says to include all of the individual files in the directory
|
133
|
+
* instead.
|
134
|
+
*/
|
144
135
|
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = (1u << 4),
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Indicates that the given path should be treated as a literal path,
|
139
|
+
* and not as a pathspec pattern.
|
140
|
+
*/
|
145
141
|
GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH = (1u << 5),
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Indicates that the contents of ignored directories should be included
|
145
|
+
* in the status. This is like doing `git ls-files -o -i --exclude-standard`
|
146
|
+
* with core git.
|
147
|
+
*/
|
146
148
|
GIT_STATUS_OPT_RECURSE_IGNORED_DIRS = (1u << 6),
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Indicates that rename detection should be processed between the head and
|
152
|
+
* the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status
|
153
|
+
* flag.
|
154
|
+
*/
|
147
155
|
GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX = (1u << 7),
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Indicates that rename detection should be run between the index and the
|
159
|
+
* working directory and enabled GIT_STATUS_WT_RENAMED as a possible status
|
160
|
+
* flag.
|
161
|
+
*/
|
148
162
|
GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR = (1u << 8),
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Overrides the native case sensitivity for the file system and forces
|
166
|
+
* the output to be in case-sensitive order.
|
167
|
+
*/
|
149
168
|
GIT_STATUS_OPT_SORT_CASE_SENSITIVELY = (1u << 9),
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Overrides the native case sensitivity for the file system and forces
|
172
|
+
* the output to be in case-insensitive order.
|
173
|
+
*/
|
150
174
|
GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY = (1u << 10),
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Iindicates that rename detection should include rewritten files.
|
178
|
+
*/
|
151
179
|
GIT_STATUS_OPT_RENAMES_FROM_REWRITES = (1u << 11),
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Bypasses the default status behavior of doing a "soft" index reload
|
183
|
+
* (i.e. reloading the index data if the file on disk has been modified
|
184
|
+
* outside libgit2).
|
185
|
+
*/
|
152
186
|
GIT_STATUS_OPT_NO_REFRESH = (1u << 12),
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Tells libgit2 to refresh the stat cache in the index for files that are
|
190
|
+
* unchanged but have out of date stat einformation in the index.
|
191
|
+
* It will result in less work being done on subsequent calls to get status.
|
192
|
+
* This is mutually exclusive with the NO_REFRESH option.
|
193
|
+
*/
|
153
194
|
GIT_STATUS_OPT_UPDATE_INDEX = (1u << 13),
|
195
|
+
|
196
|
+
/**
|
197
|
+
* Normally files that cannot be opened or read are ignored as
|
198
|
+
* these are often transient files; this option will return
|
199
|
+
* unreadable files as `GIT_STATUS_WT_UNREADABLE`.
|
200
|
+
*/
|
154
201
|
GIT_STATUS_OPT_INCLUDE_UNREADABLE = (1u << 14),
|
155
|
-
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Unreadable files will be detected and given the status
|
205
|
+
* untracked instead of unreadable.
|
206
|
+
*/
|
207
|
+
GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 15)
|
156
208
|
} git_status_opt_t;
|
157
209
|
|
158
210
|
#define GIT_STATUS_OPT_DEFAULTS \
|
@@ -168,7 +220,10 @@ typedef enum {
|
|
168
220
|
*
|
169
221
|
*/
|
170
222
|
typedef struct {
|
171
|
-
|
223
|
+
/**
|
224
|
+
* The struct version; pass `GIT_STATUS_OPTIONS_VERSION`.
|
225
|
+
*/
|
226
|
+
unsigned int version;
|
172
227
|
|
173
228
|
/**
|
174
229
|
* The `show` value is one of the `git_status_show_t` constants that
|
@@ -177,23 +232,30 @@ typedef struct {
|
|
177
232
|
git_status_show_t show;
|
178
233
|
|
179
234
|
/**
|
180
|
-
* The `flags` value is an OR'ed combination of the
|
181
|
-
* values above.
|
235
|
+
* The `flags` value is an OR'ed combination of the
|
236
|
+
* `git_status_opt_t` values above.
|
182
237
|
*/
|
183
238
|
unsigned int flags;
|
184
239
|
|
185
240
|
/**
|
186
241
|
* The `pathspec` is an array of path patterns to match (using
|
187
|
-
* fnmatch-style matching), or just an array of paths to match
|
188
|
-
* `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified
|
242
|
+
* fnmatch-style matching), or just an array of paths to match
|
243
|
+
* exactly if `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified
|
244
|
+
* in the flags.
|
189
245
|
*/
|
190
246
|
git_strarray pathspec;
|
191
247
|
|
192
248
|
/**
|
193
|
-
* The `baseline` is the tree to be used for comparison to the
|
194
|
-
* and index; defaults to HEAD.
|
249
|
+
* The `baseline` is the tree to be used for comparison to the
|
250
|
+
* working directory and index; defaults to HEAD.
|
195
251
|
*/
|
196
252
|
git_tree *baseline;
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Threshold above which similar files will be considered renames.
|
256
|
+
* This is equivalent to the -M option. Defaults to 50.
|
257
|
+
*/
|
258
|
+
uint16_t rename_threshold;
|
197
259
|
} git_status_options;
|
198
260
|
|
199
261
|
#define GIT_STATUS_OPTIONS_VERSION 1
|
@@ -29,9 +29,7 @@
|
|
29
29
|
//
|
30
30
|
///////////////////////////////////////////////////////////////////////////////
|
31
31
|
|
32
|
-
#
|
33
|
-
#error "Use this header only with Microsoft Visual C++ compilers!"
|
34
|
-
#endif // _MSC_VER ]
|
32
|
+
#ifdef _MSC_VER // [
|
35
33
|
|
36
34
|
#ifndef _MSC_STDINT_H_ // [
|
37
35
|
#define _MSC_STDINT_H_
|
@@ -245,3 +243,5 @@ typedef uint64_t uintmax_t;
|
|
245
243
|
|
246
244
|
|
247
245
|
#endif // _MSC_STDINT_H_ ]
|
246
|
+
|
247
|
+
#endif // _MSC_VER ]
|
@@ -85,7 +85,7 @@ typedef enum {
|
|
85
85
|
GIT_SUBMODULE_STATUS_WD_MODIFIED = (1u << 10),
|
86
86
|
GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED = (1u << 11),
|
87
87
|
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED = (1u << 12),
|
88
|
-
GIT_SUBMODULE_STATUS_WD_UNTRACKED = (1u << 13)
|
88
|
+
GIT_SUBMODULE_STATUS_WD_UNTRACKED = (1u << 13)
|
89
89
|
} git_submodule_status_t;
|
90
90
|
|
91
91
|
#define GIT_SUBMODULE_STATUS__IN_FLAGS 0x000Fu
|
@@ -181,7 +181,7 @@ GIT_EXTERN(int) git_submodule_update_options_init(
|
|
181
181
|
* @param submodule Submodule object
|
182
182
|
* @param init If the submodule is not initialized, setting this flag to true
|
183
183
|
* will initialize the submodule before updating. Otherwise, this will
|
184
|
-
* return an error if attempting to update an
|
184
|
+
* return an error if attempting to update an uninitialized repository.
|
185
185
|
* but setting this to true forces them to be updated.
|
186
186
|
* @param options configuration options for the update. If NULL, the
|
187
187
|
* function works as though GIT_SUBMODULE_UPDATE_OPTIONS_INIT was passed.
|
@@ -223,6 +223,16 @@ GIT_EXTERN(int) git_submodule_lookup(
|
|
223
223
|
git_repository *repo,
|
224
224
|
const char *name);
|
225
225
|
|
226
|
+
/**
|
227
|
+
* Create an in-memory copy of a submodule. The copy must be explicitly
|
228
|
+
* free'd or it will leak.
|
229
|
+
*
|
230
|
+
* @param out Pointer to store the copy of the submodule.
|
231
|
+
* @param source Original submodule to copy.
|
232
|
+
* @return 0
|
233
|
+
*/
|
234
|
+
GIT_EXTERN(int) git_submodule_dup(git_submodule **out, git_submodule *source);
|
235
|
+
|
226
236
|
/**
|
227
237
|
* Release a submodule
|
228
238
|
*
|
@@ -311,6 +321,7 @@ GIT_EXTERN(int) git_submodule_clone(
|
|
311
321
|
* (but doesn't actually do the commit).
|
312
322
|
*
|
313
323
|
* @param submodule The submodule to finish adding.
|
324
|
+
* @return 0 or an error code.
|
314
325
|
*/
|
315
326
|
GIT_EXTERN(int) git_submodule_add_finalize(git_submodule *submodule);
|
316
327
|
|
@@ -580,6 +591,9 @@ GIT_EXTERN(int) git_submodule_repo_init(
|
|
580
591
|
* submodule config, acting like "git submodule sync". This is useful if
|
581
592
|
* you have altered the URL for the submodule (or it has been altered by a
|
582
593
|
* fetch of upstream changes) and you need to update your local repo.
|
594
|
+
*
|
595
|
+
* @param submodule The submodule to copy.
|
596
|
+
* @return 0 or an error code.
|
583
597
|
*/
|
584
598
|
GIT_EXTERN(int) git_submodule_sync(git_submodule *submodule);
|
585
599
|
|