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
@@ -4,8 +4,12 @@
|
|
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
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef INCLUDE_unix_posix_h__
|
8
|
+
#define INCLUDE_unix_posix_h__
|
9
|
+
|
10
|
+
#ifndef LIBGIT2_NO_FEATURES_H
|
11
|
+
# include "git2/sys/features.h"
|
12
|
+
#endif
|
9
13
|
|
10
14
|
#include <stdio.h>
|
11
15
|
#include <dirent.h>
|
@@ -71,7 +75,7 @@ GIT_INLINE(int) p_fsync(int fd)
|
|
71
75
|
|
72
76
|
#define p_timeval timeval
|
73
77
|
|
74
|
-
#ifdef
|
78
|
+
#ifdef GIT_USE_FUTIMENS
|
75
79
|
GIT_INLINE(int) p_futimes(int f, const struct p_timeval t[2])
|
76
80
|
{
|
77
81
|
struct timespec s[2];
|
@@ -85,7 +89,7 @@ GIT_INLINE(int) p_futimes(int f, const struct p_timeval t[2])
|
|
85
89
|
# define p_futimes futimes
|
86
90
|
#endif
|
87
91
|
|
88
|
-
#ifdef
|
92
|
+
#ifdef GIT_USE_REGCOMP_L
|
89
93
|
#include <xlocale.h>
|
90
94
|
GIT_INLINE(int) p_regcomp(regex_t *preg, const char *pattern, int cflags)
|
91
95
|
{
|
data/vendor/libgit2/src/util.c
CHANGED
@@ -4,11 +4,10 @@
|
|
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
|
+
#include "util.h"
|
9
|
+
|
8
10
|
#include "common.h"
|
9
|
-
#include <stdio.h>
|
10
|
-
#include <ctype.h>
|
11
|
-
#include "posix.h"
|
12
11
|
|
13
12
|
#ifdef GIT_WIN32
|
14
13
|
# include "win32/w32_buffer.h"
|
@@ -476,9 +475,11 @@ uint32_t git__hash(const void *key, int len, uint32_t seed)
|
|
476
475
|
|
477
476
|
switch(len & 3) {
|
478
477
|
case 3: k1 ^= tail[2] << 16;
|
478
|
+
/* fall through */
|
479
479
|
case 2: k1 ^= tail[1] << 8;
|
480
|
+
/* fall through */
|
480
481
|
case 1: k1 ^= tail[0];
|
481
|
-
|
482
|
+
MURMUR_BLOCK();
|
482
483
|
}
|
483
484
|
|
484
485
|
h1 ^= len;
|
data/vendor/libgit2/src/util.h
CHANGED
@@ -7,42 +7,18 @@
|
|
7
7
|
#ifndef INCLUDE_util_h__
|
8
8
|
#define INCLUDE_util_h__
|
9
9
|
|
10
|
-
#include "
|
11
|
-
#include "buffer.h"
|
10
|
+
#include "common.h"
|
12
11
|
|
13
|
-
#
|
14
|
-
|
15
|
-
*
|
16
|
-
* We DO NOT use the "_CRTDBG_MAP_ALLOC" macro described in the MSVC
|
17
|
-
* documentation because all allocs/frees in libgit2 already go through
|
18
|
-
* the "git__" routines defined in this file. Simply using the normal
|
19
|
-
* reporting mechanism causes all leaks to be attributed to a routine
|
20
|
-
* here in util.h (ie, the actual call to calloc()) rather than the
|
21
|
-
* caller of git__calloc().
|
22
|
-
*
|
23
|
-
* Therefore, we declare a set of "git__crtdbg__" routines to replace
|
24
|
-
* the corresponding "git__" routines and re-define the "git__" symbols
|
25
|
-
* as macros. This allows us to get and report the file:line info of
|
26
|
-
* the real caller.
|
27
|
-
*
|
28
|
-
* We DO NOT replace the "git__free" routine because it needs to remain
|
29
|
-
* a function pointer because it is used as a function argument when
|
30
|
-
* setting up various structure "destructors".
|
31
|
-
*
|
32
|
-
* We also DO NOT use the "_CRTDBG_MAP_ALLOC" macro because it causes
|
33
|
-
* "free" to be remapped to "_free_dbg" and this causes problems for
|
34
|
-
* structures which define a field named "free".
|
35
|
-
*
|
36
|
-
* Finally, CRTDBG must be explicitly enabled and configured at program
|
37
|
-
* startup. See tests/main.c for an example.
|
38
|
-
*/
|
39
|
-
#include <stdlib.h>
|
40
|
-
#include <crtdbg.h>
|
41
|
-
#include "win32/w32_crtdbg_stacktrace.h"
|
12
|
+
#ifndef GIT_WIN32
|
13
|
+
# include <ctype.h>
|
42
14
|
#endif
|
43
15
|
|
16
|
+
#include "git2/buffer.h"
|
17
|
+
|
18
|
+
#include "buffer.h"
|
44
19
|
#include "common.h"
|
45
20
|
#include "strnlen.h"
|
21
|
+
#include "thread-utils.h"
|
46
22
|
|
47
23
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
48
24
|
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
|
@@ -67,79 +43,33 @@
|
|
67
43
|
|
68
44
|
#if defined(GIT_MSVC_CRTDBG)
|
69
45
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
length = p_strnlen(str, n);
|
97
|
-
|
98
|
-
if (GIT_ADD_SIZET_OVERFLOW(&alloclength, length, 1) ||
|
99
|
-
!(ptr = git__crtdbg__malloc(alloclength, file, line)))
|
100
|
-
return NULL;
|
101
|
-
|
102
|
-
if (length)
|
103
|
-
memcpy(ptr, str, length);
|
104
|
-
|
105
|
-
ptr[length] = '\0';
|
106
|
-
|
107
|
-
return ptr;
|
108
|
-
}
|
109
|
-
|
110
|
-
GIT_INLINE(char *) git__crtdbg__substrdup(const char *start, size_t n, const char *file, int line)
|
111
|
-
{
|
112
|
-
char *ptr;
|
113
|
-
size_t alloclen;
|
114
|
-
|
115
|
-
if (GIT_ADD_SIZET_OVERFLOW(&alloclen, n, 1) ||
|
116
|
-
!(ptr = git__crtdbg__malloc(alloclen, file, line)))
|
117
|
-
return NULL;
|
118
|
-
|
119
|
-
memcpy(ptr, start, n);
|
120
|
-
ptr[n] = '\0';
|
121
|
-
return ptr;
|
122
|
-
}
|
123
|
-
|
124
|
-
GIT_INLINE(void *) git__crtdbg__realloc(void *ptr, size_t size, const char *file, int line)
|
125
|
-
{
|
126
|
-
void *new_ptr = _realloc_dbg(ptr, size, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
127
|
-
if (!new_ptr) giterr_set_oom();
|
128
|
-
return new_ptr;
|
129
|
-
}
|
130
|
-
|
131
|
-
GIT_INLINE(void *) git__crtdbg__reallocarray(void *ptr, size_t nelem, size_t elsize, const char *file, int line)
|
132
|
-
{
|
133
|
-
size_t newsize;
|
134
|
-
|
135
|
-
return GIT_MULTIPLY_SIZET_OVERFLOW(&newsize, nelem, elsize) ?
|
136
|
-
NULL : _realloc_dbg(ptr, newsize, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
137
|
-
}
|
46
|
+
/* Enable MSVC CRTDBG memory leak reporting.
|
47
|
+
*
|
48
|
+
* We DO NOT use the "_CRTDBG_MAP_ALLOC" macro described in the MSVC
|
49
|
+
* documentation because all allocs/frees in libgit2 already go through
|
50
|
+
* the "git__" routines defined in this file. Simply using the normal
|
51
|
+
* reporting mechanism causes all leaks to be attributed to a routine
|
52
|
+
* here in util.h (ie, the actual call to calloc()) rather than the
|
53
|
+
* caller of git__calloc().
|
54
|
+
*
|
55
|
+
* Therefore, we declare a set of "git__crtdbg__" routines to replace
|
56
|
+
* the corresponding "git__" routines and re-define the "git__" symbols
|
57
|
+
* as macros. This allows us to get and report the file:line info of
|
58
|
+
* the real caller.
|
59
|
+
*
|
60
|
+
* We DO NOT replace the "git__free" routine because it needs to remain
|
61
|
+
* a function pointer because it is used as a function argument when
|
62
|
+
* setting up various structure "destructors".
|
63
|
+
*
|
64
|
+
* We also DO NOT use the "_CRTDBG_MAP_ALLOC" macro because it causes
|
65
|
+
* "free" to be remapped to "_free_dbg" and this causes problems for
|
66
|
+
* structures which define a field named "free".
|
67
|
+
*
|
68
|
+
* Finally, CRTDBG must be explicitly enabled and configured at program
|
69
|
+
* startup. See tests/main.c for an example.
|
70
|
+
*/
|
138
71
|
|
139
|
-
|
140
|
-
{
|
141
|
-
return git__crtdbg__reallocarray(NULL, nelem, elsize, file, line);
|
142
|
-
}
|
72
|
+
#include "win32/w32_crtdbg_stacktrace.h"
|
143
73
|
|
144
74
|
#define git__malloc(len) git__crtdbg__malloc(len, __FILE__, __LINE__)
|
145
75
|
#define git__calloc(nelem, elsize) git__crtdbg__calloc(nelem, elsize, __FILE__, __LINE__)
|
@@ -364,8 +294,6 @@ extern int git__strncasecmp(const char *a, const char *b, size_t sz);
|
|
364
294
|
|
365
295
|
extern int git__strcasesort_cmp(const char *a, const char *b);
|
366
296
|
|
367
|
-
#include "thread-utils.h"
|
368
|
-
|
369
297
|
typedef struct {
|
370
298
|
git_atomic refcount;
|
371
299
|
void *owner;
|
@@ -374,22 +302,22 @@ typedef struct {
|
|
374
302
|
typedef void (*git_refcount_freeptr)(void *r);
|
375
303
|
|
376
304
|
#define GIT_REFCOUNT_INC(r) { \
|
377
|
-
git_atomic_inc(&(
|
305
|
+
git_atomic_inc(&(r)->rc.refcount); \
|
378
306
|
}
|
379
307
|
|
380
308
|
#define GIT_REFCOUNT_DEC(_r, do_free) { \
|
381
|
-
git_refcount *r = (
|
309
|
+
git_refcount *r = &(_r)->rc; \
|
382
310
|
int val = git_atomic_dec(&r->refcount); \
|
383
311
|
if (val <= 0 && r->owner == NULL) { do_free(_r); } \
|
384
312
|
}
|
385
313
|
|
386
314
|
#define GIT_REFCOUNT_OWN(r, o) { \
|
387
|
-
(
|
315
|
+
(r)->rc.owner = o; \
|
388
316
|
}
|
389
317
|
|
390
|
-
#define GIT_REFCOUNT_OWNER(r) ((
|
318
|
+
#define GIT_REFCOUNT_OWNER(r) ((r)->rc.owner)
|
391
319
|
|
392
|
-
#define GIT_REFCOUNT_VAL(r) git_atomic_get(
|
320
|
+
#define GIT_REFCOUNT_VAL(r) git_atomic_get((r)->rc.refcount)
|
393
321
|
|
394
322
|
|
395
323
|
static signed char from_hex[] = {
|
@@ -615,4 +543,4 @@ GIT_INLINE(double) git__timer(void)
|
|
615
543
|
|
616
544
|
extern int git__getenv(git_buf *out, const char *name);
|
617
545
|
|
618
|
-
#endif
|
546
|
+
#endif
|
data/vendor/libgit2/src/varint.c
CHANGED
data/vendor/libgit2/src/varint.h
CHANGED
data/vendor/libgit2/src/vector.c
CHANGED
@@ -4,10 +4,11 @@
|
|
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
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef INCLUDE_win32_dir_h__
|
8
|
+
#define INCLUDE_win32_dir_h__
|
9
9
|
|
10
10
|
#include "common.h"
|
11
|
+
|
11
12
|
#include "w32_util.h"
|
12
13
|
|
13
14
|
struct git__dirent {
|
@@ -40,4 +41,4 @@ extern int git__closedir(git__DIR *);
|
|
40
41
|
# define closedir git__closedir
|
41
42
|
# endif
|
42
43
|
|
43
|
-
#endif
|
44
|
+
#endif
|
@@ -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_win32_error_h__
|
9
|
+
#define INCLUDE_win32_error_h__
|
10
|
+
|
11
|
+
#include "common.h"
|
10
12
|
|
11
13
|
extern char *git_win32_get_error_message(DWORD error_code);
|
12
14
|
|
@@ -5,10 +5,11 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
+
#include "findfile.h"
|
9
|
+
|
8
10
|
#include "path_w32.h"
|
9
11
|
#include "utf-conv.h"
|
10
12
|
#include "path.h"
|
11
|
-
#include "findfile.h"
|
12
13
|
|
13
14
|
#define REG_MSYSGIT_INSTALL_LOCAL L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
|
14
15
|
|
@@ -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_win32_findfile_h__
|
9
|
+
#define INCLUDE_win32_findfile_h__
|
10
|
+
|
11
|
+
#include "common.h"
|
10
12
|
|
11
13
|
extern int git_win32__find_system_dirs(git_buf *out, const wchar_t *subpath);
|
12
14
|
extern int git_win32__find_global_dirs(git_buf *out);
|
@@ -4,8 +4,8 @@
|
|
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
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef INCLUDE_win32_mingw_compat_h__
|
8
|
+
#define INCLUDE_win32_mingw_compat_h__
|
9
9
|
|
10
10
|
#if defined(__MINGW32__)
|
11
11
|
|
@@ -20,4 +20,4 @@ void __mingworg_MemoryBarrier(void);
|
|
20
20
|
|
21
21
|
#endif
|
22
22
|
|
23
|
-
#endif
|
23
|
+
#endif
|
@@ -4,8 +4,8 @@
|
|
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
|
-
#ifndef
|
8
|
-
#define
|
7
|
+
#ifndef INCLUDE_win32_msvc_compat_h__
|
8
|
+
#define INCLUDE_win32_msvc_compat_h__
|
9
9
|
|
10
10
|
#if defined(_MSC_VER)
|
11
11
|
|
@@ -19,4 +19,4 @@ typedef SSIZE_T ssize_t;
|
|
19
19
|
|
20
20
|
#define GIT_STDLIB_CALL __cdecl
|
21
21
|
|
22
|
-
#endif
|
22
|
+
#endif
|
@@ -5,9 +5,9 @@
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
6
6
|
*/
|
7
7
|
|
8
|
-
#include "common.h"
|
9
|
-
#include "path.h"
|
10
8
|
#include "path_w32.h"
|
9
|
+
|
10
|
+
#include "path.h"
|
11
11
|
#include "utf-conv.h"
|
12
12
|
#include "posix.h"
|
13
13
|
#include "reparse.h"
|
@@ -18,11 +18,6 @@
|
|
18
18
|
|
19
19
|
#define PATH__ABSOLUTE_LEN 3
|
20
20
|
|
21
|
-
#define path__is_dirsep(p) ((p) == '/' || (p) == '\\')
|
22
|
-
|
23
|
-
#define path__is_absolute(p) \
|
24
|
-
(git__isalpha((p)[0]) && (p)[1] == ':' && ((p)[2] == '\\' || (p)[2] == '/'))
|
25
|
-
|
26
21
|
#define path__is_nt_namespace(p) \
|
27
22
|
(((p)[0] == '\\' && (p)[1] == '\\' && (p)[2] == '?' && (p)[3] == '\\') || \
|
28
23
|
((p)[0] == '/' && (p)[1] == '/' && (p)[2] == '?' && (p)[3] == '/'))
|
@@ -59,7 +54,7 @@ static wchar_t *path__skip_server(wchar_t *path)
|
|
59
54
|
wchar_t *c;
|
60
55
|
|
61
56
|
for (c = path; *c; c++) {
|
62
|
-
if (
|
57
|
+
if (git_path_is_dirsep(*c))
|
63
58
|
return c + 1;
|
64
59
|
}
|
65
60
|
|
@@ -73,9 +68,9 @@ static wchar_t *path__skip_prefix(wchar_t *path)
|
|
73
68
|
|
74
69
|
if (wcsncmp(path, L"UNC\\", 4) == 0)
|
75
70
|
path = path__skip_server(path + 4);
|
76
|
-
else if (
|
71
|
+
else if (git_path_is_absolute(path))
|
77
72
|
path += PATH__ABSOLUTE_LEN;
|
78
|
-
} else if (
|
73
|
+
} else if (git_path_is_absolute(path)) {
|
79
74
|
path += PATH__ABSOLUTE_LEN;
|
80
75
|
} else if (path__is_unc(path)) {
|
81
76
|
path = path__skip_server(path + 2);
|
@@ -196,7 +191,7 @@ int git_win32_path_from_utf8(git_win32_path out, const char *src)
|
|
196
191
|
dest += PATH__NT_NAMESPACE_LEN;
|
197
192
|
|
198
193
|
/* See if this is an absolute path (beginning with a drive letter) */
|
199
|
-
if (
|
194
|
+
if (git_path_is_absolute(src)) {
|
200
195
|
if (git__utf8_to_16(dest, MAX_PATH, src) < 0)
|
201
196
|
goto on_error;
|
202
197
|
}
|
@@ -220,7 +215,7 @@ int git_win32_path_from_utf8(git_win32_path out, const char *src)
|
|
220
215
|
if (path__cwd(dest, MAX_PATH) < 0)
|
221
216
|
goto on_error;
|
222
217
|
|
223
|
-
if (!
|
218
|
+
if (!git_path_is_absolute(dest)) {
|
224
219
|
errno = ENOENT;
|
225
220
|
goto on_error;
|
226
221
|
}
|