rugged 0.26.7 → 0.27.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/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,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_path_w32_h__
|
|
8
|
+
#define INCLUDE_win32_path_w32_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
|
+
|
|
11
12
|
#include "vector.h"
|
|
12
13
|
|
|
13
14
|
/*
|
|
@@ -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_posix_h__
|
|
8
|
+
#define INCLUDE_win32_posix_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
11
|
#include "../posix.h"
|
|
@@ -4,6 +4,9 @@
|
|
|
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
|
+
|
|
8
|
+
#include "common.h"
|
|
9
|
+
|
|
7
10
|
#include "../posix.h"
|
|
8
11
|
#include "../fileops.h"
|
|
9
12
|
#include "path.h"
|
|
@@ -162,12 +165,15 @@ GIT_INLINE(bool) last_error_retryable(void)
|
|
|
162
165
|
|
|
163
166
|
#define do_with_retries(fn, remediation) \
|
|
164
167
|
do { \
|
|
165
|
-
int
|
|
166
|
-
for (
|
|
167
|
-
if (__tries && (__ret = (remediation)) != 0) \
|
|
168
|
-
return __ret; \
|
|
168
|
+
int __retry, __ret; \
|
|
169
|
+
for (__retry = git_win32__retries; __retry; __retry--) { \
|
|
169
170
|
if ((__ret = (fn)) != GIT_RETRY) \
|
|
170
171
|
return __ret; \
|
|
172
|
+
if (__retry > 1 && (__ret = (remediation)) != 0) { \
|
|
173
|
+
if (__ret == GIT_RETRY) \
|
|
174
|
+
continue; \
|
|
175
|
+
return __ret; \
|
|
176
|
+
} \
|
|
171
177
|
Sleep(5); \
|
|
172
178
|
} \
|
|
173
179
|
return -1; \
|
|
@@ -186,7 +192,7 @@ static int ensure_writable(wchar_t *path)
|
|
|
186
192
|
if (!SetFileAttributesW(path, (attrs & ~FILE_ATTRIBUTE_READONLY)))
|
|
187
193
|
goto on_error;
|
|
188
194
|
|
|
189
|
-
return
|
|
195
|
+
return GIT_RETRY;
|
|
190
196
|
|
|
191
197
|
on_error:
|
|
192
198
|
set_errno();
|
|
@@ -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_win32_reparse_h__
|
|
9
|
+
#define INCLUDE_win32_reparse_h__
|
|
10
10
|
|
|
11
11
|
/* This structure is defined on MSDN at
|
|
12
12
|
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff552012(v=vs.85).aspx
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
#ifndef INCLUDE_win32_thread_h__
|
|
9
9
|
#define INCLUDE_win32_thread_h__
|
|
10
10
|
|
|
11
|
-
#include "
|
|
11
|
+
#include "common.h"
|
|
12
12
|
|
|
13
13
|
#if defined (_MSC_VER)
|
|
14
14
|
# define GIT_RESTRICT __restrict
|
|
@@ -61,4 +61,4 @@ int git_rwlock_wrlock(git_rwlock *);
|
|
|
61
61
|
int git_rwlock_wrunlock(git_rwlock *);
|
|
62
62
|
int git_rwlock_free(git_rwlock *);
|
|
63
63
|
|
|
64
|
-
#endif
|
|
64
|
+
#endif
|
|
@@ -4,12 +4,13 @@
|
|
|
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_utf_conv_h__
|
|
8
|
+
#define INCLUDE_win32_utf_conv_h__
|
|
9
9
|
|
|
10
|
-
#include <wchar.h>
|
|
11
10
|
#include "common.h"
|
|
12
11
|
|
|
12
|
+
#include <wchar.h>
|
|
13
|
+
|
|
13
14
|
#ifndef WC_ERR_INVALID_CHARS
|
|
14
15
|
# define WC_ERR_INVALID_CHARS 0x80
|
|
15
16
|
#endif
|
|
@@ -4,8 +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
|
-
#ifndef
|
|
8
|
-
#define
|
|
7
|
+
#ifndef INCLUDE_win32_w32_buffer_h__
|
|
8
|
+
#define INCLUDE_win32_w32_buffer_h__
|
|
9
|
+
|
|
10
|
+
#include "common.h"
|
|
9
11
|
|
|
10
12
|
#include "../buffer.h"
|
|
11
13
|
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "w32_crtdbg_stacktrace.h"
|
|
9
|
+
|
|
8
10
|
#if defined(GIT_MSVC_CRTDBG)
|
|
9
11
|
#include "w32_stack.h"
|
|
10
|
-
#include "w32_crtdbg_stacktrace.h"
|
|
11
12
|
|
|
12
13
|
#define CRTDBG_STACKTRACE__UID_LEN (15)
|
|
13
14
|
|
|
@@ -4,11 +4,19 @@
|
|
|
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_w32_crtdbg_stacktrace_h__
|
|
8
|
+
#define INCLUDE_win32_w32_crtdbg_stacktrace_h__
|
|
9
|
+
|
|
10
|
+
#include "common.h"
|
|
9
11
|
|
|
10
12
|
#if defined(GIT_MSVC_CRTDBG)
|
|
11
13
|
|
|
14
|
+
#include <stdlib.h>
|
|
15
|
+
#include <crtdbg.h>
|
|
16
|
+
|
|
17
|
+
#include "git2/errors.h"
|
|
18
|
+
#include "strnlen.h"
|
|
19
|
+
|
|
12
20
|
/**
|
|
13
21
|
* Initialize our memory leak tracking and de-dup data structures.
|
|
14
22
|
* This should ONLY be called by git_libgit2_init().
|
|
@@ -89,5 +97,80 @@ GIT_EXTERN(int) git_win32__crtdbg_stacktrace__dump(
|
|
|
89
97
|
*/
|
|
90
98
|
const char *git_win32__crtdbg_stacktrace(int skip, const char *file);
|
|
91
99
|
|
|
100
|
+
GIT_INLINE(void *) git__crtdbg__malloc(size_t len, const char *file, int line)
|
|
101
|
+
{
|
|
102
|
+
void *ptr = _malloc_dbg(len, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
|
103
|
+
if (!ptr) giterr_set_oom();
|
|
104
|
+
return ptr;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
GIT_INLINE(void *) git__crtdbg__calloc(size_t nelem, size_t elsize, const char *file, int line)
|
|
108
|
+
{
|
|
109
|
+
void *ptr = _calloc_dbg(nelem, elsize, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
|
110
|
+
if (!ptr) giterr_set_oom();
|
|
111
|
+
return ptr;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
GIT_INLINE(char *) git__crtdbg__strdup(const char *str, const char *file, int line)
|
|
115
|
+
{
|
|
116
|
+
char *ptr = _strdup_dbg(str, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
|
117
|
+
if (!ptr) giterr_set_oom();
|
|
118
|
+
return ptr;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
GIT_INLINE(char *) git__crtdbg__strndup(const char *str, size_t n, const char *file, int line)
|
|
122
|
+
{
|
|
123
|
+
size_t length = 0, alloclength;
|
|
124
|
+
char *ptr;
|
|
125
|
+
|
|
126
|
+
length = p_strnlen(str, n);
|
|
127
|
+
|
|
128
|
+
if (GIT_ADD_SIZET_OVERFLOW(&alloclength, length, 1) ||
|
|
129
|
+
!(ptr = git__crtdbg__malloc(alloclength, file, line)))
|
|
130
|
+
return NULL;
|
|
131
|
+
|
|
132
|
+
if (length)
|
|
133
|
+
memcpy(ptr, str, length);
|
|
134
|
+
|
|
135
|
+
ptr[length] = '\0';
|
|
136
|
+
|
|
137
|
+
return ptr;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
GIT_INLINE(char *) git__crtdbg__substrdup(const char *start, size_t n, const char *file, int line)
|
|
141
|
+
{
|
|
142
|
+
char *ptr;
|
|
143
|
+
size_t alloclen;
|
|
144
|
+
|
|
145
|
+
if (GIT_ADD_SIZET_OVERFLOW(&alloclen, n, 1) ||
|
|
146
|
+
!(ptr = git__crtdbg__malloc(alloclen, file, line)))
|
|
147
|
+
return NULL;
|
|
148
|
+
|
|
149
|
+
memcpy(ptr, start, n);
|
|
150
|
+
ptr[n] = '\0';
|
|
151
|
+
return ptr;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
GIT_INLINE(void *) git__crtdbg__realloc(void *ptr, size_t size, const char *file, int line)
|
|
155
|
+
{
|
|
156
|
+
void *new_ptr = _realloc_dbg(ptr, size, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
|
157
|
+
if (!new_ptr) giterr_set_oom();
|
|
158
|
+
return new_ptr;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
GIT_INLINE(void *) git__crtdbg__reallocarray(void *ptr, size_t nelem, size_t elsize, const char *file, int line)
|
|
162
|
+
{
|
|
163
|
+
size_t newsize;
|
|
164
|
+
|
|
165
|
+
return GIT_MULTIPLY_SIZET_OVERFLOW(&newsize, nelem, elsize) ?
|
|
166
|
+
NULL : _realloc_dbg(ptr, newsize, _NORMAL_BLOCK, git_win32__crtdbg_stacktrace(1,file), line);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
GIT_INLINE(void *) git__crtdbg__mallocarray(size_t nelem, size_t elsize, const char *file, int line)
|
|
170
|
+
{
|
|
171
|
+
return git__crtdbg__reallocarray(NULL, nelem, elsize, file, line);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
92
175
|
#endif
|
|
93
176
|
#endif
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "w32_stack.h"
|
|
9
|
+
|
|
8
10
|
#if defined(GIT_MSVC_CRTDBG)
|
|
9
11
|
#include "Windows.h"
|
|
10
12
|
#include "Dbghelp.h"
|
|
11
13
|
#include "win32/posix.h"
|
|
12
|
-
#include "w32_stack.h"
|
|
13
14
|
#include "hash.h"
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -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_w32_stack_h__
|
|
9
|
+
#define INCLUDE_win32_w32_stack_h__
|
|
10
|
+
|
|
11
|
+
#include "common.h"
|
|
10
12
|
|
|
11
13
|
#if defined(GIT_MSVC_CRTDBG)
|
|
12
14
|
|
|
@@ -135,4 +137,4 @@ int git_win32__stack(
|
|
|
135
137
|
const char *prefix, const char *suffix);
|
|
136
138
|
|
|
137
139
|
#endif /* GIT_MSVC_CRTDBG */
|
|
138
|
-
#endif
|
|
140
|
+
#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_w32_util_h__
|
|
9
|
+
#define INCLUDE_win32_w32_util_h__
|
|
10
|
+
|
|
11
|
+
#include "common.h"
|
|
10
12
|
|
|
11
13
|
#include "utf-conv.h"
|
|
12
14
|
#include "posix.h"
|
|
@@ -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_win32_compat_h__
|
|
8
|
+
#define INCLUDE_win32_win32_compat_h__
|
|
9
9
|
|
|
10
10
|
#include <stdint.h>
|
|
11
11
|
#include <time.h>
|
|
@@ -49,4 +49,4 @@ struct p_stat {
|
|
|
49
49
|
|
|
50
50
|
#define stat p_stat
|
|
51
51
|
|
|
52
|
-
#endif
|
|
52
|
+
#endif
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#include "
|
|
8
|
+
#include "worktree.h"
|
|
9
9
|
|
|
10
10
|
#include "git2/branch.h"
|
|
11
11
|
#include "git2/commit.h"
|
|
12
12
|
#include "git2/worktree.h"
|
|
13
13
|
|
|
14
14
|
#include "repository.h"
|
|
15
|
-
#include "worktree.h"
|
|
16
15
|
|
|
17
16
|
static bool is_worktree_dir(const char *dir)
|
|
18
17
|
{
|
|
@@ -384,7 +383,7 @@ out:
|
|
|
384
383
|
return err;
|
|
385
384
|
}
|
|
386
385
|
|
|
387
|
-
int git_worktree_lock(git_worktree *wt, char *
|
|
386
|
+
int git_worktree_lock(git_worktree *wt, const char *reason)
|
|
388
387
|
{
|
|
389
388
|
git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
|
|
390
389
|
int err;
|
|
@@ -397,8 +396,8 @@ int git_worktree_lock(git_worktree *wt, char *creason)
|
|
|
397
396
|
if ((err = git_buf_joinpath(&path, wt->gitdir_path, "locked")) < 0)
|
|
398
397
|
goto out;
|
|
399
398
|
|
|
400
|
-
if (
|
|
401
|
-
git_buf_attach_notowned(&buf,
|
|
399
|
+
if (reason)
|
|
400
|
+
git_buf_attach_notowned(&buf, reason, strlen(reason));
|
|
402
401
|
|
|
403
402
|
if ((err = git_futils_writebuffer(&buf, path.ptr, O_CREAT|O_EXCL|O_WRONLY, 0644)) < 0)
|
|
404
403
|
goto out;
|
|
@@ -13,15 +13,13 @@
|
|
|
13
13
|
* Lesser General Public License for more details.
|
|
14
14
|
*
|
|
15
15
|
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
-
* License along with this library; if not,
|
|
17
|
-
*
|
|
16
|
+
* License along with this library; if not, see
|
|
17
|
+
* <http://www.gnu.org/licenses/>.
|
|
18
18
|
*
|
|
19
19
|
* Davide Libenzi <davidel@xmailserver.org>
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
#include "../util.h"
|
|
24
|
-
|
|
25
23
|
#if !defined(XDIFF_H)
|
|
26
24
|
#define XDIFF_H
|
|
27
25
|
|
|
@@ -29,22 +27,29 @@
|
|
|
29
27
|
extern "C" {
|
|
30
28
|
#endif /* #ifdef __cplusplus */
|
|
31
29
|
|
|
30
|
+
/* xpparm_t.flags */
|
|
31
|
+
#define XDF_NEED_MINIMAL (1 << 0)
|
|
32
|
+
|
|
33
|
+
#define XDF_IGNORE_WHITESPACE (1 << 1)
|
|
34
|
+
#define XDF_IGNORE_WHITESPACE_CHANGE (1 << 2)
|
|
35
|
+
#define XDF_IGNORE_WHITESPACE_AT_EOL (1 << 3)
|
|
36
|
+
#define XDF_IGNORE_CR_AT_EOL (1 << 4)
|
|
37
|
+
#define XDF_WHITESPACE_FLAGS (XDF_IGNORE_WHITESPACE | \
|
|
38
|
+
XDF_IGNORE_WHITESPACE_CHANGE | \
|
|
39
|
+
XDF_IGNORE_WHITESPACE_AT_EOL | \
|
|
40
|
+
XDF_IGNORE_CR_AT_EOL)
|
|
32
41
|
|
|
33
|
-
#define
|
|
34
|
-
#define XDF_IGNORE_WHITESPACE (1 << 2)
|
|
35
|
-
#define XDF_IGNORE_WHITESPACE_CHANGE (1 << 3)
|
|
36
|
-
#define XDF_IGNORE_WHITESPACE_AT_EOL (1 << 4)
|
|
37
|
-
#define XDF_WHITESPACE_FLAGS (XDF_IGNORE_WHITESPACE | XDF_IGNORE_WHITESPACE_CHANGE | XDF_IGNORE_WHITESPACE_AT_EOL)
|
|
42
|
+
#define XDF_IGNORE_BLANK_LINES (1 << 7)
|
|
38
43
|
|
|
39
|
-
#define XDF_PATIENCE_DIFF (1 <<
|
|
40
|
-
#define XDF_HISTOGRAM_DIFF (1 <<
|
|
44
|
+
#define XDF_PATIENCE_DIFF (1 << 14)
|
|
45
|
+
#define XDF_HISTOGRAM_DIFF (1 << 15)
|
|
41
46
|
#define XDF_DIFF_ALGORITHM_MASK (XDF_PATIENCE_DIFF | XDF_HISTOGRAM_DIFF)
|
|
42
47
|
#define XDF_DIFF_ALG(x) ((x) & XDF_DIFF_ALGORITHM_MASK)
|
|
43
48
|
|
|
44
|
-
#define
|
|
49
|
+
#define XDF_INDENT_HEURISTIC (1 << 23)
|
|
45
50
|
|
|
51
|
+
/* xdemitconf_t.flags */
|
|
46
52
|
#define XDL_EMIT_FUNCNAMES (1 << 0)
|
|
47
|
-
#define XDL_EMIT_COMMON (1 << 1)
|
|
48
53
|
#define XDL_EMIT_FUNCCONTEXT (1 << 2)
|
|
49
54
|
|
|
50
55
|
#define XDL_MMB_READONLY (1 << 0)
|
|
@@ -81,6 +86,10 @@ typedef struct s_mmbuffer {
|
|
|
81
86
|
|
|
82
87
|
typedef struct s_xpparam {
|
|
83
88
|
unsigned long flags;
|
|
89
|
+
|
|
90
|
+
/* See Documentation/diff-options.txt. */
|
|
91
|
+
char **anchors;
|
|
92
|
+
size_t anchors_nr;
|
|
84
93
|
} xpparam_t;
|
|
85
94
|
|
|
86
95
|
typedef struct s_xdemitcb {
|