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
@@ -0,0 +1,14 @@
|
|
1
|
+
MACRO(ENABLE_WARNINGS flag)
|
2
|
+
IF(ENABLE_WERROR)
|
3
|
+
ADD_C_FLAG_IF_SUPPORTED(-Werror=${flag})
|
4
|
+
ELSE()
|
5
|
+
ADD_C_FLAG_IF_SUPPORTED(-W${flag})
|
6
|
+
ENDIF()
|
7
|
+
ENDMACRO()
|
8
|
+
|
9
|
+
MACRO(DISABLE_WARNINGS flag)
|
10
|
+
ADD_C_FLAG_IF_SUPPORTED(-Wno-${flag})
|
11
|
+
IF(ENABLE_WERROR)
|
12
|
+
ADD_C_FLAG_IF_SUPPORTED(-Wno-error=${flag})
|
13
|
+
ENDIF()
|
14
|
+
ENDMACRO()
|
@@ -1,9 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
# Find CoreFoundation.framework
|
2
|
+
# This will define :
|
3
|
+
#
|
4
|
+
# COREFOUNDATION_FOUND
|
5
|
+
# COREFOUNDATION_LIBRARIES
|
6
|
+
# COREFOUNDATION_LDFLAGS
|
7
|
+
#
|
8
|
+
|
9
|
+
FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h)
|
10
|
+
FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation)
|
11
|
+
IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES)
|
12
|
+
IF (NOT CoreFoundation_FIND_QUIETLY)
|
13
|
+
MESSAGE("-- Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
|
14
|
+
ENDIF()
|
15
|
+
SET(COREFOUNDATION_FOUND TRUE)
|
16
|
+
SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation")
|
9
17
|
ENDIF ()
|
18
|
+
|
19
|
+
IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND)
|
20
|
+
MESSAGE(FATAL "-- CoreFoundation not found")
|
21
|
+
ENDIF()
|
22
|
+
|
23
|
+
MARK_AS_ADVANCED(
|
24
|
+
COREFOUNDATION_INCLUDE_DIR
|
25
|
+
COREFOUNDATION_LIBRARIES
|
26
|
+
)
|
@@ -1,9 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
# Find Security.framework
|
2
|
+
# This will define :
|
3
|
+
#
|
4
|
+
# SECURITY_FOUND
|
5
|
+
# SECURITY_LIBRARIES
|
6
|
+
# SECURITY_LDFLAGS
|
7
|
+
# SECURITY_HAS_SSLCREATECONTEXT
|
8
|
+
#
|
9
|
+
|
10
|
+
FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h)
|
11
|
+
FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security)
|
12
|
+
IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES)
|
13
|
+
IF (NOT Security_FIND_QUIETLY)
|
14
|
+
MESSAGE("-- Found Security ${SECURITY_LIBRARIES}")
|
15
|
+
ENDIF()
|
16
|
+
SET(SECURITY_FOUND TRUE)
|
17
|
+
SET(SECURITY_LDFLAGS "-framework Security")
|
18
|
+
CHECK_LIBRARY_EXISTS("${SECURITY_LIBRARIES}" SSLCreateContext "Security/SecureTransport.h" SECURITY_HAS_SSLCREATECONTEXT)
|
9
19
|
ENDIF ()
|
20
|
+
|
21
|
+
IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND)
|
22
|
+
MESSAGE(FATAL "-- Security not found")
|
23
|
+
ENDIF()
|
24
|
+
|
25
|
+
MARK_AS_ADVANCED(
|
26
|
+
SECURITY_INCLUDE_DIR
|
27
|
+
SECURITY_LIBRARIES
|
28
|
+
)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
|
2
|
+
HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C)
|
3
|
+
CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtimespec "sys/types.h;sys/stat.h"
|
4
|
+
HAVE_STRUCT_STAT_ST_MTIMESPEC LANGUAGE C)
|
5
|
+
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtime_nsec sys/stat.h
|
6
|
+
HAVE_STRUCT_STAT_MTIME_NSEC LANGUAGE C)
|
7
|
+
|
8
|
+
IF (HAVE_STRUCT_STAT_ST_MTIM)
|
9
|
+
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec sys/stat.h
|
10
|
+
HAVE_STRUCT_STAT_NSEC LANGUAGE C)
|
11
|
+
ELSEIF (HAVE_STRUCT_STAT_ST_MTIMESPEC)
|
12
|
+
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec sys/stat.h
|
13
|
+
HAVE_STRUCT_STAT_NSEC LANGUAGE C)
|
14
|
+
ELSE ()
|
15
|
+
SET( HAVE_STRUCT_STAT_NSEC ON )
|
16
|
+
ENDIF()
|
17
|
+
|
18
|
+
IF (HAVE_STRUCT_STAT_NSEC OR WIN32)
|
19
|
+
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON )
|
20
|
+
ENDIF()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This function splits the sources files up into their appropriate
|
2
|
+
# subdirectories. This is especially useful for IDEs like Xcode and
|
3
|
+
# Visual Studio, so that you can navigate into the libgit2_clar project,
|
4
|
+
# and see the folders within the tests folder (instead of just seeing all
|
5
|
+
# source and tests in a single folder.)
|
6
|
+
FUNCTION(IDE_SPLIT_SOURCES target)
|
7
|
+
IF(MSVC_IDE OR CMAKE_GENERATOR STREQUAL Xcode)
|
8
|
+
GET_TARGET_PROPERTY(sources ${target} SOURCES)
|
9
|
+
FOREACH(source ${sources})
|
10
|
+
IF(source MATCHES ".*/")
|
11
|
+
STRING(REPLACE ${libgit2_SOURCE_DIR}/ "" rel ${source})
|
12
|
+
IF(rel)
|
13
|
+
STRING(REGEX REPLACE "/([^/]*)$" "" rel ${rel})
|
14
|
+
IF(rel)
|
15
|
+
STRING(REPLACE "/" "\\\\" rel ${rel})
|
16
|
+
SOURCE_GROUP(${rel} FILES ${source})
|
17
|
+
ENDIF()
|
18
|
+
ENDIF()
|
19
|
+
ENDIF()
|
20
|
+
ENDFOREACH()
|
21
|
+
ENDIF()
|
22
|
+
ENDFUNCTION()
|
@@ -0,0 +1,26 @@
|
|
1
|
+
FIND_PROGRAM(DLLTOOL dlltool CMAKE_FIND_ROOT_PATH_BOTH)
|
2
|
+
IF (NOT DLLTOOL)
|
3
|
+
MESSAGE(FATAL_ERROR "Could not find dlltool command")
|
4
|
+
ENDIF ()
|
5
|
+
|
6
|
+
SET(LIBWINHTTP_PATH "${libgit2_BINARY_DIR}/deps/winhttp")
|
7
|
+
SET(LIBWINHTTP_PATH ${LIBWINHTTP_PATH} PARENT_SCOPE)
|
8
|
+
FILE(MAKE_DIRECTORY ${LIBWINHTTP_PATH})
|
9
|
+
|
10
|
+
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
11
|
+
set(WINHTTP_DEF "winhttp64.def")
|
12
|
+
ELSE()
|
13
|
+
set(WINHTTP_DEF "winhttp.def")
|
14
|
+
ENDIF()
|
15
|
+
|
16
|
+
ADD_CUSTOM_COMMAND(
|
17
|
+
OUTPUT ${LIBWINHTTP_PATH}/libwinhttp.a
|
18
|
+
COMMAND ${DLLTOOL} -d ${WINHTTP_DEF} -k -D winhttp.dll -l libwinhttp.a
|
19
|
+
DEPENDS ${WINHTTP_DEF}
|
20
|
+
WORKING_DIRECTORY ${LIBWINHTTP_PATH}
|
21
|
+
)
|
22
|
+
|
23
|
+
SET_SOURCE_FILES_PROPERTIES(
|
24
|
+
${CMAKE_CURRENT_SOURCE_DIR}/src/transports/winhttp.c
|
25
|
+
PROPERTIES OBJECT_DEPENDS ${LIBWINHTTP_PATH}/libwinhttp.a
|
26
|
+
)
|
@@ -199,6 +199,8 @@ GIT_EXTERN(int) git_config_new(git_config **out);
|
|
199
199
|
* @param path path to the configuration file to add
|
200
200
|
* @param level the priority level of the backend
|
201
201
|
* @param force replace config file at the given priority level
|
202
|
+
* @param repo optional repository to allow parsing of
|
203
|
+
* conditional includes
|
202
204
|
* @return 0 on success, GIT_EEXISTS when adding more than one file
|
203
205
|
* for a given priority level (and force_replace set to 0),
|
204
206
|
* GIT_ENOTFOUND when the file doesn't exist or error code
|
@@ -207,6 +209,7 @@ GIT_EXTERN(int) git_config_add_file_ondisk(
|
|
207
209
|
git_config *cfg,
|
208
210
|
const char *path,
|
209
211
|
git_config_level_t level,
|
212
|
+
const git_repository *repo,
|
210
213
|
int force);
|
211
214
|
|
212
215
|
/**
|
@@ -398,6 +401,10 @@ GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, c
|
|
398
401
|
*
|
399
402
|
* The callback will be called on each variable found
|
400
403
|
*
|
404
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
405
|
+
* the variable name: the section and variable parts are lower-cased. The
|
406
|
+
* subsection is left unchanged.
|
407
|
+
*
|
401
408
|
* @param cfg where to look for the variable
|
402
409
|
* @param name the variable's name
|
403
410
|
* @param regexp regular expression to filter which variables we're
|
@@ -410,6 +417,10 @@ GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const cha
|
|
410
417
|
/**
|
411
418
|
* Get each value of a multivar
|
412
419
|
*
|
420
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
421
|
+
* the variable name: the section and variable parts are lower-cased. The
|
422
|
+
* subsection is left unchanged.
|
423
|
+
*
|
413
424
|
* @param out pointer to store the iterator
|
414
425
|
* @param cfg where to look for the variable
|
415
426
|
* @param name the variable's name
|
@@ -487,6 +498,8 @@ GIT_EXTERN(int) git_config_set_string(git_config *cfg, const char *name, const c
|
|
487
498
|
/**
|
488
499
|
* Set a multivar in the local config file.
|
489
500
|
*
|
501
|
+
* The regular expression is applied case-sensitively on the value.
|
502
|
+
*
|
490
503
|
* @param cfg where to look for the variable
|
491
504
|
* @param name the variable's name
|
492
505
|
* @param regexp a regular expression to indicate which values to replace
|
@@ -506,6 +519,8 @@ GIT_EXTERN(int) git_config_delete_entry(git_config *cfg, const char *name);
|
|
506
519
|
/**
|
507
520
|
* Deletes one or several entries from a multivar in the local config file.
|
508
521
|
*
|
522
|
+
* The regular expression is applied case-sensitively on the value.
|
523
|
+
*
|
509
524
|
* @param cfg where to look for the variables
|
510
525
|
* @param name the variable's name
|
511
526
|
* @param regexp a regular expression to indicate which values to delete
|
@@ -552,6 +567,10 @@ GIT_EXTERN(int) git_config_iterator_new(git_config_iterator **out, const git_con
|
|
552
567
|
* Use `git_config_next` to advance the iteration and
|
553
568
|
* `git_config_iterator_free` when done.
|
554
569
|
*
|
570
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
571
|
+
* the variable name: the section and variable parts are lower-cased. The
|
572
|
+
* subsection is left unchanged.
|
573
|
+
*
|
555
574
|
* @param out pointer to store the iterator
|
556
575
|
* @param cfg where to ge the variables from
|
557
576
|
* @param regexp regular expression to match the names
|
@@ -565,8 +584,12 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi
|
|
565
584
|
* regular expression that filters which config keys are passed to the
|
566
585
|
* callback.
|
567
586
|
*
|
568
|
-
* The
|
569
|
-
*
|
587
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
588
|
+
* the variable name: the section and variable parts are lower-cased. The
|
589
|
+
* subsection is left unchanged.
|
590
|
+
*
|
591
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
592
|
+
* the variable name: the case-insensitive parts are lower-case.
|
570
593
|
*
|
571
594
|
* @param cfg where to get the variables from
|
572
595
|
* @param regexp regular expression to match against config names
|
@@ -693,6 +716,10 @@ GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
|
|
693
716
|
* This behaviors like `git_config_foreach_match` except instead of all config
|
694
717
|
* entries it just enumerates through the given backend entry.
|
695
718
|
*
|
719
|
+
* The regular expression is applied case-sensitively on the normalized form of
|
720
|
+
* the variable name: the section and variable parts are lower-cased. The
|
721
|
+
* subsection is left unchanged.
|
722
|
+
*
|
696
723
|
* @param backend where to get the variables from
|
697
724
|
* @param regexp regular expression to match against config names (can be NULL)
|
698
725
|
* @param callback the function to call on each variable
|
@@ -23,7 +23,7 @@ GIT_BEGIN_DECL
|
|
23
23
|
/**
|
24
24
|
* Reference lookup strategy
|
25
25
|
*
|
26
|
-
* These behave like the --tags and --all
|
26
|
+
* These behave like the --tags and --all options to git-describe,
|
27
27
|
* namely they say to look for any reference in either refs/tags/ or
|
28
28
|
* refs/ respectively.
|
29
29
|
*/
|
@@ -200,12 +200,18 @@ typedef enum {
|
|
200
200
|
/** Use the "patience diff" algorithm */
|
201
201
|
GIT_DIFF_PATIENCE = (1u << 28),
|
202
202
|
/** Take extra time to find minimal diff */
|
203
|
-
GIT_DIFF_MINIMAL = (
|
203
|
+
GIT_DIFF_MINIMAL = (1u << 29),
|
204
204
|
|
205
205
|
/** Include the necessary deflate / delta information so that `git-apply`
|
206
206
|
* can apply given diff information to binary files.
|
207
207
|
*/
|
208
|
-
GIT_DIFF_SHOW_BINARY = (
|
208
|
+
GIT_DIFF_SHOW_BINARY = (1u << 30),
|
209
|
+
|
210
|
+
/** Use a heuristic that takes indentation and whitespace into account
|
211
|
+
* which generally can produce better diffs when dealing with ambiguous
|
212
|
+
* diff hunks.
|
213
|
+
*/
|
214
|
+
GIT_DIFF_INDENT_HEURISTIC = (1u << 31),
|
209
215
|
} git_diff_option_t;
|
210
216
|
|
211
217
|
/**
|
@@ -515,12 +521,12 @@ typedef int(*git_diff_binary_cb)(
|
|
515
521
|
* Structure describing a hunk of a diff.
|
516
522
|
*/
|
517
523
|
typedef struct {
|
518
|
-
int old_start;
|
519
|
-
int old_lines;
|
520
|
-
int new_start;
|
521
|
-
int new_lines;
|
522
|
-
size_t header_len;
|
523
|
-
char header[GIT_DIFF_HUNK_HEADER_SIZE];
|
524
|
+
int old_start; /**< Starting line number in old_file */
|
525
|
+
int old_lines; /**< Number of lines in old_file */
|
526
|
+
int new_start; /**< Starting line number in new_file */
|
527
|
+
int new_lines; /**< Number of lines in new_file */
|
528
|
+
size_t header_len; /**< Number of bytes in header text */
|
529
|
+
char header[GIT_DIFF_HUNK_HEADER_SIZE]; /**< Header text, NUL-byte terminated */
|
524
530
|
} git_diff_hunk;
|
525
531
|
|
526
532
|
/**
|
@@ -1400,6 +1406,51 @@ GIT_EXTERN(int) git_diff_format_email_init_options(
|
|
1400
1406
|
git_diff_format_email_options *opts,
|
1401
1407
|
unsigned int version);
|
1402
1408
|
|
1409
|
+
/**
|
1410
|
+
* Patch ID options structure
|
1411
|
+
*
|
1412
|
+
* Initialize with `GIT_DIFF_PATCHID_OPTIONS_INIT` macro to
|
1413
|
+
* correctly set the default values and version.
|
1414
|
+
*/
|
1415
|
+
typedef struct git_diff_patchid_options {
|
1416
|
+
unsigned int version;
|
1417
|
+
} git_diff_patchid_options;
|
1418
|
+
|
1419
|
+
#define GIT_DIFF_PATCHID_OPTIONS_VERSION 1
|
1420
|
+
#define GIT_DIFF_PATCHID_OPTIONS_INIT { GIT_DIFF_PATCHID_OPTIONS_VERSION }
|
1421
|
+
|
1422
|
+
/**
|
1423
|
+
* Initialize `git_diff_patchid_options` structure.
|
1424
|
+
*
|
1425
|
+
* Initializes the structure with default values. Equivalent to
|
1426
|
+
* creating an instance with `GIT_DIFF_PATCHID_OPTIONS_INIT`.
|
1427
|
+
*/
|
1428
|
+
GIT_EXTERN(int) git_diff_patchid_init_options(
|
1429
|
+
git_diff_patchid_options *opts,
|
1430
|
+
unsigned int version);
|
1431
|
+
|
1432
|
+
/**
|
1433
|
+
* Calculate the patch ID for the given patch.
|
1434
|
+
*
|
1435
|
+
* Calculate a stable patch ID for the given patch by summing the
|
1436
|
+
* hash of the file diffs, ignoring whitespace and line numbers.
|
1437
|
+
* This can be used to derive whether two diffs are the same with
|
1438
|
+
* a high probability.
|
1439
|
+
*
|
1440
|
+
* Currently, this function only calculates stable patch IDs, as
|
1441
|
+
* defined in git-patch-id(1), and should in fact generate the
|
1442
|
+
* same IDs as the upstream git project does.
|
1443
|
+
*
|
1444
|
+
* @param out Pointer where the calculated patch ID shoul be
|
1445
|
+
* stored
|
1446
|
+
* @param diff The diff to calculate the ID for
|
1447
|
+
* @param opts Options for how to calculate the patch ID. This is
|
1448
|
+
* intended for future changes, as currently no options are
|
1449
|
+
* available.
|
1450
|
+
* @return 0 on success, an error code otherwise.
|
1451
|
+
*/
|
1452
|
+
GIT_EXTERN(int) git_diff_patchid(git_oid *out, git_diff *diff, git_diff_patchid_options *opts);
|
1453
|
+
|
1403
1454
|
GIT_END_DECL
|
1404
1455
|
|
1405
1456
|
/** @} */
|
@@ -40,6 +40,9 @@ GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_reposi
|
|
40
40
|
/**
|
41
41
|
* Determine if a commit is the descendant of another commit.
|
42
42
|
*
|
43
|
+
* Note that a commit is not considered a descendant of itself, in contrast
|
44
|
+
* to `git merge-base --is-ancestor`.
|
45
|
+
*
|
43
46
|
* @param commit a previously loaded commit.
|
44
47
|
* @param ancestor a potential ancestor commit.
|
45
48
|
* @return 1 if the given commit is a descendant of the potential ancestor,
|
@@ -162,6 +162,8 @@ typedef enum {
|
|
162
162
|
GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7),
|
163
163
|
} git_merge_file_flag_t;
|
164
164
|
|
165
|
+
#define GIT_MERGE_CONFLICT_MARKER_SIZE 7
|
166
|
+
|
165
167
|
/**
|
166
168
|
* Options for merging a file
|
167
169
|
*/
|
@@ -191,6 +193,10 @@ typedef struct {
|
|
191
193
|
|
192
194
|
/** see `git_merge_file_flag_t` above */
|
193
195
|
git_merge_file_flag_t flags;
|
196
|
+
|
197
|
+
/** The size of conflict markers (eg, "<<<<<<<"). Default is
|
198
|
+
* GIT_MERGE_CONFLICT_MARKER_SIZE. */
|
199
|
+
unsigned short marker_size;
|
194
200
|
} git_merge_file_options;
|
195
201
|
|
196
202
|
#define GIT_MERGE_FILE_OPTIONS_VERSION 1
|
@@ -19,10 +19,9 @@
|
|
19
19
|
GIT_BEGIN_DECL
|
20
20
|
|
21
21
|
/**
|
22
|
-
* Clean up
|
23
|
-
* ends with a '\n'.
|
22
|
+
* Clean up excess whitespace and make sure there is a trailing newline in the message.
|
24
23
|
*
|
25
|
-
* Optionally, can remove lines
|
24
|
+
* Optionally, it can remove lines which start with the comment character.
|
26
25
|
*
|
27
26
|
* @param out The user-allocated git_buf which will be filled with the
|
28
27
|
* cleaned up message.
|
@@ -38,6 +37,47 @@ GIT_BEGIN_DECL
|
|
38
37
|
*/
|
39
38
|
GIT_EXTERN(int) git_message_prettify(git_buf *out, const char *message, int strip_comments, char comment_char);
|
40
39
|
|
40
|
+
/**
|
41
|
+
* Represents a single git message trailer.
|
42
|
+
*/
|
43
|
+
typedef struct {
|
44
|
+
const char *key;
|
45
|
+
const char *value;
|
46
|
+
} git_message_trailer;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Represents an array of git message trailers.
|
50
|
+
*
|
51
|
+
* Struct members under the private comment are private, subject to change
|
52
|
+
* and should not be used by callers.
|
53
|
+
*/
|
54
|
+
typedef struct {
|
55
|
+
git_message_trailer *trailers;
|
56
|
+
size_t count;
|
57
|
+
|
58
|
+
/* private */
|
59
|
+
char *_trailer_block;
|
60
|
+
} git_message_trailer_array;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Parse trailers out of a message, filling the array pointed to by +arr+.
|
64
|
+
*
|
65
|
+
* Trailers are key/value pairs in the last paragraph of a message, not
|
66
|
+
* including any patches or conflicts that may be present.
|
67
|
+
*
|
68
|
+
* @param arr A pre-allocated git_message_trailer_array struct to be filled in
|
69
|
+
* with any trailers found during parsing.
|
70
|
+
* @param message The message to be parsed
|
71
|
+
* @return 0 on success, or non-zero on error.
|
72
|
+
*/
|
73
|
+
GIT_EXTERN(int) git_message_trailers(git_message_trailer_array *arr, const char *message);
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Clean's up any allocated memory in the git_message_trailer_array filled by
|
77
|
+
* a call to git_message_trailers.
|
78
|
+
*/
|
79
|
+
GIT_EXTERN(void) git_message_trailer_array_free(git_message_trailer_array *arr);
|
80
|
+
|
41
81
|
/** @} */
|
42
82
|
GIT_END_DECL
|
43
83
|
|