rugged 1.6.3 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/rugged/rugged_allocator.c +0 -54
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +25 -17
- data/vendor/libgit2/COPYING +195 -1
- data/vendor/libgit2/cmake/CheckPrototypeDefinitionSafe.cmake +16 -0
- data/vendor/libgit2/cmake/{FindIconv.cmake → FindIntlIconv.cmake} +6 -0
- data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
- data/vendor/libgit2/cmake/SelectGSSAPI.cmake +4 -4
- data/vendor/libgit2/cmake/SelectHTTPParser.cmake +23 -8
- data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +34 -6
- data/vendor/libgit2/cmake/SelectHashes.cmake +32 -11
- data/vendor/libgit2/cmake/SelectRegex.cmake +6 -1
- data/vendor/libgit2/cmake/SelectSSH.cmake +22 -17
- data/vendor/libgit2/cmake/SelectXdiff.cmake +9 -0
- data/vendor/libgit2/cmake/SelectZlib.cmake +4 -0
- data/vendor/libgit2/deps/llhttp/CMakeLists.txt +8 -0
- data/vendor/libgit2/deps/llhttp/LICENSE-MIT +22 -0
- data/vendor/libgit2/deps/llhttp/api.c +510 -0
- data/vendor/libgit2/deps/llhttp/http.c +170 -0
- data/vendor/libgit2/deps/llhttp/llhttp.c +10168 -0
- data/vendor/libgit2/deps/llhttp/llhttp.h +897 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +1 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_builtin_md4.c +311 -0
- data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -20
- data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +4 -4
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +21 -21
- data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +5 -4
- data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +2 -1
- data/vendor/libgit2/deps/ntlmclient/utf8.h +1176 -721
- data/vendor/libgit2/deps/ntlmclient/util.h +11 -0
- data/vendor/libgit2/deps/pcre/CMakeLists.txt +1 -0
- data/vendor/libgit2/deps/pcre/LICENCE +5 -5
- data/vendor/libgit2/deps/pcre/pcre.h +2 -2
- data/vendor/libgit2/deps/pcre/pcre_compile.c +6 -3
- data/vendor/libgit2/deps/pcre/pcre_exec.c +2 -2
- data/vendor/libgit2/deps/xdiff/CMakeLists.txt +28 -0
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/git-xdiff.h +4 -1
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiffi.c +19 -18
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiffi.h +2 -4
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xemit.c +3 -3
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xhistogram.c +7 -18
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xmacros.h +18 -1
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xmerge.c +22 -20
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xpatience.c +21 -30
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xprepare.c +13 -30
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xutils.c +18 -1
- data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xutils.h +2 -1
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
- data/vendor/libgit2/deps/zlib/LICENSE +22 -0
- data/vendor/libgit2/deps/zlib/adler32.c +5 -27
- data/vendor/libgit2/deps/zlib/crc32.c +94 -167
- data/vendor/libgit2/deps/zlib/deflate.c +358 -435
- data/vendor/libgit2/deps/zlib/deflate.h +41 -10
- data/vendor/libgit2/deps/zlib/gzguts.h +13 -18
- data/vendor/libgit2/deps/zlib/infback.c +17 -30
- data/vendor/libgit2/deps/zlib/inffast.c +1 -4
- data/vendor/libgit2/deps/zlib/inffast.h +1 -1
- data/vendor/libgit2/deps/zlib/inflate.c +36 -102
- data/vendor/libgit2/deps/zlib/inftrees.c +6 -11
- data/vendor/libgit2/deps/zlib/inftrees.h +6 -6
- data/vendor/libgit2/deps/zlib/trees.c +287 -352
- data/vendor/libgit2/deps/zlib/zconf.h +23 -14
- data/vendor/libgit2/deps/zlib/zlib.h +202 -202
- data/vendor/libgit2/deps/zlib/zutil.c +18 -44
- data/vendor/libgit2/deps/zlib/zutil.h +13 -33
- data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
- data/vendor/libgit2/include/git2/apply.h +27 -6
- data/vendor/libgit2/include/git2/attr.h +17 -4
- data/vendor/libgit2/include/git2/blame.h +133 -28
- data/vendor/libgit2/include/git2/blob.h +71 -28
- data/vendor/libgit2/include/git2/branch.h +22 -15
- data/vendor/libgit2/include/git2/buffer.h +6 -4
- data/vendor/libgit2/include/git2/cert.h +2 -1
- data/vendor/libgit2/include/git2/checkout.h +83 -32
- data/vendor/libgit2/include/git2/cherrypick.h +10 -3
- data/vendor/libgit2/include/git2/clone.h +25 -9
- data/vendor/libgit2/include/git2/commit.h +132 -3
- data/vendor/libgit2/include/git2/common.h +138 -56
- data/vendor/libgit2/include/git2/config.h +93 -23
- data/vendor/libgit2/include/git2/credential.h +30 -2
- data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
- data/vendor/libgit2/include/git2/deprecated.h +133 -3
- data/vendor/libgit2/include/git2/describe.h +13 -1
- data/vendor/libgit2/include/git2/diff.h +77 -9
- data/vendor/libgit2/include/git2/email.h +9 -29
- data/vendor/libgit2/include/git2/errors.h +49 -74
- data/vendor/libgit2/include/git2/filter.h +14 -7
- data/vendor/libgit2/include/git2/global.h +8 -1
- data/vendor/libgit2/include/git2/graph.h +3 -2
- data/vendor/libgit2/include/git2/ignore.h +10 -0
- data/vendor/libgit2/include/git2/index.h +100 -6
- data/vendor/libgit2/include/git2/indexer.h +21 -4
- data/vendor/libgit2/include/git2/mailmap.h +7 -1
- data/vendor/libgit2/include/git2/merge.h +46 -1
- data/vendor/libgit2/include/git2/message.h +2 -2
- data/vendor/libgit2/include/git2/net.h +3 -1
- data/vendor/libgit2/include/git2/notes.h +9 -6
- data/vendor/libgit2/include/git2/object.h +9 -8
- data/vendor/libgit2/include/git2/odb.h +91 -49
- data/vendor/libgit2/include/git2/odb_backend.h +80 -52
- data/vendor/libgit2/include/git2/oid.h +24 -25
- data/vendor/libgit2/include/git2/oidarray.h +7 -1
- data/vendor/libgit2/include/git2/pack.h +13 -1
- data/vendor/libgit2/include/git2/patch.h +2 -3
- data/vendor/libgit2/include/git2/pathspec.h +9 -0
- data/vendor/libgit2/include/git2/proxy.h +10 -0
- data/vendor/libgit2/include/git2/rebase.h +9 -6
- data/vendor/libgit2/include/git2/refdb.h +2 -2
- data/vendor/libgit2/include/git2/reflog.h +3 -2
- data/vendor/libgit2/include/git2/refs.h +9 -6
- data/vendor/libgit2/include/git2/refspec.h +14 -4
- data/vendor/libgit2/include/git2/remote.h +112 -18
- data/vendor/libgit2/include/git2/repository.h +61 -15
- data/vendor/libgit2/include/git2/reset.h +16 -3
- data/vendor/libgit2/include/git2/revert.h +9 -4
- data/vendor/libgit2/include/git2/revparse.h +3 -3
- data/vendor/libgit2/include/git2/revwalk.h +3 -2
- data/vendor/libgit2/include/git2/signature.h +46 -1
- data/vendor/libgit2/include/git2/stash.h +17 -3
- data/vendor/libgit2/include/git2/status.h +10 -6
- data/vendor/libgit2/include/git2/stdint.h +87 -85
- data/vendor/libgit2/include/git2/strarray.h +2 -3
- data/vendor/libgit2/include/git2/submodule.h +20 -9
- data/vendor/libgit2/include/git2/sys/alloc.h +12 -34
- data/vendor/libgit2/include/git2/sys/commit.h +77 -3
- data/vendor/libgit2/include/git2/sys/commit_graph.h +109 -58
- data/vendor/libgit2/include/git2/sys/config.h +80 -4
- data/vendor/libgit2/include/git2/sys/credential.h +4 -3
- data/vendor/libgit2/include/git2/sys/diff.h +21 -1
- data/vendor/libgit2/include/git2/sys/email.h +7 -0
- data/vendor/libgit2/include/git2/sys/errors.h +76 -0
- data/vendor/libgit2/include/git2/sys/filter.h +66 -3
- data/vendor/libgit2/include/git2/sys/hashsig.h +11 -0
- data/vendor/libgit2/include/git2/sys/index.h +3 -2
- data/vendor/libgit2/include/git2/sys/mempack.h +32 -2
- data/vendor/libgit2/include/git2/sys/merge.h +55 -7
- data/vendor/libgit2/include/git2/sys/midx.h +47 -4
- data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -3
- data/vendor/libgit2/include/git2/sys/openssl.h +8 -1
- data/vendor/libgit2/include/git2/sys/path.h +12 -1
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -36
- data/vendor/libgit2/include/git2/sys/refs.h +3 -2
- data/vendor/libgit2/include/git2/sys/remote.h +8 -1
- data/vendor/libgit2/include/git2/sys/repository.h +63 -3
- data/vendor/libgit2/include/git2/sys/stream.h +25 -2
- data/vendor/libgit2/include/git2/sys/transport.h +44 -5
- data/vendor/libgit2/include/git2/tag.h +3 -1
- data/vendor/libgit2/include/git2/trace.h +9 -3
- data/vendor/libgit2/include/git2/transaction.h +3 -2
- data/vendor/libgit2/include/git2/transport.h +11 -3
- data/vendor/libgit2/include/git2/tree.h +16 -5
- data/vendor/libgit2/include/git2/types.h +19 -3
- data/vendor/libgit2/include/git2/version.h +44 -8
- data/vendor/libgit2/include/git2/worktree.h +19 -7
- data/vendor/libgit2/src/CMakeLists.txt +40 -15
- data/vendor/libgit2/src/cli/CMakeLists.txt +2 -2
- data/vendor/libgit2/src/cli/cmd.c +1 -1
- data/vendor/libgit2/src/cli/cmd.h +4 -0
- data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
- data/vendor/libgit2/src/cli/cmd_cat_file.c +6 -8
- data/vendor/libgit2/src/cli/cmd_clone.c +27 -13
- data/vendor/libgit2/src/cli/cmd_config.c +241 -0
- data/vendor/libgit2/src/cli/cmd_hash_object.c +6 -8
- data/vendor/libgit2/src/cli/cmd_help.c +6 -7
- data/vendor/libgit2/src/cli/cmd_index_pack.c +114 -0
- data/vendor/libgit2/src/cli/cmd_init.c +102 -0
- data/vendor/libgit2/src/cli/common.c +168 -0
- data/vendor/libgit2/src/cli/common.h +63 -0
- data/vendor/libgit2/src/cli/error.h +1 -1
- data/vendor/libgit2/src/cli/main.c +52 -24
- data/vendor/libgit2/src/cli/opt.c +29 -3
- data/vendor/libgit2/src/cli/opt.h +21 -3
- data/vendor/libgit2/src/cli/opt_usage.c +102 -33
- data/vendor/libgit2/src/cli/opt_usage.h +6 -1
- data/vendor/libgit2/src/cli/progress.c +60 -10
- data/vendor/libgit2/src/cli/progress.h +16 -4
- data/vendor/libgit2/src/cli/unix/sighandler.c +2 -1
- data/vendor/libgit2/src/cli/win32/precompiled.h +1 -1
- data/vendor/libgit2/src/cli/win32/sighandler.c +1 -1
- data/vendor/libgit2/src/libgit2/CMakeLists.txt +27 -27
- data/vendor/libgit2/src/libgit2/annotated_commit.c +2 -2
- data/vendor/libgit2/src/libgit2/annotated_commit.h +1 -1
- data/vendor/libgit2/src/libgit2/apply.c +14 -16
- data/vendor/libgit2/src/libgit2/attr.c +30 -13
- data/vendor/libgit2/src/libgit2/attr_file.c +7 -2
- data/vendor/libgit2/src/libgit2/attr_file.h +2 -0
- data/vendor/libgit2/src/libgit2/attrcache.c +69 -33
- data/vendor/libgit2/src/libgit2/attrcache.h +5 -9
- data/vendor/libgit2/src/libgit2/blame.c +152 -59
- data/vendor/libgit2/src/libgit2/blame.h +1 -0
- data/vendor/libgit2/src/libgit2/blame_git.c +0 -1
- data/vendor/libgit2/src/libgit2/branch.c +2 -2
- data/vendor/libgit2/src/libgit2/cache.c +22 -17
- data/vendor/libgit2/src/libgit2/cache.h +7 -9
- data/vendor/libgit2/src/libgit2/checkout.c +34 -24
- data/vendor/libgit2/src/libgit2/checkout.h +0 -2
- data/vendor/libgit2/src/libgit2/cherrypick.c +4 -5
- data/vendor/libgit2/src/libgit2/clone.c +186 -164
- data/vendor/libgit2/src/libgit2/clone.h +4 -1
- data/vendor/libgit2/src/libgit2/commit.c +123 -9
- data/vendor/libgit2/src/libgit2/commit_graph.c +166 -88
- data/vendor/libgit2/src/libgit2/commit_graph.h +21 -6
- data/vendor/libgit2/src/libgit2/commit_list.c +12 -5
- data/vendor/libgit2/src/libgit2/commit_list.h +1 -0
- data/vendor/libgit2/src/libgit2/config.c +394 -300
- data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
- data/vendor/libgit2/src/libgit2/config.h +9 -4
- data/vendor/libgit2/src/libgit2/config_backend.h +8 -10
- data/vendor/libgit2/src/libgit2/config_cache.c +4 -5
- data/vendor/libgit2/src/libgit2/config_file.c +113 -96
- data/vendor/libgit2/src/libgit2/config_list.c +285 -0
- data/vendor/libgit2/src/libgit2/config_list.h +32 -0
- data/vendor/libgit2/src/libgit2/config_mem.c +194 -40
- data/vendor/libgit2/src/libgit2/config_parse.c +10 -9
- data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
- data/vendor/libgit2/src/libgit2/describe.c +34 -31
- data/vendor/libgit2/src/libgit2/diff.c +17 -8
- data/vendor/libgit2/src/libgit2/diff.h +6 -6
- data/vendor/libgit2/src/libgit2/diff_driver.c +12 -19
- data/vendor/libgit2/src/libgit2/diff_driver.h +2 -2
- data/vendor/libgit2/src/libgit2/diff_file.c +7 -7
- data/vendor/libgit2/src/libgit2/diff_generate.c +39 -18
- data/vendor/libgit2/src/libgit2/diff_parse.c +22 -6
- data/vendor/libgit2/src/libgit2/diff_print.c +88 -13
- data/vendor/libgit2/src/libgit2/diff_tform.c +40 -12
- data/vendor/libgit2/src/libgit2/diff_xdiff.h +1 -1
- data/vendor/libgit2/src/libgit2/email.c +5 -3
- data/vendor/libgit2/src/libgit2/fetch.c +39 -9
- data/vendor/libgit2/src/libgit2/fetch.h +0 -2
- data/vendor/libgit2/src/libgit2/fetchhead.c +11 -9
- data/vendor/libgit2/src/libgit2/filter.c +5 -5
- data/vendor/libgit2/src/libgit2/git2.rc +3 -3
- data/vendor/libgit2/src/libgit2/grafts.c +270 -0
- data/vendor/libgit2/src/libgit2/grafts.h +35 -0
- data/vendor/libgit2/src/libgit2/graph.c +1 -1
- data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
- data/vendor/libgit2/src/libgit2/ident.c +3 -3
- data/vendor/libgit2/src/libgit2/ignore.c +9 -5
- data/vendor/libgit2/src/libgit2/index.c +392 -208
- data/vendor/libgit2/src/libgit2/index.h +16 -3
- data/vendor/libgit2/src/libgit2/index_map.c +95 -0
- data/vendor/libgit2/src/libgit2/index_map.h +28 -0
- data/vendor/libgit2/src/libgit2/indexer.c +44 -41
- data/vendor/libgit2/src/libgit2/iterator.c +34 -13
- data/vendor/libgit2/src/libgit2/iterator.h +3 -0
- data/vendor/libgit2/src/libgit2/libgit2.c +155 -331
- data/vendor/libgit2/src/libgit2/mailmap.c +1 -1
- data/vendor/libgit2/src/libgit2/merge.c +56 -46
- data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
- data/vendor/libgit2/src/libgit2/merge_file.c +0 -2
- data/vendor/libgit2/src/libgit2/midx.c +86 -44
- data/vendor/libgit2/src/libgit2/midx.h +13 -3
- data/vendor/libgit2/src/libgit2/mwindow.c +38 -45
- data/vendor/libgit2/src/libgit2/mwindow.h +4 -0
- data/vendor/libgit2/src/libgit2/notes.c +9 -8
- data/vendor/libgit2/src/libgit2/object.c +42 -16
- data/vendor/libgit2/src/libgit2/object.h +6 -0
- data/vendor/libgit2/src/libgit2/odb.c +16 -9
- data/vendor/libgit2/src/libgit2/odb_mempack.c +49 -17
- data/vendor/libgit2/src/libgit2/odb_pack.c +28 -7
- data/vendor/libgit2/src/libgit2/oid.c +35 -2
- data/vendor/libgit2/src/libgit2/oid.h +11 -0
- data/vendor/libgit2/src/libgit2/oidarray.c +49 -3
- data/vendor/libgit2/src/libgit2/oidarray.h +5 -1
- data/vendor/libgit2/src/libgit2/pack-objects.c +77 -43
- data/vendor/libgit2/src/libgit2/pack-objects.h +17 -6
- data/vendor/libgit2/src/libgit2/pack.c +33 -27
- data/vendor/libgit2/src/libgit2/pack.h +15 -10
- data/vendor/libgit2/src/libgit2/parse.c +7 -4
- data/vendor/libgit2/src/libgit2/parse.h +1 -1
- data/vendor/libgit2/src/libgit2/patch.h +7 -1
- data/vendor/libgit2/src/libgit2/patch_generate.c +24 -5
- data/vendor/libgit2/src/libgit2/patch_parse.c +18 -10
- data/vendor/libgit2/src/libgit2/path.c +1 -1
- data/vendor/libgit2/src/libgit2/pathspec.c +1 -1
- data/vendor/libgit2/src/libgit2/push.c +81 -30
- data/vendor/libgit2/src/libgit2/push.h +1 -0
- data/vendor/libgit2/src/libgit2/reader.c +1 -1
- data/vendor/libgit2/src/libgit2/rebase.c +72 -84
- data/vendor/libgit2/src/libgit2/refdb_fs.c +146 -70
- data/vendor/libgit2/src/libgit2/reflog.c +1 -2
- data/vendor/libgit2/src/libgit2/reflog.h +2 -0
- data/vendor/libgit2/src/libgit2/refs.c +34 -8
- data/vendor/libgit2/src/libgit2/refs.h +6 -1
- data/vendor/libgit2/src/libgit2/refspec.c +28 -1
- data/vendor/libgit2/src/libgit2/refspec.h +8 -0
- data/vendor/libgit2/src/libgit2/remote.c +136 -67
- data/vendor/libgit2/src/libgit2/remote.h +1 -0
- data/vendor/libgit2/src/libgit2/repository.c +789 -330
- data/vendor/libgit2/src/libgit2/repository.h +22 -3
- data/vendor/libgit2/src/libgit2/reset.c +2 -2
- data/vendor/libgit2/src/libgit2/revert.c +9 -13
- data/vendor/libgit2/src/libgit2/revparse.c +6 -3
- data/vendor/libgit2/src/libgit2/revwalk.c +36 -11
- data/vendor/libgit2/src/libgit2/revwalk.h +3 -3
- data/vendor/libgit2/src/libgit2/settings.c +468 -0
- data/vendor/libgit2/src/libgit2/settings.h +6 -2
- data/vendor/libgit2/src/libgit2/signature.c +132 -15
- data/vendor/libgit2/src/libgit2/signature.h +0 -1
- data/vendor/libgit2/src/libgit2/stash.c +9 -8
- data/vendor/libgit2/src/libgit2/status.c +1 -1
- data/vendor/libgit2/src/libgit2/streams/mbedtls.c +54 -61
- data/vendor/libgit2/src/libgit2/streams/openssl.c +40 -23
- data/vendor/libgit2/src/libgit2/streams/openssl.h +2 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.c +4 -0
- data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.h +3 -0
- data/vendor/libgit2/src/libgit2/streams/schannel.c +715 -0
- data/vendor/libgit2/src/libgit2/streams/schannel.h +28 -0
- data/vendor/libgit2/src/libgit2/streams/socket.c +237 -51
- data/vendor/libgit2/src/libgit2/streams/socket.h +3 -1
- data/vendor/libgit2/src/libgit2/streams/stransport.c +79 -19
- data/vendor/libgit2/src/libgit2/streams/tls.c +5 -0
- data/vendor/libgit2/src/libgit2/submodule.c +106 -63
- data/vendor/libgit2/src/libgit2/submodule.h +9 -10
- data/vendor/libgit2/src/libgit2/tag.c +1 -1
- data/vendor/libgit2/src/libgit2/trailer.c +6 -6
- data/vendor/libgit2/src/libgit2/transaction.c +26 -20
- data/vendor/libgit2/src/libgit2/transaction.h +4 -1
- data/vendor/libgit2/src/libgit2/transport.c +4 -1
- data/vendor/libgit2/src/libgit2/transports/auth.h +1 -2
- data/vendor/libgit2/src/libgit2/transports/{auth_negotiate.c → auth_gssapi.c} +32 -32
- data/vendor/libgit2/src/libgit2/transports/auth_negotiate.h +1 -1
- data/vendor/libgit2/src/libgit2/transports/auth_ntlm.h +1 -1
- data/vendor/libgit2/src/libgit2/transports/{auth_ntlm.c → auth_ntlmclient.c} +12 -12
- data/vendor/libgit2/src/libgit2/transports/auth_sspi.c +341 -0
- data/vendor/libgit2/src/libgit2/transports/credential.c +1 -1
- data/vendor/libgit2/src/libgit2/transports/git.c +7 -8
- data/vendor/libgit2/src/libgit2/transports/http.c +8 -4
- data/vendor/libgit2/src/libgit2/transports/http.h +0 -10
- data/vendor/libgit2/src/libgit2/transports/httpclient.c +117 -72
- data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
- data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
- data/vendor/libgit2/src/libgit2/transports/local.c +21 -11
- data/vendor/libgit2/src/libgit2/transports/smart.c +50 -32
- data/vendor/libgit2/src/libgit2/transports/smart.h +26 -9
- data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +139 -18
- data/vendor/libgit2/src/libgit2/transports/smart_protocol.c +209 -57
- data/vendor/libgit2/src/libgit2/transports/ssh.c +41 -1103
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +347 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +1126 -0
- data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
- data/vendor/libgit2/src/libgit2/transports/winhttp.c +48 -21
- data/vendor/libgit2/src/libgit2/tree-cache.c +26 -16
- data/vendor/libgit2/src/libgit2/tree-cache.h +5 -3
- data/vendor/libgit2/src/libgit2/tree.c +35 -27
- data/vendor/libgit2/src/libgit2/tree.h +3 -2
- data/vendor/libgit2/src/libgit2/worktree.c +39 -27
- data/vendor/libgit2/src/util/CMakeLists.txt +4 -6
- data/vendor/libgit2/src/util/alloc.c +69 -7
- data/vendor/libgit2/src/util/alloc.h +34 -9
- data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
- data/vendor/libgit2/src/{cli/cli.h → util/allocators/debugalloc.h} +6 -9
- data/vendor/libgit2/src/util/allocators/failalloc.c +0 -60
- data/vendor/libgit2/src/util/allocators/failalloc.h +0 -6
- data/vendor/libgit2/src/util/allocators/stdalloc.c +2 -115
- data/vendor/libgit2/src/util/allocators/win32_leakcheck.c +0 -68
- data/vendor/libgit2/src/util/array.h +24 -18
- data/vendor/libgit2/src/util/cc-compat.h +4 -0
- data/vendor/libgit2/src/util/ctype_compat.h +70 -0
- data/vendor/libgit2/src/util/date.c +22 -14
- data/vendor/libgit2/src/util/date.h +12 -0
- data/vendor/libgit2/src/util/errors.c +401 -0
- data/vendor/libgit2/src/{libgit2 → util}/errors.h +21 -17
- data/vendor/libgit2/src/util/filebuf.c +6 -1
- data/vendor/libgit2/src/util/filebuf.h +19 -6
- data/vendor/libgit2/src/util/fs_path.c +16 -5
- data/vendor/libgit2/src/util/fs_path.h +23 -0
- data/vendor/libgit2/src/util/futils.c +14 -10
- data/vendor/libgit2/src/util/futils.h +13 -4
- data/vendor/libgit2/src/util/git2_features.h.in +21 -4
- data/vendor/libgit2/src/util/git2_util.h +6 -0
- data/vendor/libgit2/src/util/hash/openssl.c +152 -0
- data/vendor/libgit2/src/util/hash/openssl.h +17 -1
- data/vendor/libgit2/src/util/hash/sha.h +4 -1
- data/vendor/libgit2/src/util/hashmap.h +424 -0
- data/vendor/libgit2/src/util/hashmap_str.h +43 -0
- data/vendor/libgit2/src/util/integer.h +3 -1
- data/vendor/libgit2/src/util/net.c +318 -161
- data/vendor/libgit2/src/util/net.h +27 -0
- data/vendor/libgit2/src/util/pool.c +1 -1
- data/vendor/libgit2/src/util/pool.h +5 -0
- data/vendor/libgit2/src/util/posix.c +54 -0
- data/vendor/libgit2/src/util/posix.h +22 -0
- data/vendor/libgit2/src/util/pqueue.h +1 -1
- data/vendor/libgit2/src/util/process.h +222 -0
- data/vendor/libgit2/src/util/rand.c +6 -10
- data/vendor/libgit2/src/util/regexp.c +1 -1
- data/vendor/libgit2/src/util/sortedcache.c +14 -13
- data/vendor/libgit2/src/util/sortedcache.h +3 -3
- data/vendor/libgit2/src/util/staticstr.h +66 -0
- data/vendor/libgit2/src/util/str.c +2 -2
- data/vendor/libgit2/src/util/strlist.c +108 -0
- data/vendor/libgit2/src/util/strlist.h +36 -0
- data/vendor/libgit2/src/util/unix/posix.h +0 -2
- data/vendor/libgit2/src/util/unix/process.c +629 -0
- data/vendor/libgit2/src/util/unix/realpath.c +23 -5
- data/vendor/libgit2/src/util/util.c +17 -12
- data/vendor/libgit2/src/util/util.h +28 -54
- data/vendor/libgit2/src/util/vector.c +3 -3
- data/vendor/libgit2/src/util/vector.h +2 -2
- data/vendor/libgit2/src/util/win32/error.c +1 -1
- data/vendor/libgit2/src/util/win32/path_w32.c +8 -8
- data/vendor/libgit2/src/util/win32/posix_w32.c +30 -7
- data/vendor/libgit2/src/util/win32/process.c +506 -0
- data/vendor/libgit2/src/util/win32/utf-conv.c +73 -75
- data/vendor/libgit2/src/util/win32/utf-conv.h +81 -14
- data/vendor/libgit2/src/util/win32/w32_util.c +1 -1
- metadata +72 -49
- data/vendor/libgit2/cmake/SelectWinHTTP.cmake +0 -17
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -6
- data/vendor/libgit2/deps/http-parser/COPYING +0 -23
- data/vendor/libgit2/deps/http-parser/http_parser.c +0 -2182
- data/vendor/libgit2/deps/http-parser/http_parser.h +0 -305
- data/vendor/libgit2/deps/zlib/COPYING +0 -27
- data/vendor/libgit2/include/git2/sys/reflog.h +0 -21
- data/vendor/libgit2/src/libgit2/config_entries.c +0 -237
- data/vendor/libgit2/src/libgit2/config_entries.h +0 -24
- data/vendor/libgit2/src/libgit2/errors.c +0 -238
- data/vendor/libgit2/src/libgit2/idxmap.c +0 -157
- data/vendor/libgit2/src/libgit2/idxmap.h +0 -177
- data/vendor/libgit2/src/libgit2/libgit2.h +0 -15
- data/vendor/libgit2/src/libgit2/netops.c +0 -124
- data/vendor/libgit2/src/libgit2/netops.h +0 -68
- data/vendor/libgit2/src/libgit2/offmap.c +0 -101
- data/vendor/libgit2/src/libgit2/offmap.h +0 -133
- data/vendor/libgit2/src/libgit2/oidmap.c +0 -107
- data/vendor/libgit2/src/libgit2/oidmap.h +0 -128
- data/vendor/libgit2/src/libgit2/threadstate.c +0 -84
- data/vendor/libgit2/src/libgit2/threadstate.h +0 -24
- data/vendor/libgit2/src/libgit2/transports/ssh.h +0 -14
- data/vendor/libgit2/src/util/khash.h +0 -615
- data/vendor/libgit2/src/util/strmap.c +0 -100
- data/vendor/libgit2/src/util/strmap.h +0 -131
- /data/vendor/libgit2/cmake/{FindHTTPParser.cmake → FindHTTP_Parser.cmake} +0 -0
- /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiff.h +0 -0
- /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xemit.h +0 -0
- /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xinclude.h +0 -0
- /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xprepare.h +0 -0
- /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xtypes.h +0 -0
@@ -10,12 +10,14 @@
|
|
10
10
|
#include "common.h"
|
11
11
|
#include "types.h"
|
12
12
|
#include "oid.h"
|
13
|
+
#include "odb.h"
|
13
14
|
#include "buffer.h"
|
15
|
+
#include "commit.h"
|
14
16
|
|
15
17
|
/**
|
16
18
|
* @file git2/repository.h
|
17
|
-
* @brief
|
18
|
-
* @defgroup git_repository
|
19
|
+
* @brief The repository stores revisions for a source tree
|
20
|
+
* @defgroup git_repository The repository stores revisions for a source tree
|
19
21
|
* @ingroup Git
|
20
22
|
* @{
|
21
23
|
*/
|
@@ -30,7 +32,11 @@ GIT_BEGIN_DECL
|
|
30
32
|
* The method will automatically detect if 'path' is a normal
|
31
33
|
* or bare repository or fail is 'path' is neither.
|
32
34
|
*
|
33
|
-
*
|
35
|
+
* Note that the libgit2 library _must_ be initialized using
|
36
|
+
* `git_libgit2_init` before any APIs can be called, including
|
37
|
+
* this one.
|
38
|
+
*
|
39
|
+
* @param[out] out pointer to the repo which will be opened
|
34
40
|
* @param path the path to the repository
|
35
41
|
* @return 0 or an error code
|
36
42
|
*/
|
@@ -58,7 +64,9 @@ GIT_EXTERN(int) git_repository_open_from_worktree(git_repository **out, git_work
|
|
58
64
|
* @param odb the object database to wrap
|
59
65
|
* @return 0 or an error code
|
60
66
|
*/
|
61
|
-
GIT_EXTERN(int) git_repository_wrap_odb(
|
67
|
+
GIT_EXTERN(int) git_repository_wrap_odb(
|
68
|
+
git_repository **out,
|
69
|
+
git_odb *odb);
|
62
70
|
|
63
71
|
/**
|
64
72
|
* Look for a git repository and copy its path in the given buffer.
|
@@ -70,6 +78,10 @@ GIT_EXTERN(int) git_repository_wrap_odb(git_repository **out, git_odb *odb);
|
|
70
78
|
* The method will automatically detect if the repository is bare
|
71
79
|
* (if there is a repository).
|
72
80
|
*
|
81
|
+
* Note that the libgit2 library _must_ be initialized using
|
82
|
+
* `git_libgit2_init` before any APIs can be called, including
|
83
|
+
* this one.
|
84
|
+
*
|
73
85
|
* @param out A pointer to a user-allocated git_buf which will contain
|
74
86
|
* the found path.
|
75
87
|
*
|
@@ -147,7 +159,11 @@ typedef enum {
|
|
147
159
|
/**
|
148
160
|
* Find and open a repository with extended controls.
|
149
161
|
*
|
150
|
-
*
|
162
|
+
* Note that the libgit2 library _must_ be initialized using
|
163
|
+
* `git_libgit2_init` before any APIs can be called, including
|
164
|
+
* this one.
|
165
|
+
*
|
166
|
+
* @param[out] out Pointer to the repo which will be opened. This can
|
151
167
|
* actually be NULL if you only want to use the error code to
|
152
168
|
* see if a repo at this path could be opened.
|
153
169
|
* @param path Path to open as git repository. If the flags
|
@@ -175,7 +191,11 @@ GIT_EXTERN(int) git_repository_open_ext(
|
|
175
191
|
* if you're e.g. hosting git repositories and need to access them
|
176
192
|
* efficiently
|
177
193
|
*
|
178
|
-
*
|
194
|
+
* Note that the libgit2 library _must_ be initialized using
|
195
|
+
* `git_libgit2_init` before any APIs can be called, including
|
196
|
+
* this one.
|
197
|
+
*
|
198
|
+
* @param[out] out Pointer to the repo which will be opened.
|
179
199
|
* @param bare_path Direct path to the bare repository
|
180
200
|
* @return 0 on success, or an error code
|
181
201
|
*/
|
@@ -200,7 +220,11 @@ GIT_EXTERN(void) git_repository_free(git_repository *repo);
|
|
200
220
|
* TODO:
|
201
221
|
* - Reinit the repository
|
202
222
|
*
|
203
|
-
*
|
223
|
+
* Note that the libgit2 library _must_ be initialized using
|
224
|
+
* `git_libgit2_init` before any APIs can be called, including
|
225
|
+
* this one.
|
226
|
+
*
|
227
|
+
* @param[out] out pointer to the repo which will be created or reinitialized
|
204
228
|
* @param path the path to the repository
|
205
229
|
* @param is_bare if true, a Git repository without a working directory is
|
206
230
|
* created at the pointed path. If false, provided path will be
|
@@ -362,7 +386,10 @@ typedef struct {
|
|
362
386
|
#endif
|
363
387
|
} git_repository_init_options;
|
364
388
|
|
389
|
+
/** Current version for the `git_repository_init_options` structure */
|
365
390
|
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
|
391
|
+
|
392
|
+
/** Static constructor for `git_repository_init_options` */
|
366
393
|
#define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
|
367
394
|
|
368
395
|
/**
|
@@ -387,6 +414,10 @@ GIT_EXTERN(int) git_repository_init_options_init(
|
|
387
414
|
* auto-detect the case sensitivity of the file system and if the
|
388
415
|
* file system supports file mode bits correctly.
|
389
416
|
*
|
417
|
+
* Note that the libgit2 library _must_ be initialized using
|
418
|
+
* `git_libgit2_init` before any APIs can be called, including
|
419
|
+
* this one.
|
420
|
+
*
|
390
421
|
* @param out Pointer to the repo which will be created or reinitialized.
|
391
422
|
* @param repo_path The path to the repository.
|
392
423
|
* @param opts Pointer to git_repository_init_options struct.
|
@@ -404,7 +435,7 @@ GIT_EXTERN(int) git_repository_init_ext(
|
|
404
435
|
* `git_reference_free()` must be called when done with it to release the
|
405
436
|
* allocated memory and prevent a leak.
|
406
437
|
*
|
407
|
-
* @param out pointer to the reference which will be retrieved
|
438
|
+
* @param[out] out pointer to the reference which will be retrieved
|
408
439
|
* @param repo a repository object
|
409
440
|
*
|
410
441
|
* @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
|
@@ -493,6 +524,7 @@ typedef enum {
|
|
493
524
|
GIT_REPOSITORY_ITEM_LOGS,
|
494
525
|
GIT_REPOSITORY_ITEM_MODULES,
|
495
526
|
GIT_REPOSITORY_ITEM_WORKTREES,
|
527
|
+
GIT_REPOSITORY_ITEM_WORKTREE_CONFIG,
|
496
528
|
GIT_REPOSITORY_ITEM__LAST
|
497
529
|
} git_repository_item_t;
|
498
530
|
|
@@ -536,7 +568,7 @@ GIT_EXTERN(const char *) git_repository_workdir(const git_repository *repo);
|
|
536
568
|
|
537
569
|
/**
|
538
570
|
* Get the path of the shared common directory for this repository.
|
539
|
-
*
|
571
|
+
*
|
540
572
|
* If the repository is bare, it is the root directory for the repository.
|
541
573
|
* If the repository is a worktree, it is the parent repo's gitdir.
|
542
574
|
* Otherwise, it is the gitdir.
|
@@ -624,7 +656,7 @@ GIT_EXTERN(int) git_repository_config_snapshot(git_config **out, git_repository
|
|
624
656
|
* The ODB must be freed once it's no longer being used by
|
625
657
|
* the user.
|
626
658
|
*
|
627
|
-
* @param out Pointer to store the loaded ODB
|
659
|
+
* @param[out] out Pointer to store the loaded ODB
|
628
660
|
* @param repo A repository object
|
629
661
|
* @return 0, or an error code
|
630
662
|
*/
|
@@ -640,7 +672,7 @@ GIT_EXTERN(int) git_repository_odb(git_odb **out, git_repository *repo);
|
|
640
672
|
* The refdb must be freed once it's no longer being used by
|
641
673
|
* the user.
|
642
674
|
*
|
643
|
-
* @param out Pointer to store the loaded refdb
|
675
|
+
* @param[out] out Pointer to store the loaded refdb
|
644
676
|
* @param repo A repository object
|
645
677
|
* @return 0, or an error code
|
646
678
|
*/
|
@@ -656,7 +688,7 @@ GIT_EXTERN(int) git_repository_refdb(git_refdb **out, git_repository *repo);
|
|
656
688
|
* The index must be freed once it's no longer being used by
|
657
689
|
* the user.
|
658
690
|
*
|
659
|
-
* @param out Pointer to store the loaded index
|
691
|
+
* @param[out] out Pointer to store the loaded index
|
660
692
|
* @param repo A repository object
|
661
693
|
* @return 0, or an error code
|
662
694
|
*/
|
@@ -846,7 +878,9 @@ GIT_EXTERN(int) git_repository_set_head_detached(
|
|
846
878
|
*
|
847
879
|
* See the documentation for `git_repository_set_head_detached()`.
|
848
880
|
*
|
849
|
-
* @
|
881
|
+
* @param repo Repository pointer
|
882
|
+
* @param committish annotated commit to point HEAD to
|
883
|
+
* @return 0 on success, or an error code
|
850
884
|
*/
|
851
885
|
GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
|
852
886
|
git_repository *repo,
|
@@ -939,8 +973,8 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
|
|
939
973
|
* The memory is owned by the repository and must not be freed by the
|
940
974
|
* user.
|
941
975
|
*
|
942
|
-
* @param name where to store the pointer to the name
|
943
|
-
* @param email where to store the pointer to the email
|
976
|
+
* @param[out] name where to store the pointer to the name
|
977
|
+
* @param[out] email where to store the pointer to the email
|
944
978
|
* @param repo the repository
|
945
979
|
* @return 0 or an error code
|
946
980
|
*/
|
@@ -968,6 +1002,18 @@ GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name,
|
|
968
1002
|
*/
|
969
1003
|
GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo);
|
970
1004
|
|
1005
|
+
/**
|
1006
|
+
* Gets the parents of the next commit, given the current repository state.
|
1007
|
+
* Generally, this is the HEAD commit, except when performing a merge, in
|
1008
|
+
* which case it is two or more commits.
|
1009
|
+
*
|
1010
|
+
* @param commits a `git_commitarray` that will contain the commit parents
|
1011
|
+
* @param repo the repository
|
1012
|
+
* @return 0 or an error code
|
1013
|
+
*/
|
1014
|
+
GIT_EXTERN(int) git_repository_commit_parents(git_commitarray *commits, git_repository *repo);
|
1015
|
+
|
971
1016
|
/** @} */
|
972
1017
|
GIT_END_DECL
|
1018
|
+
|
973
1019
|
#endif
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* @file git2/reset.h
|
17
|
-
* @brief
|
17
|
+
* @brief Reset will update the local repository to a prior state
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -75,11 +75,23 @@ GIT_EXTERN(int) git_reset(
|
|
75
75
|
*
|
76
76
|
* See the documentation for `git_reset()`.
|
77
77
|
*
|
78
|
-
* @
|
78
|
+
* @param repo Repository where to perform the reset operation.
|
79
|
+
*
|
80
|
+
* @param target Annotated commit to which the Head should be moved to.
|
81
|
+
* This object must belong to the given `repo`, it will be dereferenced
|
82
|
+
* to a git_commit which oid will be used as the target of the branch.
|
83
|
+
*
|
84
|
+
* @param reset_type Kind of reset operation to perform.
|
85
|
+
*
|
86
|
+
* @param checkout_opts Optional checkout options to be used for a HARD reset.
|
87
|
+
* The checkout_strategy field will be overridden (based on reset_type).
|
88
|
+
* This parameter can be used to propagate notify and progress callbacks.
|
89
|
+
*
|
90
|
+
* @return 0 on success or an error code
|
79
91
|
*/
|
80
92
|
GIT_EXTERN(int) git_reset_from_annotated(
|
81
93
|
git_repository *repo,
|
82
|
-
const git_annotated_commit *
|
94
|
+
const git_annotated_commit *target,
|
83
95
|
git_reset_t reset_type,
|
84
96
|
const git_checkout_options *checkout_opts);
|
85
97
|
|
@@ -108,4 +120,5 @@ GIT_EXTERN(int) git_reset_default(
|
|
108
120
|
|
109
121
|
/** @} */
|
110
122
|
GIT_END_DECL
|
123
|
+
|
111
124
|
#endif
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/revert.h
|
16
|
-
* @brief
|
17
|
-
* @defgroup git_revert
|
16
|
+
* @brief Cherry-pick the inverse of a change to "undo" its effects
|
17
|
+
* @defgroup git_revert Cherry-pick the inverse of a change to "undo" its effects
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -33,8 +33,13 @@ typedef struct {
|
|
33
33
|
git_checkout_options checkout_opts; /**< Options for the checkout */
|
34
34
|
} git_revert_options;
|
35
35
|
|
36
|
+
/** Current version for the `git_revert_options` structure */
|
36
37
|
#define GIT_REVERT_OPTIONS_VERSION 1
|
37
|
-
|
38
|
+
|
39
|
+
/** Static constructor for `git_revert_options` */
|
40
|
+
#define GIT_REVERT_OPTIONS_INIT { \
|
41
|
+
GIT_REVERT_OPTIONS_VERSION, 0, \
|
42
|
+
GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT }
|
38
43
|
|
39
44
|
/**
|
40
45
|
* Initialize git_revert_options structure
|
@@ -87,5 +92,5 @@ GIT_EXTERN(int) git_revert(
|
|
87
92
|
|
88
93
|
/** @} */
|
89
94
|
GIT_END_DECL
|
90
|
-
#endif
|
91
95
|
|
96
|
+
#endif
|
@@ -12,8 +12,8 @@
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @file git2/revparse.h
|
15
|
-
* @brief
|
16
|
-
* @defgroup git_revparse
|
15
|
+
* @brief Parse the textual revision information
|
16
|
+
* @defgroup git_revparse Parse the textual revision information
|
17
17
|
* @ingroup Git
|
18
18
|
* @{
|
19
19
|
*/
|
@@ -107,7 +107,7 @@ GIT_EXTERN(int) git_revparse(
|
|
107
107
|
git_repository *repo,
|
108
108
|
const char *spec);
|
109
109
|
|
110
|
-
|
111
110
|
/** @} */
|
112
111
|
GIT_END_DECL
|
112
|
+
|
113
113
|
#endif
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/revwalk.h
|
16
|
-
* @brief
|
17
|
-
* @defgroup git_revwalk
|
16
|
+
* @brief Traverse (walk) the commit graph (revision history)
|
17
|
+
* @defgroup git_revwalk Traverse (walk) the commit graph (revision history)
|
18
18
|
* @ingroup Git
|
19
19
|
* @{
|
20
20
|
*/
|
@@ -299,4 +299,5 @@ GIT_EXTERN(int) git_revwalk_add_hide_cb(
|
|
299
299
|
|
300
300
|
/** @} */
|
301
301
|
GIT_END_DECL
|
302
|
+
|
302
303
|
#endif
|
@@ -12,9 +12,13 @@
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @file git2/signature.h
|
15
|
-
* @brief
|
15
|
+
* @brief Signatures are the actor in a repository and when they acted
|
16
16
|
* @defgroup git_signature Git signature creation
|
17
17
|
* @ingroup Git
|
18
|
+
*
|
19
|
+
* Signatures contain the information about the actor (committer or
|
20
|
+
* author) in a repository, and the time that they performed the
|
21
|
+
* commit, or authoring.
|
18
22
|
* @{
|
19
23
|
*/
|
20
24
|
GIT_BEGIN_DECL
|
@@ -48,6 +52,42 @@ GIT_EXTERN(int) git_signature_new(git_signature **out, const char *name, const c
|
|
48
52
|
*/
|
49
53
|
GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const char *email);
|
50
54
|
|
55
|
+
/**
|
56
|
+
* Create a new author and/or committer signatures with default
|
57
|
+
* information based on the configuration and environment variables.
|
58
|
+
*
|
59
|
+
* If `author_out` is set, it will be populated with the author
|
60
|
+
* information. The `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`
|
61
|
+
* environment variables will be honored, and `user.name` and
|
62
|
+
* `user.email` configuration options will be honored if the
|
63
|
+
* environment variables are unset. For timestamps, `GIT_AUTHOR_DATE`
|
64
|
+
* will be used, otherwise the current time will be used.
|
65
|
+
*
|
66
|
+
* If `committer_out` is set, it will be populated with the
|
67
|
+
* committer information. The `GIT_COMMITTER_NAME` and
|
68
|
+
* `GIT_COMMITTER_EMAIL` environment variables will be honored,
|
69
|
+
* and `user.name` and `user.email` configuration options will
|
70
|
+
* be honored if the environment variables are unset. For timestamps,
|
71
|
+
* `GIT_COMMITTER_DATE` will be used, otherwise the current time will
|
72
|
+
* be used.
|
73
|
+
*
|
74
|
+
* If neither `GIT_AUTHOR_DATE` nor `GIT_COMMITTER_DATE` are set,
|
75
|
+
* both timestamps will be set to the same time.
|
76
|
+
*
|
77
|
+
* It will return `GIT_ENOTFOUND` if either the `user.name` or
|
78
|
+
* `user.email` are not set and there is no fallback from an environment
|
79
|
+
* variable. One of `author_out` or `committer_out` must be set.
|
80
|
+
*
|
81
|
+
* @param author_out pointer to set the author signature, or NULL
|
82
|
+
* @param committer_out pointer to set the committer signature, or NULL
|
83
|
+
* @param repo repository pointer
|
84
|
+
* @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
|
85
|
+
*/
|
86
|
+
GIT_EXTERN(int) git_signature_default_from_env(
|
87
|
+
git_signature **author_out,
|
88
|
+
git_signature **committer_out,
|
89
|
+
git_repository *repo);
|
90
|
+
|
51
91
|
/**
|
52
92
|
* Create a new action signature with default user and now timestamp.
|
53
93
|
*
|
@@ -56,6 +96,10 @@ GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const c
|
|
56
96
|
* based on that information. It will return GIT_ENOTFOUND if either the
|
57
97
|
* user.name or user.email are not set.
|
58
98
|
*
|
99
|
+
* Note that these do not examine environment variables, only the
|
100
|
+
* configuration files. Use `git_signature_default_from_env` to
|
101
|
+
* consider the environment variables.
|
102
|
+
*
|
59
103
|
* @param out new signature
|
60
104
|
* @param repo repository pointer
|
61
105
|
* @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
|
@@ -100,4 +144,5 @@ GIT_EXTERN(void) git_signature_free(git_signature *sig);
|
|
100
144
|
|
101
145
|
/** @} */
|
102
146
|
GIT_END_DECL
|
147
|
+
|
103
148
|
#endif
|
@@ -13,8 +13,13 @@
|
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @file git2/stash.h
|
16
|
-
* @brief
|
16
|
+
* @brief Stashes stores some uncommitted state in the repository
|
17
17
|
* @ingroup Git
|
18
|
+
*
|
19
|
+
* Stashes stores some uncommitted state in the repository; generally
|
20
|
+
* this allows a user to stash some changes so that they can restore
|
21
|
+
* the working directory to an unmodified state. This can allow a
|
22
|
+
* developer to work on two different changes in parallel.
|
18
23
|
* @{
|
19
24
|
*/
|
20
25
|
GIT_BEGIN_DECL
|
@@ -94,7 +99,10 @@ typedef struct git_stash_save_options {
|
|
94
99
|
git_strarray paths;
|
95
100
|
} git_stash_save_options;
|
96
101
|
|
102
|
+
/** Current version for the `git_stash_save_options` structure */
|
97
103
|
#define GIT_STASH_SAVE_OPTIONS_VERSION 1
|
104
|
+
|
105
|
+
/** Static constructor for `git_stash_save_options` */
|
98
106
|
#define GIT_STASH_SAVE_OPTIONS_INIT { GIT_STASH_SAVE_OPTIONS_VERSION }
|
99
107
|
|
100
108
|
/**
|
@@ -165,6 +173,10 @@ typedef enum {
|
|
165
173
|
* Stash application progress notification function.
|
166
174
|
* Return 0 to continue processing, or a negative value to
|
167
175
|
* abort the stash application.
|
176
|
+
*
|
177
|
+
* @param progress the progress information
|
178
|
+
* @param payload the user-specified payload to the apply function
|
179
|
+
* @return 0 on success, -1 on error
|
168
180
|
*/
|
169
181
|
typedef int GIT_CALLBACK(git_stash_apply_progress_cb)(
|
170
182
|
git_stash_apply_progress_t progress,
|
@@ -191,7 +203,10 @@ typedef struct git_stash_apply_options {
|
|
191
203
|
void *progress_payload;
|
192
204
|
} git_stash_apply_options;
|
193
205
|
|
206
|
+
/** Current version for the `git_stash_apply_options` structure */
|
194
207
|
#define GIT_STASH_APPLY_OPTIONS_VERSION 1
|
208
|
+
|
209
|
+
/** Static constructor for `git_stash_apply_options` */
|
195
210
|
#define GIT_STASH_APPLY_OPTIONS_INIT { \
|
196
211
|
GIT_STASH_APPLY_OPTIONS_VERSION, \
|
197
212
|
GIT_STASH_APPLY_DEFAULT, \
|
@@ -225,8 +240,6 @@ GIT_EXTERN(int) git_stash_apply_options_init(
|
|
225
240
|
* GIT_EMERGECONFLICT and both the working directory and index will be left
|
226
241
|
* unmodified.
|
227
242
|
*
|
228
|
-
* Note that a minimum checkout strategy of `GIT_CHECKOUT_SAFE` is implied.
|
229
|
-
*
|
230
243
|
* @param repo The owning repository.
|
231
244
|
* @param index The position within the stash list. 0 points to the
|
232
245
|
* most recent stashed state.
|
@@ -311,4 +324,5 @@ GIT_EXTERN(int) git_stash_pop(
|
|
311
324
|
|
312
325
|
/** @} */
|
313
326
|
GIT_END_DECL
|
327
|
+
|
314
328
|
#endif
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
/**
|
16
16
|
* @file git2/status.h
|
17
|
-
* @brief
|
17
|
+
* @brief Status indicates how a user has changed the working directory and index
|
18
18
|
* @defgroup git_status Git file status routines
|
19
19
|
* @ingroup Git
|
20
20
|
* @{
|
@@ -54,11 +54,10 @@ typedef enum {
|
|
54
54
|
/**
|
55
55
|
* Function pointer to receive status on individual files
|
56
56
|
*
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
61
|
-
* `payload` is the value you passed to the foreach function as payload.
|
57
|
+
* @param path is the path to the file
|
58
|
+
* @param status_flags the `git_status_t` values for file's status
|
59
|
+
* @param payload the user-specified payload to the foreach function
|
60
|
+
* @return 0 on success, or a negative number on failure
|
62
61
|
*/
|
63
62
|
typedef int GIT_CALLBACK(git_status_cb)(
|
64
63
|
const char *path, unsigned int status_flags, void *payload);
|
@@ -207,6 +206,7 @@ typedef enum {
|
|
207
206
|
GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 15)
|
208
207
|
} git_status_opt_t;
|
209
208
|
|
209
|
+
/** Default `git_status_opt_t` values */
|
210
210
|
#define GIT_STATUS_OPT_DEFAULTS \
|
211
211
|
(GIT_STATUS_OPT_INCLUDE_IGNORED | \
|
212
212
|
GIT_STATUS_OPT_INCLUDE_UNTRACKED | \
|
@@ -261,7 +261,10 @@ typedef struct {
|
|
261
261
|
uint16_t rename_threshold;
|
262
262
|
} git_status_options;
|
263
263
|
|
264
|
+
/** Current version for the `git_status_options` structure */
|
264
265
|
#define GIT_STATUS_OPTIONS_VERSION 1
|
266
|
+
|
267
|
+
/** Static constructor for `git_status_options` */
|
265
268
|
#define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION}
|
266
269
|
|
267
270
|
/**
|
@@ -449,4 +452,5 @@ GIT_EXTERN(int) git_status_should_ignore(
|
|
449
452
|
|
450
453
|
/** @} */
|
451
454
|
GIT_END_DECL
|
455
|
+
|
452
456
|
#endif
|