rugged 0.26.7 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/rugged/rugged_blame.c +6 -3
- data/ext/rugged/rugged_branch_collection.c +3 -6
- data/ext/rugged/rugged_commit.c +56 -0
- data/ext/rugged/rugged_config.c +44 -9
- data/ext/rugged/rugged_diff.c +3 -14
- data/ext/rugged/rugged_diff_hunk.c +1 -3
- data/ext/rugged/rugged_index.c +1 -5
- data/ext/rugged/rugged_note.c +1 -4
- data/ext/rugged/rugged_patch.c +1 -4
- data/ext/rugged/rugged_reference_collection.c +1 -7
- data/ext/rugged/rugged_remote.c +5 -8
- data/ext/rugged/rugged_remote_collection.c +1 -6
- data/ext/rugged/rugged_repo.c +16 -48
- data/ext/rugged/rugged_revwalk.c +7 -16
- data/ext/rugged/rugged_settings.c +28 -0
- data/ext/rugged/rugged_submodule_collection.c +3 -4
- data/ext/rugged/rugged_tag_collection.c +1 -5
- data/ext/rugged/rugged_tree.c +2 -3
- data/lib/rugged/repository.rb +43 -0
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/AUTHORS +1 -0
- data/vendor/libgit2/CMakeLists.txt +61 -510
- data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +14 -0
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +25 -8
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +27 -8
- data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +20 -0
- data/vendor/libgit2/cmake/Modules/IdeSplitSources.cmake +22 -0
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +3 -0
- data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/winhttp/CMakeLists.txt +26 -0
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +4 -0
- data/vendor/libgit2/include/git2/config.h +29 -2
- data/vendor/libgit2/include/git2/describe.h +1 -1
- data/vendor/libgit2/include/git2/diff.h +59 -8
- data/vendor/libgit2/include/git2/graph.h +3 -0
- data/vendor/libgit2/include/git2/merge.h +6 -0
- data/vendor/libgit2/include/git2/message.h +43 -3
- data/vendor/libgit2/include/git2/notes.h +89 -0
- data/vendor/libgit2/include/git2/odb.h +8 -1
- data/vendor/libgit2/include/git2/patch.h +2 -2
- data/vendor/libgit2/include/git2/pathspec.h +35 -18
- data/vendor/libgit2/include/git2/refs.h +3 -0
- data/vendor/libgit2/include/git2/remote.h +34 -4
- data/vendor/libgit2/include/git2/repository.h +6 -6
- data/vendor/libgit2/include/git2/reset.h +4 -4
- data/vendor/libgit2/include/git2/status.h +4 -0
- data/vendor/libgit2/include/git2/sys/config.h +4 -1
- data/vendor/libgit2/include/git2/sys/odb_backend.h +2 -1
- data/vendor/libgit2/include/git2/tree.h +4 -3
- data/vendor/libgit2/include/git2/types.h +1 -0
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/include/git2/worktree.h +1 -1
- data/vendor/libgit2/src/CMakeLists.txt +463 -0
- data/vendor/libgit2/src/annotated_commit.c +1 -1
- data/vendor/libgit2/src/annotated_commit.h +2 -0
- data/vendor/libgit2/src/apply.c +2 -1
- data/vendor/libgit2/src/apply.h +2 -0
- data/vendor/libgit2/src/attr.c +24 -4
- data/vendor/libgit2/src/attr.h +2 -0
- data/vendor/libgit2/src/attr_file.c +9 -2
- data/vendor/libgit2/src/attr_file.h +2 -0
- data/vendor/libgit2/src/attrcache.c +9 -1
- data/vendor/libgit2/src/attrcache.h +2 -0
- data/vendor/libgit2/src/blame.c +1 -0
- data/vendor/libgit2/src/blame.h +2 -1
- data/vendor/libgit2/src/blame_git.c +1 -0
- data/vendor/libgit2/src/blame_git.h +2 -0
- data/vendor/libgit2/src/blob.c +2 -2
- data/vendor/libgit2/src/blob.h +2 -0
- data/vendor/libgit2/src/branch.c +8 -1
- data/vendor/libgit2/src/branch.h +2 -0
- data/vendor/libgit2/src/buf_text.c +7 -7
- data/vendor/libgit2/src/buf_text.h +3 -3
- data/vendor/libgit2/src/buffer.c +31 -1
- data/vendor/libgit2/src/buffer.h +3 -0
- data/vendor/libgit2/src/cache.c +2 -2
- data/vendor/libgit2/src/cache.h +2 -0
- data/vendor/libgit2/src/cc-compat.h +3 -3
- data/vendor/libgit2/src/checkout.c +30 -19
- data/vendor/libgit2/src/checkout.h +2 -0
- data/vendor/libgit2/src/cherrypick.c +1 -0
- data/vendor/libgit2/src/clone.c +2 -1
- data/vendor/libgit2/src/clone.h +4 -0
- data/vendor/libgit2/src/commit.c +2 -1
- data/vendor/libgit2/src/commit.h +2 -0
- data/vendor/libgit2/src/commit_list.c +1 -1
- data/vendor/libgit2/src/commit_list.h +2 -0
- data/vendor/libgit2/src/common.h +11 -5
- data/vendor/libgit2/src/config.c +12 -10
- data/vendor/libgit2/src/config.h +2 -0
- data/vendor/libgit2/src/config_cache.c +1 -0
- data/vendor/libgit2/src/config_file.c +287 -786
- data/vendor/libgit2/src/config_file.h +4 -3
- data/vendor/libgit2/src/config_parse.c +525 -0
- data/vendor/libgit2/src/config_parse.h +64 -0
- data/vendor/libgit2/src/crlf.c +2 -1
- data/vendor/libgit2/src/delta.c +28 -30
- data/vendor/libgit2/src/delta.h +1 -0
- data/vendor/libgit2/src/describe.c +3 -1
- data/vendor/libgit2/src/diff.c +148 -2
- data/vendor/libgit2/src/diff.h +3 -1
- data/vendor/libgit2/src/diff_driver.c +12 -9
- data/vendor/libgit2/src/diff_driver.h +4 -1
- data/vendor/libgit2/src/diff_file.c +7 -4
- data/vendor/libgit2/src/diff_file.h +1 -0
- data/vendor/libgit2/src/diff_generate.c +6 -3
- data/vendor/libgit2/src/diff_generate.h +6 -1
- data/vendor/libgit2/src/diff_parse.c +5 -4
- data/vendor/libgit2/src/diff_parse.h +2 -0
- data/vendor/libgit2/src/diff_print.c +2 -0
- data/vendor/libgit2/src/diff_stats.c +2 -0
- data/vendor/libgit2/src/diff_tform.c +2 -1
- data/vendor/libgit2/src/diff_tform.h +4 -1
- data/vendor/libgit2/src/diff_xdiff.c +5 -2
- data/vendor/libgit2/src/diff_xdiff.h +2 -0
- data/vendor/libgit2/src/errors.c +2 -0
- data/vendor/libgit2/src/features.h.in +36 -0
- data/vendor/libgit2/src/fetch.c +2 -2
- data/vendor/libgit2/src/fetch.h +4 -0
- data/vendor/libgit2/src/fetchhead.c +3 -3
- data/vendor/libgit2/src/fetchhead.h +3 -0
- data/vendor/libgit2/src/filebuf.c +2 -1
- data/vendor/libgit2/src/filebuf.h +2 -0
- data/vendor/libgit2/src/fileops.c +12 -1
- data/vendor/libgit2/src/fileops.h +7 -1
- data/vendor/libgit2/src/filter.c +2 -1
- data/vendor/libgit2/src/filter.h +1 -0
- data/vendor/libgit2/src/fnmatch.c +2 -2
- data/vendor/libgit2/src/fnmatch.h +3 -4
- data/vendor/libgit2/src/global.c +4 -3
- data/vendor/libgit2/src/global.h +1 -5
- data/vendor/libgit2/src/graph.c +2 -0
- data/vendor/libgit2/src/hash.c +0 -1
- data/vendor/libgit2/src/hash.h +3 -1
- data/vendor/libgit2/src/hash/hash_collisiondetect.h +3 -3
- data/vendor/libgit2/src/hash/hash_common_crypto.h +18 -5
- data/vendor/libgit2/src/hash/hash_generic.c +2 -2
- data/vendor/libgit2/src/hash/hash_generic.h +5 -3
- data/vendor/libgit2/src/hash/hash_openssl.h +3 -3
- data/vendor/libgit2/src/hash/hash_win32.c +57 -14
- data/vendor/libgit2/src/hash/hash_win32.h +4 -3
- data/vendor/libgit2/src/hashsig.c +3 -0
- data/vendor/libgit2/src/ident.c +2 -0
- data/vendor/libgit2/src/idxmap.h +2 -1
- data/vendor/libgit2/src/ignore.c +14 -2
- data/vendor/libgit2/src/ignore.h +2 -0
- data/vendor/libgit2/src/index.c +20 -40
- data/vendor/libgit2/src/index.h +2 -0
- data/vendor/libgit2/src/indexer.c +13 -5
- data/vendor/libgit2/src/indexer.h +5 -1
- data/vendor/libgit2/src/integer.h +1 -1
- data/vendor/libgit2/src/iterator.c +44 -3
- data/vendor/libgit2/src/iterator.h +3 -0
- data/vendor/libgit2/src/map.h +1 -1
- data/vendor/libgit2/src/merge.c +155 -33
- data/vendor/libgit2/src/merge.h +2 -0
- data/vendor/libgit2/src/merge_driver.c +2 -2
- data/vendor/libgit2/src/merge_driver.h +2 -0
- data/vendor/libgit2/src/merge_file.c +3 -0
- data/vendor/libgit2/src/message.h +3 -1
- data/vendor/libgit2/src/mwindow.c +1 -1
- data/vendor/libgit2/src/mwindow.h +2 -0
- data/vendor/libgit2/src/netops.c +75 -62
- data/vendor/libgit2/src/netops.h +2 -1
- data/vendor/libgit2/src/notes.c +164 -48
- data/vendor/libgit2/src/notes.h +1 -1
- data/vendor/libgit2/src/object.c +14 -3
- data/vendor/libgit2/src/object.h +4 -0
- data/vendor/libgit2/src/object_api.c +3 -2
- data/vendor/libgit2/src/odb.c +104 -38
- data/vendor/libgit2/src/odb.h +3 -1
- data/vendor/libgit2/src/odb_loose.c +414 -267
- data/vendor/libgit2/src/odb_mempack.c +1 -0
- data/vendor/libgit2/src/odb_pack.c +2 -1
- data/vendor/libgit2/src/offmap.h +1 -0
- data/vendor/libgit2/src/oid.c +2 -1
- data/vendor/libgit2/src/oid.h +3 -8
- data/vendor/libgit2/src/oidarray.c +2 -1
- data/vendor/libgit2/src/oidarray.h +1 -0
- data/vendor/libgit2/src/oidmap.h +1 -0
- data/vendor/libgit2/src/pack-objects.c +5 -1
- data/vendor/libgit2/src/pack-objects.h +1 -1
- data/vendor/libgit2/src/pack.c +2 -6
- data/vendor/libgit2/src/pack.h +2 -1
- data/vendor/libgit2/src/parse.c +121 -0
- data/vendor/libgit2/src/parse.h +61 -0
- data/vendor/libgit2/src/patch.c +9 -2
- data/vendor/libgit2/src/patch.h +2 -0
- data/vendor/libgit2/src/patch_generate.c +6 -5
- data/vendor/libgit2/src/patch_generate.h +1 -0
- data/vendor/libgit2/src/patch_parse.c +265 -276
- data/vendor/libgit2/src/patch_parse.h +6 -11
- data/vendor/libgit2/src/path.c +24 -181
- data/vendor/libgit2/src/path.h +14 -73
- data/vendor/libgit2/src/pathspec.c +2 -1
- data/vendor/libgit2/src/pathspec.h +2 -1
- data/vendor/libgit2/src/pool.c +8 -0
- data/vendor/libgit2/src/pool.h +1 -0
- data/vendor/libgit2/src/posix.c +2 -1
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/pqueue.c +1 -0
- data/vendor/libgit2/src/pqueue.h +2 -0
- data/vendor/libgit2/src/proxy.c +2 -1
- data/vendor/libgit2/src/proxy.h +3 -1
- data/vendor/libgit2/src/push.c +4 -171
- data/vendor/libgit2/src/push.h +2 -0
- data/vendor/libgit2/src/rebase.c +1 -0
- data/vendor/libgit2/src/refdb.c +2 -3
- data/vendor/libgit2/src/refdb.h +2 -0
- data/vendor/libgit2/src/refdb_fs.c +5 -3
- data/vendor/libgit2/src/refdb_fs.h +4 -0
- data/vendor/libgit2/src/reflog.c +1 -0
- data/vendor/libgit2/src/reflog.h +2 -1
- data/vendor/libgit2/src/refs.c +1 -0
- data/vendor/libgit2/src/refs.h +2 -1
- data/vendor/libgit2/src/refspec.c +2 -2
- data/vendor/libgit2/src/refspec.h +2 -0
- data/vendor/libgit2/src/remote.c +56 -10
- data/vendor/libgit2/src/remote.h +2 -0
- data/vendor/libgit2/src/repository.c +16 -14
- data/vendor/libgit2/src/repository.h +2 -0
- data/vendor/libgit2/src/reset.c +6 -5
- data/vendor/libgit2/src/revert.c +1 -0
- data/vendor/libgit2/src/revparse.c +3 -5
- data/vendor/libgit2/src/revwalk.c +2 -2
- data/vendor/libgit2/src/revwalk.h +2 -0
- data/vendor/libgit2/src/settings.c +6 -8
- data/vendor/libgit2/src/sha1_lookup.c +2 -216
- data/vendor/libgit2/src/sha1_lookup.h +2 -6
- data/vendor/libgit2/src/signature.c +8 -3
- data/vendor/libgit2/src/signature.h +2 -0
- data/vendor/libgit2/src/sortedcache.c +7 -0
- data/vendor/libgit2/src/sortedcache.h +2 -0
- data/vendor/libgit2/src/stash.c +1 -0
- data/vendor/libgit2/src/status.c +14 -9
- data/vendor/libgit2/src/status.h +2 -0
- data/vendor/libgit2/src/{curl_stream.c → streams/curl.c} +2 -0
- data/vendor/libgit2/src/{curl_stream.h → streams/curl.h} +4 -2
- data/vendor/libgit2/src/{openssl_stream.c → streams/openssl.c} +47 -18
- data/vendor/libgit2/src/{openssl_stream.h → streams/openssl.h} +6 -2
- data/vendor/libgit2/src/{socket_stream.c → streams/socket.c} +2 -2
- data/vendor/libgit2/src/{socket_stream.h → streams/socket.h} +4 -2
- data/vendor/libgit2/src/{stransport_stream.c → streams/stransport.c} +4 -2
- data/vendor/libgit2/src/{stransport_stream.h → streams/stransport.h} +4 -2
- data/vendor/libgit2/src/{tls_stream.c → streams/tls.c} +4 -3
- data/vendor/libgit2/src/{tls_stream.h → streams/tls.h} +4 -2
- data/vendor/libgit2/src/submodule.c +28 -80
- data/vendor/libgit2/src/submodule.h +2 -13
- data/vendor/libgit2/src/sysdir.c +75 -8
- data/vendor/libgit2/src/sysdir.h +2 -1
- data/vendor/libgit2/src/tag.c +2 -2
- data/vendor/libgit2/src/tag.h +2 -0
- data/vendor/libgit2/src/thread-utils.c +1 -0
- data/vendor/libgit2/src/thread-utils.h +1 -1
- data/vendor/libgit2/src/trace.c +2 -2
- data/vendor/libgit2/src/trace.h +2 -0
- data/vendor/libgit2/src/trailer.c +416 -0
- data/vendor/libgit2/src/transaction.c +2 -1
- data/vendor/libgit2/src/transport.c +2 -0
- data/vendor/libgit2/src/transports/auth.c +2 -1
- data/vendor/libgit2/src/transports/auth.h +4 -3
- data/vendor/libgit2/src/transports/auth_negotiate.c +2 -1
- data/vendor/libgit2/src/transports/auth_negotiate.h +3 -3
- data/vendor/libgit2/src/transports/cred.c +2 -0
- data/vendor/libgit2/src/transports/cred.h +4 -2
- data/vendor/libgit2/src/transports/cred_helpers.c +1 -0
- data/vendor/libgit2/src/transports/git.c +3 -1
- data/vendor/libgit2/src/transports/http.c +10 -14
- data/vendor/libgit2/src/transports/http.h +23 -0
- data/vendor/libgit2/src/transports/local.c +23 -5
- data/vendor/libgit2/src/transports/smart.c +3 -1
- data/vendor/libgit2/src/transports/smart.h +23 -16
- data/vendor/libgit2/src/transports/smart_pkt.c +114 -130
- data/vendor/libgit2/src/transports/smart_protocol.c +26 -22
- data/vendor/libgit2/src/transports/ssh.c +12 -7
- data/vendor/libgit2/src/transports/ssh.h +4 -2
- data/vendor/libgit2/src/transports/winhttp.c +19 -21
- data/vendor/libgit2/src/tree-cache.c +1 -0
- data/vendor/libgit2/src/tree-cache.h +1 -0
- data/vendor/libgit2/src/tree.c +20 -14
- data/vendor/libgit2/src/tree.h +2 -0
- data/vendor/libgit2/src/tsort.c +0 -1
- data/vendor/libgit2/src/unix/map.c +4 -1
- data/vendor/libgit2/src/unix/posix.h +8 -4
- data/vendor/libgit2/src/unix/pthread.h +1 -1
- data/vendor/libgit2/src/unix/realpath.c +4 -1
- data/vendor/libgit2/src/util.c +6 -5
- data/vendor/libgit2/src/util.h +39 -111
- data/vendor/libgit2/src/varint.c +0 -1
- data/vendor/libgit2/src/varint.h +2 -0
- data/vendor/libgit2/src/vector.c +1 -1
- data/vendor/libgit2/src/win32/dir.c +3 -0
- data/vendor/libgit2/src/win32/dir.h +4 -3
- data/vendor/libgit2/src/win32/error.c +1 -1
- data/vendor/libgit2/src/win32/error.h +4 -2
- data/vendor/libgit2/src/win32/findfile.c +2 -1
- data/vendor/libgit2/src/win32/findfile.h +4 -2
- data/vendor/libgit2/src/win32/map.c +2 -0
- data/vendor/libgit2/src/win32/mingw-compat.h +3 -3
- data/vendor/libgit2/src/win32/msvc-compat.h +3 -3
- data/vendor/libgit2/src/win32/path_w32.c +7 -12
- data/vendor/libgit2/src/win32/path_w32.h +3 -2
- data/vendor/libgit2/src/win32/posix.h +2 -2
- data/vendor/libgit2/src/win32/posix_w32.c +11 -5
- data/vendor/libgit2/src/win32/precompiled.h +2 -1
- data/vendor/libgit2/src/win32/reparse.h +2 -2
- data/vendor/libgit2/src/win32/thread.c +1 -0
- data/vendor/libgit2/src/win32/thread.h +2 -2
- data/vendor/libgit2/src/win32/utf-conv.c +0 -1
- data/vendor/libgit2/src/win32/utf-conv.h +4 -3
- data/vendor/libgit2/src/win32/w32_buffer.c +1 -1
- data/vendor/libgit2/src/win32/w32_buffer.h +4 -2
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -1
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +85 -2
- data/vendor/libgit2/src/win32/w32_stack.c +2 -1
- data/vendor/libgit2/src/win32/w32_stack.h +5 -3
- data/vendor/libgit2/src/win32/w32_util.h +4 -2
- data/vendor/libgit2/src/win32/win32-compat.h +3 -3
- data/vendor/libgit2/src/worktree.c +4 -5
- data/vendor/libgit2/src/worktree.h +2 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +22 -13
- data/vendor/libgit2/src/xdiff/xdiffi.c +523 -81
- data/vendor/libgit2/src/xdiff/xdiffi.h +2 -2
- data/vendor/libgit2/src/xdiff/xemit.c +63 -39
- data/vendor/libgit2/src/xdiff/xemit.h +2 -2
- data/vendor/libgit2/src/xdiff/xhistogram.c +0 -1
- data/vendor/libgit2/src/xdiff/xinclude.h +3 -2
- data/vendor/libgit2/src/xdiff/xmacros.h +2 -2
- data/vendor/libgit2/src/xdiff/xmerge.c +80 -20
- data/vendor/libgit2/src/xdiff/xpatience.c +41 -9
- data/vendor/libgit2/src/xdiff/xprepare.c +2 -2
- data/vendor/libgit2/src/xdiff/xprepare.h +2 -2
- data/vendor/libgit2/src/xdiff/xtypes.h +2 -2
- data/vendor/libgit2/src/xdiff/xutils.c +47 -27
- data/vendor/libgit2/src/xdiff/xutils.h +2 -5
- data/vendor/libgit2/src/zstream.c +65 -45
- data/vendor/libgit2/src/zstream.h +9 -2
- metadata +27 -13
- data/vendor/libgit2/include/git2/sys/remote.h +0 -16
@@ -25,8 +25,8 @@
|
|
25
25
|
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
26
26
|
* SUCH DAMAGE.
|
27
27
|
*/
|
28
|
-
#ifndef
|
29
|
-
#define
|
28
|
+
#ifndef INCLUDE_fnmatch_h__
|
29
|
+
#define INCLUDE_fnmatch_h__
|
30
30
|
|
31
31
|
#include "common.h"
|
32
32
|
|
@@ -45,5 +45,4 @@
|
|
45
45
|
|
46
46
|
extern int p_fnmatch(const char *pattern, const char *string, int flags);
|
47
47
|
|
48
|
-
#endif
|
49
|
-
|
48
|
+
#endif
|
data/vendor/libgit2/src/global.c
CHANGED
@@ -4,14 +4,15 @@
|
|
4
4
|
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
|
-
|
7
|
+
|
8
8
|
#include "global.h"
|
9
|
+
|
9
10
|
#include "hash.h"
|
10
11
|
#include "sysdir.h"
|
11
12
|
#include "filter.h"
|
12
13
|
#include "merge_driver.h"
|
13
|
-
#include "
|
14
|
-
#include "
|
14
|
+
#include "streams/curl.h"
|
15
|
+
#include "streams/openssl.h"
|
15
16
|
#include "thread-utils.h"
|
16
17
|
#include "git2/global.h"
|
17
18
|
#include "transports/ssh.h"
|
data/vendor/libgit2/src/global.h
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
#define INCLUDE_global_h__
|
9
9
|
|
10
10
|
#include "common.h"
|
11
|
+
|
11
12
|
#include "mwindow.h"
|
12
13
|
#include "hash.h"
|
13
14
|
|
@@ -24,11 +25,6 @@ typedef struct {
|
|
24
25
|
git_thread *current_thread;
|
25
26
|
} git_global_st;
|
26
27
|
|
27
|
-
#ifdef GIT_OPENSSL
|
28
|
-
# include <openssl/ssl.h>
|
29
|
-
extern SSL_CTX *git__ssl_ctx;
|
30
|
-
#endif
|
31
|
-
|
32
28
|
git_global_st *git__global_state(void);
|
33
29
|
|
34
30
|
extern git_mutex git__mwindow_mutex;
|
data/vendor/libgit2/src/graph.c
CHANGED
data/vendor/libgit2/src/hash.c
CHANGED
data/vendor/libgit2/src/hash.h
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
#ifndef INCLUDE_hash_h__
|
8
8
|
#define INCLUDE_hash_h__
|
9
9
|
|
10
|
+
#include "common.h"
|
11
|
+
|
10
12
|
#include "git2/oid.h"
|
11
13
|
|
12
14
|
typedef struct git_hash_prov git_hash_prov;
|
@@ -40,4 +42,4 @@ int git_hash_final(git_oid *out, git_hash_ctx *c);
|
|
40
42
|
int git_hash_buf(git_oid *out, const void *data, size_t len);
|
41
43
|
int git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n);
|
42
44
|
|
43
|
-
#endif
|
45
|
+
#endif
|
@@ -5,8 +5,8 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#ifndef
|
9
|
-
#define
|
8
|
+
#ifndef INCLUDE_hash_hash_collisiondetect_h__
|
9
|
+
#define INCLUDE_hash_hash_collisiondetect_h__
|
10
10
|
|
11
11
|
#include "hash.h"
|
12
12
|
#include "sha1dc/sha1.h"
|
@@ -44,4 +44,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
|
|
44
44
|
return 0;
|
45
45
|
}
|
46
46
|
|
47
|
-
#endif
|
47
|
+
#endif
|
@@ -5,8 +5,8 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#ifndef
|
9
|
-
#define
|
8
|
+
#ifndef INCLUDE_hash_hash_common_crypto_h__
|
9
|
+
#define INCLUDE_hash_hash_common_crypto_h__
|
10
10
|
|
11
11
|
#include "hash.h"
|
12
12
|
|
@@ -16,6 +16,8 @@ struct git_hash_ctx {
|
|
16
16
|
CC_SHA1_CTX c;
|
17
17
|
};
|
18
18
|
|
19
|
+
#define CC_LONG_MAX ((CC_LONG)-1)
|
20
|
+
|
19
21
|
#define git_hash_global_init() 0
|
20
22
|
#define git_hash_ctx_init(ctx) git_hash_init(ctx)
|
21
23
|
#define git_hash_ctx_cleanup(ctx)
|
@@ -27,10 +29,21 @@ GIT_INLINE(int) git_hash_init(git_hash_ctx *ctx)
|
|
27
29
|
return 0;
|
28
30
|
}
|
29
31
|
|
30
|
-
GIT_INLINE(int) git_hash_update(git_hash_ctx *ctx, const void *
|
32
|
+
GIT_INLINE(int) git_hash_update(git_hash_ctx *ctx, const void *_data, size_t len)
|
31
33
|
{
|
34
|
+
const unsigned char *data = _data;
|
35
|
+
|
32
36
|
assert(ctx);
|
33
|
-
|
37
|
+
|
38
|
+
while (len > 0) {
|
39
|
+
CC_LONG chunk = (len > CC_LONG_MAX) ? CC_LONG_MAX : (CC_LONG)len;
|
40
|
+
|
41
|
+
CC_SHA1_Update(&ctx->c, data, chunk);
|
42
|
+
|
43
|
+
data += chunk;
|
44
|
+
len -= chunk;
|
45
|
+
}
|
46
|
+
|
34
47
|
return 0;
|
35
48
|
}
|
36
49
|
|
@@ -41,4 +54,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
|
|
41
54
|
return 0;
|
42
55
|
}
|
43
56
|
|
44
|
-
#endif
|
57
|
+
#endif
|
@@ -5,9 +5,9 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#include "
|
8
|
+
#include "hash_generic.h"
|
9
|
+
|
9
10
|
#include "hash.h"
|
10
|
-
#include "hash/hash_generic.h"
|
11
11
|
|
12
12
|
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
13
13
|
|
@@ -5,8 +5,10 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#ifndef
|
9
|
-
#define
|
8
|
+
#ifndef INCLUDE_hash_hash_generic_h__
|
9
|
+
#define INCLUDE_hash_hash_generic_h__
|
10
|
+
|
11
|
+
#include "common.h"
|
10
12
|
|
11
13
|
#include "hash.h"
|
12
14
|
|
@@ -20,4 +22,4 @@ struct git_hash_ctx {
|
|
20
22
|
#define git_hash_ctx_init(ctx) git_hash_init(ctx)
|
21
23
|
#define git_hash_ctx_cleanup(ctx)
|
22
24
|
|
23
|
-
#endif
|
25
|
+
#endif
|
@@ -5,8 +5,8 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#ifndef
|
9
|
-
#define
|
8
|
+
#ifndef INCLUDE_hash_hash_openssl_h__
|
9
|
+
#define INCLUDE_hash_hash_openssl_h__
|
10
10
|
|
11
11
|
#include "hash.h"
|
12
12
|
|
@@ -56,4 +56,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
|
|
56
56
|
return 0;
|
57
57
|
}
|
58
58
|
|
59
|
-
#endif
|
59
|
+
#endif
|
@@ -5,10 +5,10 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#include "
|
8
|
+
#include "hash_win32.h"
|
9
|
+
|
9
10
|
#include "global.h"
|
10
11
|
#include "hash.h"
|
11
|
-
#include "hash/hash_win32.h"
|
12
12
|
|
13
13
|
#include <wincrypt.h>
|
14
14
|
#include <strsafe.h>
|
@@ -24,16 +24,20 @@ GIT_INLINE(int) hash_cng_prov_init(void)
|
|
24
24
|
DWORD dll_path_len, size_len;
|
25
25
|
|
26
26
|
/* Only use CNG on Windows 2008 / Vista SP1 or better (Windows 6.0 SP1) */
|
27
|
-
if (!git_has_win32_version(6, 0, 1))
|
27
|
+
if (!git_has_win32_version(6, 0, 1)) {
|
28
|
+
giterr_set(GITERR_SHA1, "CryptoNG is not supported on this platform");
|
28
29
|
return -1;
|
30
|
+
}
|
29
31
|
|
30
32
|
/* Load bcrypt.dll explicitly from the system directory */
|
31
33
|
if ((dll_path_len = GetSystemDirectory(dll_path, MAX_PATH)) == 0 ||
|
32
34
|
dll_path_len > MAX_PATH ||
|
33
35
|
StringCchCat(dll_path, MAX_PATH, "\\") < 0 ||
|
34
36
|
StringCchCat(dll_path, MAX_PATH, GIT_HASH_CNG_DLL_NAME) < 0 ||
|
35
|
-
(hash_prov.prov.cng.dll = LoadLibrary(dll_path)) == NULL)
|
37
|
+
(hash_prov.prov.cng.dll = LoadLibrary(dll_path)) == NULL) {
|
38
|
+
giterr_set(GITERR_SHA1, "CryptoNG library could not be loaded");
|
36
39
|
return -1;
|
40
|
+
}
|
37
41
|
|
38
42
|
/* Load the function addresses */
|
39
43
|
if ((hash_prov.prov.cng.open_algorithm_provider = (hash_win32_cng_open_algorithm_provider_fn)GetProcAddress(hash_prov.prov.cng.dll, "BCryptOpenAlgorithmProvider")) == NULL ||
|
@@ -44,12 +48,16 @@ GIT_INLINE(int) hash_cng_prov_init(void)
|
|
44
48
|
(hash_prov.prov.cng.destroy_hash = (hash_win32_cng_destroy_hash_fn)GetProcAddress(hash_prov.prov.cng.dll, "BCryptDestroyHash")) == NULL ||
|
45
49
|
(hash_prov.prov.cng.close_algorithm_provider = (hash_win32_cng_close_algorithm_provider_fn)GetProcAddress(hash_prov.prov.cng.dll, "BCryptCloseAlgorithmProvider")) == NULL) {
|
46
50
|
FreeLibrary(hash_prov.prov.cng.dll);
|
51
|
+
|
52
|
+
giterr_set(GITERR_OS, "CryptoNG functions could not be loaded");
|
47
53
|
return -1;
|
48
54
|
}
|
49
55
|
|
50
56
|
/* Load the SHA1 algorithm */
|
51
57
|
if (hash_prov.prov.cng.open_algorithm_provider(&hash_prov.prov.cng.handle, GIT_HASH_CNG_HASH_TYPE, NULL, GIT_HASH_CNG_HASH_REUSABLE) < 0) {
|
52
58
|
FreeLibrary(hash_prov.prov.cng.dll);
|
59
|
+
|
60
|
+
giterr_set(GITERR_OS, "algorithm provider could not be initialized");
|
53
61
|
return -1;
|
54
62
|
}
|
55
63
|
|
@@ -57,6 +65,8 @@ GIT_INLINE(int) hash_cng_prov_init(void)
|
|
57
65
|
if (hash_prov.prov.cng.get_property(hash_prov.prov.cng.handle, GIT_HASH_CNG_HASH_OBJECT_LEN, (PBYTE)&hash_prov.prov.cng.hash_object_size, sizeof(DWORD), &size_len, 0) < 0) {
|
58
66
|
hash_prov.prov.cng.close_algorithm_provider(hash_prov.prov.cng.handle, 0);
|
59
67
|
FreeLibrary(hash_prov.prov.cng.dll);
|
68
|
+
|
69
|
+
giterr_set(GITERR_OS, "algorithm handle could not be found");
|
60
70
|
return -1;
|
61
71
|
}
|
62
72
|
|
@@ -75,8 +85,10 @@ GIT_INLINE(void) hash_cng_prov_shutdown(void)
|
|
75
85
|
/* Initialize CryptoAPI */
|
76
86
|
GIT_INLINE(int) hash_cryptoapi_prov_init()
|
77
87
|
{
|
78
|
-
if (!CryptAcquireContext(&hash_prov.prov.cryptoapi.handle, NULL, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
|
88
|
+
if (!CryptAcquireContext(&hash_prov.prov.cryptoapi.handle, NULL, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
|
89
|
+
giterr_set(GITERR_OS, "legacy hash context could not be started");
|
79
90
|
return -1;
|
91
|
+
}
|
80
92
|
|
81
93
|
hash_prov.type = CRYPTOAPI;
|
82
94
|
return 0;
|
@@ -129,6 +141,7 @@ GIT_INLINE(int) hash_cryptoapi_init(git_hash_ctx *ctx)
|
|
129
141
|
|
130
142
|
if (!CryptCreateHash(ctx->prov->prov.cryptoapi.handle, CALG_SHA1, 0, 0, &ctx->ctx.cryptoapi.hash_handle)) {
|
131
143
|
ctx->ctx.cryptoapi.valid = 0;
|
144
|
+
giterr_set(GITERR_OS, "legacy hash implementation could not be created");
|
132
145
|
return -1;
|
133
146
|
}
|
134
147
|
|
@@ -136,12 +149,23 @@ GIT_INLINE(int) hash_cryptoapi_init(git_hash_ctx *ctx)
|
|
136
149
|
return 0;
|
137
150
|
}
|
138
151
|
|
139
|
-
GIT_INLINE(int) hash_cryptoapi_update(git_hash_ctx *ctx, const void *
|
152
|
+
GIT_INLINE(int) hash_cryptoapi_update(git_hash_ctx *ctx, const void *_data, size_t len)
|
140
153
|
{
|
154
|
+
const BYTE *data = (BYTE *)_data;
|
155
|
+
|
141
156
|
assert(ctx->ctx.cryptoapi.valid);
|
142
157
|
|
143
|
-
|
144
|
-
|
158
|
+
while (len > 0) {
|
159
|
+
DWORD chunk = (len > MAXDWORD) ? MAXDWORD : (DWORD)len;
|
160
|
+
|
161
|
+
if (!CryptHashData(ctx->ctx.cryptoapi.hash_handle, data, chunk, 0)) {
|
162
|
+
giterr_set(GITERR_OS, "legacy hash data could not be updated");
|
163
|
+
return -1;
|
164
|
+
}
|
165
|
+
|
166
|
+
data += chunk;
|
167
|
+
len -= chunk;
|
168
|
+
}
|
145
169
|
|
146
170
|
return 0;
|
147
171
|
}
|
@@ -153,8 +177,10 @@ GIT_INLINE(int) hash_cryptoapi_final(git_oid *out, git_hash_ctx *ctx)
|
|
153
177
|
|
154
178
|
assert(ctx->ctx.cryptoapi.valid);
|
155
179
|
|
156
|
-
if (!CryptGetHashParam(ctx->ctx.cryptoapi.hash_handle, HP_HASHVAL, out->id, &len, 0))
|
180
|
+
if (!CryptGetHashParam(ctx->ctx.cryptoapi.hash_handle, HP_HASHVAL, out->id, &len, 0)) {
|
181
|
+
giterr_set(GITERR_OS, "legacy hash data could not be finished");
|
157
182
|
error = -1;
|
183
|
+
}
|
158
184
|
|
159
185
|
CryptDestroyHash(ctx->ctx.cryptoapi.hash_handle);
|
160
186
|
ctx->ctx.cryptoapi.valid = 0;
|
@@ -177,6 +203,8 @@ GIT_INLINE(int) hash_ctx_cng_init(git_hash_ctx *ctx)
|
|
177
203
|
|
178
204
|
if (hash_prov.prov.cng.create_hash(hash_prov.prov.cng.handle, &ctx->ctx.cng.hash_handle, ctx->ctx.cng.hash_object, hash_prov.prov.cng.hash_object_size, NULL, 0, 0) < 0) {
|
179
205
|
git__free(ctx->ctx.cng.hash_object);
|
206
|
+
|
207
|
+
giterr_set(GITERR_OS, "hash implementation could not be created");
|
180
208
|
return -1;
|
181
209
|
}
|
182
210
|
|
@@ -194,26 +222,41 @@ GIT_INLINE(int) hash_cng_init(git_hash_ctx *ctx)
|
|
194
222
|
return 0;
|
195
223
|
|
196
224
|
/* CNG needs to be finished to restart */
|
197
|
-
if (ctx->prov->prov.cng.finish_hash(ctx->ctx.cng.hash_handle, hash, GIT_OID_RAWSZ, 0) < 0)
|
225
|
+
if (ctx->prov->prov.cng.finish_hash(ctx->ctx.cng.hash_handle, hash, GIT_OID_RAWSZ, 0) < 0) {
|
226
|
+
giterr_set(GITERR_OS, "hash implementation could not be finished");
|
198
227
|
return -1;
|
228
|
+
}
|
199
229
|
|
200
230
|
ctx->ctx.cng.updated = 0;
|
201
231
|
|
202
232
|
return 0;
|
203
233
|
}
|
204
234
|
|
205
|
-
GIT_INLINE(int) hash_cng_update(git_hash_ctx *ctx, const void *
|
235
|
+
GIT_INLINE(int) hash_cng_update(git_hash_ctx *ctx, const void *_data, size_t len)
|
206
236
|
{
|
207
|
-
|
208
|
-
|
237
|
+
PBYTE data = (PBYTE)_data;
|
238
|
+
|
239
|
+
while (len > 0) {
|
240
|
+
ULONG chunk = (len > ULONG_MAX) ? ULONG_MAX : (ULONG)len;
|
241
|
+
|
242
|
+
if (ctx->prov->prov.cng.hash_data(ctx->ctx.cng.hash_handle, data, chunk, 0) < 0) {
|
243
|
+
giterr_set(GITERR_OS, "hash could not be updated");
|
244
|
+
return -1;
|
245
|
+
}
|
246
|
+
|
247
|
+
data += chunk;
|
248
|
+
len -= chunk;
|
249
|
+
}
|
209
250
|
|
210
251
|
return 0;
|
211
252
|
}
|
212
253
|
|
213
254
|
GIT_INLINE(int) hash_cng_final(git_oid *out, git_hash_ctx *ctx)
|
214
255
|
{
|
215
|
-
if (ctx->prov->prov.cng.finish_hash(ctx->ctx.cng.hash_handle, out->id, GIT_OID_RAWSZ, 0) < 0)
|
256
|
+
if (ctx->prov->prov.cng.finish_hash(ctx->ctx.cng.hash_handle, out->id, GIT_OID_RAWSZ, 0) < 0) {
|
257
|
+
giterr_set(GITERR_OS, "hash could not be finished");
|
216
258
|
return -1;
|
259
|
+
}
|
217
260
|
|
218
261
|
ctx->ctx.cng.updated = 0;
|
219
262
|
|
@@ -5,10 +5,11 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#ifndef
|
9
|
-
#define
|
8
|
+
#ifndef INCLUDE_hash_hash_win32_h__
|
9
|
+
#define INCLUDE_hash_hash_win32_h__
|
10
10
|
|
11
11
|
#include "common.h"
|
12
|
+
|
12
13
|
#include "hash.h"
|
13
14
|
|
14
15
|
#include <wincrypt.h>
|
@@ -137,4 +138,4 @@ struct git_hash_ctx {
|
|
137
138
|
} ctx;
|
138
139
|
};
|
139
140
|
|
140
|
-
#endif
|
141
|
+
#endif
|
data/vendor/libgit2/src/ident.c
CHANGED
data/vendor/libgit2/src/idxmap.h
CHANGED
data/vendor/libgit2/src/ignore.c
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) the libgit2 contributors. All rights reserved.
|
3
|
+
*
|
4
|
+
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
5
|
+
* a Linking Exception. For full terms see the included COPYING file.
|
6
|
+
*/
|
7
|
+
|
8
|
+
#include "ignore.h"
|
9
|
+
|
1
10
|
#include "git2/ignore.h"
|
2
11
|
#include "common.h"
|
3
|
-
#include "ignore.h"
|
4
12
|
#include "attrcache.h"
|
5
13
|
#include "path.h"
|
6
14
|
#include "config.h"
|
@@ -532,6 +540,7 @@ int git_ignore_path_is_ignored(
|
|
532
540
|
git_ignores ignores;
|
533
541
|
unsigned int i;
|
534
542
|
git_attr_file *file;
|
543
|
+
git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN;
|
535
544
|
|
536
545
|
assert(repo && ignored && pathname);
|
537
546
|
|
@@ -540,7 +549,10 @@ int git_ignore_path_is_ignored(
|
|
540
549
|
memset(&path, 0, sizeof(path));
|
541
550
|
memset(&ignores, 0, sizeof(ignores));
|
542
551
|
|
543
|
-
if ((
|
552
|
+
if (git_repository_is_bare(repo))
|
553
|
+
dir_flag = GIT_DIR_FLAG_FALSE;
|
554
|
+
|
555
|
+
if ((error = git_attr_path__init(&path, pathname, workdir, dir_flag)) < 0 ||
|
544
556
|
(error = git_ignore__for_path(repo, path.path, &ignores)) < 0)
|
545
557
|
goto cleanup;
|
546
558
|
|