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
data/vendor/libgit2/src/pool.c
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) the libgit2 contributors. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
|
5
|
+
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
#include "pool.h"
|
|
9
|
+
|
|
2
10
|
#include "posix.h"
|
|
3
11
|
#ifndef GIT_WIN32
|
|
4
12
|
#include <unistd.h>
|
data/vendor/libgit2/src/pool.h
CHANGED
data/vendor/libgit2/src/posix.c
CHANGED
data/vendor/libgit2/src/posix.h
CHANGED
data/vendor/libgit2/src/pqueue.c
CHANGED
data/vendor/libgit2/src/pqueue.h
CHANGED
data/vendor/libgit2/src/proxy.c
CHANGED
data/vendor/libgit2/src/proxy.h
CHANGED
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
#ifndef INCLUDE_proxy_h__
|
|
8
8
|
#define INCLUDE_proxy_h__
|
|
9
9
|
|
|
10
|
+
#include "common.h"
|
|
11
|
+
|
|
10
12
|
#include "git2/proxy.h"
|
|
11
13
|
|
|
12
14
|
extern int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src);
|
|
13
15
|
extern void git_proxy_options_clear(git_proxy_options *opts);
|
|
14
16
|
|
|
15
|
-
#endif
|
|
17
|
+
#endif
|
data/vendor/libgit2/src/push.c
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "push.h"
|
|
9
|
+
|
|
8
10
|
#include "git2.h"
|
|
9
11
|
|
|
10
|
-
#include "common.h"
|
|
11
12
|
#include "pack.h"
|
|
12
13
|
#include "pack-objects.h"
|
|
13
14
|
#include "remote.h"
|
|
14
15
|
#include "vector.h"
|
|
15
|
-
#include "push.h"
|
|
16
16
|
#include "tree.h"
|
|
17
17
|
|
|
18
18
|
static int push_spec_rref_cmp(const void *a, const void *b)
|
|
@@ -263,12 +263,11 @@ static int enqueue_tag(git_object **out, git_push *push, git_oid *id)
|
|
|
263
263
|
return error;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
static int
|
|
266
|
+
static int queue_objects(git_push *push)
|
|
267
267
|
{
|
|
268
268
|
git_remote_head *head;
|
|
269
269
|
push_spec *spec;
|
|
270
270
|
git_revwalk *rw;
|
|
271
|
-
git_oid oid;
|
|
272
271
|
unsigned int i;
|
|
273
272
|
int error = -1;
|
|
274
273
|
|
|
@@ -353,176 +352,10 @@ static int revwalk(git_vector *commits, git_push *push)
|
|
|
353
352
|
git_revwalk_hide(rw, &head->oid);
|
|
354
353
|
}
|
|
355
354
|
|
|
356
|
-
|
|
357
|
-
git_oid *o = git__malloc(GIT_OID_RAWSZ);
|
|
358
|
-
if (!o) {
|
|
359
|
-
error = -1;
|
|
360
|
-
goto on_error;
|
|
361
|
-
}
|
|
362
|
-
git_oid_cpy(o, &oid);
|
|
363
|
-
if ((error = git_vector_insert(commits, o)) < 0)
|
|
364
|
-
goto on_error;
|
|
365
|
-
}
|
|
355
|
+
error = git_packbuilder_insert_walk(push->pb, rw);
|
|
366
356
|
|
|
367
357
|
on_error:
|
|
368
358
|
git_revwalk_free(rw);
|
|
369
|
-
return error == GIT_ITEROVER ? 0 : error;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
static int enqueue_object(
|
|
373
|
-
const git_tree_entry *entry,
|
|
374
|
-
git_packbuilder *pb)
|
|
375
|
-
{
|
|
376
|
-
switch (git_tree_entry_type(entry)) {
|
|
377
|
-
case GIT_OBJ_COMMIT:
|
|
378
|
-
return 0;
|
|
379
|
-
case GIT_OBJ_TREE:
|
|
380
|
-
return git_packbuilder_insert_tree(pb, entry->oid);
|
|
381
|
-
default:
|
|
382
|
-
return git_packbuilder_insert(pb, entry->oid, entry->filename);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
static int queue_differences(
|
|
387
|
-
git_tree *base,
|
|
388
|
-
git_tree *delta,
|
|
389
|
-
git_packbuilder *pb)
|
|
390
|
-
{
|
|
391
|
-
git_tree *b_child = NULL, *d_child = NULL;
|
|
392
|
-
size_t b_length = git_tree_entrycount(base);
|
|
393
|
-
size_t d_length = git_tree_entrycount(delta);
|
|
394
|
-
size_t i = 0, j = 0;
|
|
395
|
-
int error;
|
|
396
|
-
|
|
397
|
-
while (i < b_length && j < d_length) {
|
|
398
|
-
const git_tree_entry *b_entry = git_tree_entry_byindex(base, i);
|
|
399
|
-
const git_tree_entry *d_entry = git_tree_entry_byindex(delta, j);
|
|
400
|
-
int cmp = 0;
|
|
401
|
-
|
|
402
|
-
if (!git_oid__cmp(b_entry->oid, d_entry->oid))
|
|
403
|
-
goto loop;
|
|
404
|
-
|
|
405
|
-
cmp = strcmp(b_entry->filename, d_entry->filename);
|
|
406
|
-
|
|
407
|
-
/* If the entries are both trees and they have the same name but are
|
|
408
|
-
* different, then we'll recurse after adding the right-hand entry */
|
|
409
|
-
if (!cmp &&
|
|
410
|
-
git_tree_entry__is_tree(b_entry) &&
|
|
411
|
-
git_tree_entry__is_tree(d_entry)) {
|
|
412
|
-
/* Add the right-hand entry */
|
|
413
|
-
if ((error = git_packbuilder_insert(pb, d_entry->oid,
|
|
414
|
-
d_entry->filename)) < 0)
|
|
415
|
-
goto on_error;
|
|
416
|
-
|
|
417
|
-
/* Acquire the subtrees and recurse */
|
|
418
|
-
if ((error = git_tree_lookup(&b_child,
|
|
419
|
-
git_tree_owner(base), b_entry->oid)) < 0 ||
|
|
420
|
-
(error = git_tree_lookup(&d_child,
|
|
421
|
-
git_tree_owner(delta), d_entry->oid)) < 0 ||
|
|
422
|
-
(error = queue_differences(b_child, d_child, pb)) < 0)
|
|
423
|
-
goto on_error;
|
|
424
|
-
|
|
425
|
-
git_tree_free(b_child); b_child = NULL;
|
|
426
|
-
git_tree_free(d_child); d_child = NULL;
|
|
427
|
-
}
|
|
428
|
-
/* If the object is new or different in the right-hand tree,
|
|
429
|
-
* then enumerate it */
|
|
430
|
-
else if (cmp >= 0 &&
|
|
431
|
-
(error = enqueue_object(d_entry, pb)) < 0)
|
|
432
|
-
goto on_error;
|
|
433
|
-
|
|
434
|
-
loop:
|
|
435
|
-
if (cmp <= 0) i++;
|
|
436
|
-
if (cmp >= 0) j++;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/* Drain the right-hand tree of entries */
|
|
440
|
-
for (; j < d_length; j++)
|
|
441
|
-
if ((error = enqueue_object(git_tree_entry_byindex(delta, j), pb)) < 0)
|
|
442
|
-
goto on_error;
|
|
443
|
-
|
|
444
|
-
error = 0;
|
|
445
|
-
|
|
446
|
-
on_error:
|
|
447
|
-
if (b_child)
|
|
448
|
-
git_tree_free(b_child);
|
|
449
|
-
|
|
450
|
-
if (d_child)
|
|
451
|
-
git_tree_free(d_child);
|
|
452
|
-
|
|
453
|
-
return error;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
static int queue_objects(git_push *push)
|
|
457
|
-
{
|
|
458
|
-
git_vector commits = GIT_VECTOR_INIT;
|
|
459
|
-
git_oid *oid;
|
|
460
|
-
size_t i;
|
|
461
|
-
unsigned j;
|
|
462
|
-
int error;
|
|
463
|
-
|
|
464
|
-
if ((error = revwalk(&commits, push)) < 0)
|
|
465
|
-
goto on_error;
|
|
466
|
-
|
|
467
|
-
git_vector_foreach(&commits, i, oid) {
|
|
468
|
-
git_commit *parent = NULL, *commit;
|
|
469
|
-
git_tree *tree = NULL, *ptree = NULL;
|
|
470
|
-
size_t parentcount;
|
|
471
|
-
|
|
472
|
-
if ((error = git_commit_lookup(&commit, push->repo, oid)) < 0)
|
|
473
|
-
goto on_error;
|
|
474
|
-
|
|
475
|
-
/* Insert the commit */
|
|
476
|
-
if ((error = git_packbuilder_insert(push->pb, oid, NULL)) < 0)
|
|
477
|
-
goto loop_error;
|
|
478
|
-
|
|
479
|
-
parentcount = git_commit_parentcount(commit);
|
|
480
|
-
|
|
481
|
-
if (!parentcount) {
|
|
482
|
-
if ((error = git_packbuilder_insert_tree(push->pb,
|
|
483
|
-
git_commit_tree_id(commit))) < 0)
|
|
484
|
-
goto loop_error;
|
|
485
|
-
} else {
|
|
486
|
-
if ((error = git_tree_lookup(&tree, push->repo,
|
|
487
|
-
git_commit_tree_id(commit))) < 0 ||
|
|
488
|
-
(error = git_packbuilder_insert(push->pb,
|
|
489
|
-
git_commit_tree_id(commit), NULL)) < 0)
|
|
490
|
-
goto loop_error;
|
|
491
|
-
|
|
492
|
-
/* For each parent, add the items which are different */
|
|
493
|
-
for (j = 0; j < parentcount; j++) {
|
|
494
|
-
if ((error = git_commit_parent(&parent, commit, j)) < 0 ||
|
|
495
|
-
(error = git_commit_tree(&ptree, parent)) < 0 ||
|
|
496
|
-
(error = queue_differences(ptree, tree, push->pb)) < 0)
|
|
497
|
-
goto loop_error;
|
|
498
|
-
|
|
499
|
-
git_tree_free(ptree); ptree = NULL;
|
|
500
|
-
git_commit_free(parent); parent = NULL;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
error = 0;
|
|
505
|
-
|
|
506
|
-
loop_error:
|
|
507
|
-
if (tree)
|
|
508
|
-
git_tree_free(tree);
|
|
509
|
-
|
|
510
|
-
if (ptree)
|
|
511
|
-
git_tree_free(ptree);
|
|
512
|
-
|
|
513
|
-
if (parent)
|
|
514
|
-
git_commit_free(parent);
|
|
515
|
-
|
|
516
|
-
git_commit_free(commit);
|
|
517
|
-
|
|
518
|
-
if (error < 0)
|
|
519
|
-
goto on_error;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
error = 0;
|
|
523
|
-
|
|
524
|
-
on_error:
|
|
525
|
-
git_vector_free_deep(&commits);
|
|
526
359
|
return error;
|
|
527
360
|
}
|
|
528
361
|
|
data/vendor/libgit2/src/push.h
CHANGED
data/vendor/libgit2/src/rebase.c
CHANGED
data/vendor/libgit2/src/refdb.c
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#include "
|
|
9
|
-
#include "posix.h"
|
|
8
|
+
#include "refdb.h"
|
|
10
9
|
|
|
11
10
|
#include "git2/object.h"
|
|
12
11
|
#include "git2/refs.h"
|
|
@@ -14,9 +13,9 @@
|
|
|
14
13
|
#include "git2/sys/refdb_backend.h"
|
|
15
14
|
|
|
16
15
|
#include "hash.h"
|
|
17
|
-
#include "refdb.h"
|
|
18
16
|
#include "refs.h"
|
|
19
17
|
#include "reflog.h"
|
|
18
|
+
#include "posix.h"
|
|
20
19
|
|
|
21
20
|
int git_refdb_new(git_refdb **out, git_repository *repo)
|
|
22
21
|
{
|
data/vendor/libgit2/src/refdb.h
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "refdb_fs.h"
|
|
9
|
+
|
|
8
10
|
#include "refs.h"
|
|
9
11
|
#include "hash.h"
|
|
10
12
|
#include "repository.h"
|
|
@@ -13,7 +15,6 @@
|
|
|
13
15
|
#include "pack.h"
|
|
14
16
|
#include "reflog.h"
|
|
15
17
|
#include "refdb.h"
|
|
16
|
-
#include "refdb_fs.h"
|
|
17
18
|
#include "iterator.h"
|
|
18
19
|
#include "sortedcache.h"
|
|
19
20
|
#include "signature.h"
|
|
@@ -743,7 +744,7 @@ static int loose_lock(git_filebuf *file, refdb_fs_backend *backend, const char *
|
|
|
743
744
|
|
|
744
745
|
assert(file && backend && name);
|
|
745
746
|
|
|
746
|
-
if (!git_path_isvalid(backend->repo, name,
|
|
747
|
+
if (!git_path_isvalid(backend->repo, name, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) {
|
|
747
748
|
giterr_set(GITERR_INVALID, "invalid reference name '%s'", name);
|
|
748
749
|
return GIT_EINVALIDSPEC;
|
|
749
750
|
}
|
|
@@ -1739,7 +1740,7 @@ static int lock_reflog(git_filebuf *file, refdb_fs_backend *backend, const char
|
|
|
1739
1740
|
|
|
1740
1741
|
repo = backend->repo;
|
|
1741
1742
|
|
|
1742
|
-
if (!git_path_isvalid(backend->repo, refname,
|
|
1743
|
+
if (!git_path_isvalid(backend->repo, refname, GIT_PATH_REJECT_FILESYSTEM_DEFAULTS)) {
|
|
1743
1744
|
giterr_set(GITERR_INVALID, "invalid reference name '%s'", refname);
|
|
1744
1745
|
return GIT_EINVALIDSPEC;
|
|
1745
1746
|
}
|
|
@@ -2034,6 +2035,7 @@ int git_refdb_backend_fs(
|
|
|
2034
2035
|
if ((!git_repository__cvar(&t, backend->repo, GIT_CVAR_FSYNCOBJECTFILES) && t) ||
|
|
2035
2036
|
git_repository__fsync_gitdir)
|
|
2036
2037
|
backend->fsync = 1;
|
|
2038
|
+
backend->iterator_flags |= GIT_ITERATOR_DESCEND_SYMLINKS;
|
|
2037
2039
|
|
|
2038
2040
|
backend->parent.exists = &refdb_fs_backend__exists;
|
|
2039
2041
|
backend->parent.lookup = &refdb_fs_backend__lookup;
|
data/vendor/libgit2/src/reflog.c
CHANGED
data/vendor/libgit2/src/reflog.h
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#define INCLUDE_reflog_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
|
+
|
|
11
12
|
#include "git2/reflog.h"
|
|
12
13
|
#include "vector.h"
|
|
13
14
|
|
|
@@ -37,4 +38,4 @@ GIT_INLINE(size_t) reflog_inverse_index(size_t idx, size_t total)
|
|
|
37
38
|
return (total - 1) - idx;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
#endif
|
|
41
|
+
#endif
|
data/vendor/libgit2/src/refs.c
CHANGED
data/vendor/libgit2/src/refs.h
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#define INCLUDE_refs_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
|
+
|
|
11
12
|
#include "git2/oid.h"
|
|
12
13
|
#include "git2/refs.h"
|
|
13
14
|
#include "git2/refdb.h"
|
|
@@ -29,7 +30,7 @@ extern bool git_reference__enable_symbolic_ref_target_validation;
|
|
|
29
30
|
|
|
30
31
|
#define GIT_SYMREF "ref: "
|
|
31
32
|
#define GIT_PACKEDREFS_FILE "packed-refs"
|
|
32
|
-
#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled "
|
|
33
|
+
#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled fully-peeled sorted "
|
|
33
34
|
#define GIT_PACKEDREFS_FILE_MODE 0666
|
|
34
35
|
|
|
35
36
|
#define GIT_HEAD_FILE "HEAD"
|