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,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
|
-
|
|
7
|
+
|
|
8
|
+
#include "diff_file.h"
|
|
9
|
+
|
|
8
10
|
#include "git2/blob.h"
|
|
9
11
|
#include "git2/submodule.h"
|
|
10
12
|
#include "diff.h"
|
|
11
13
|
#include "diff_generate.h"
|
|
12
|
-
#include "diff_file.h"
|
|
13
14
|
#include "odb.h"
|
|
14
15
|
#include "fileops.h"
|
|
15
16
|
#include "filter.h"
|
|
@@ -53,7 +54,8 @@ static int diff_file_content_init_common(
|
|
|
53
54
|
fc->src = GIT_ITERATOR_TYPE_TREE;
|
|
54
55
|
|
|
55
56
|
if (!fc->driver &&
|
|
56
|
-
git_diff_driver_lookup(&fc->driver, fc->repo,
|
|
57
|
+
git_diff_driver_lookup(&fc->driver, fc->repo,
|
|
58
|
+
NULL, fc->file->path) < 0)
|
|
57
59
|
return -1;
|
|
58
60
|
|
|
59
61
|
/* give driver a chance to modify options */
|
|
@@ -100,7 +102,8 @@ int git_diff_file_content__init_from_diff(
|
|
|
100
102
|
fc->file = use_old ? &delta->old_file : &delta->new_file;
|
|
101
103
|
fc->src = use_old ? diff->old_src : diff->new_src;
|
|
102
104
|
|
|
103
|
-
if (git_diff_driver_lookup(&fc->driver, fc->repo,
|
|
105
|
+
if (git_diff_driver_lookup(&fc->driver, fc->repo,
|
|
106
|
+
&diff->attrsession, fc->file->path) < 0)
|
|
104
107
|
return -1;
|
|
105
108
|
|
|
106
109
|
switch (delta->status) {
|
|
@@ -4,9 +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
|
-
|
|
8
|
-
#include "diff.h"
|
|
7
|
+
|
|
9
8
|
#include "diff_generate.h"
|
|
9
|
+
|
|
10
|
+
#include "diff.h"
|
|
10
11
|
#include "patch_generate.h"
|
|
11
12
|
#include "fileops.h"
|
|
12
13
|
#include "config.h"
|
|
@@ -388,6 +389,7 @@ static void diff_generated_free(git_diff *d)
|
|
|
388
389
|
{
|
|
389
390
|
git_diff_generated *diff = (git_diff_generated *)d;
|
|
390
391
|
|
|
392
|
+
git_attr_session__free(&diff->base.attrsession);
|
|
391
393
|
git_vector_free_deep(&diff->base.deltas);
|
|
392
394
|
|
|
393
395
|
git_pathspec__vfree(&diff->pathspec);
|
|
@@ -410,13 +412,14 @@ static git_diff_generated *diff_generated_alloc(
|
|
|
410
412
|
if ((diff = git__calloc(1, sizeof(git_diff_generated))) == NULL)
|
|
411
413
|
return NULL;
|
|
412
414
|
|
|
413
|
-
GIT_REFCOUNT_INC(diff);
|
|
415
|
+
GIT_REFCOUNT_INC(&diff->base);
|
|
414
416
|
diff->base.type = GIT_DIFF_TYPE_GENERATED;
|
|
415
417
|
diff->base.repo = repo;
|
|
416
418
|
diff->base.old_src = old_iter->type;
|
|
417
419
|
diff->base.new_src = new_iter->type;
|
|
418
420
|
diff->base.patch_fn = git_patch_generated_from_diff;
|
|
419
421
|
diff->base.free_fn = diff_generated_free;
|
|
422
|
+
git_attr_session__init(&diff->base.attrsession, repo);
|
|
420
423
|
memcpy(&diff->base.opts, &dflt, sizeof(git_diff_options));
|
|
421
424
|
|
|
422
425
|
git_pool_init(&diff->base.pool, 1);
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
#ifndef INCLUDE_diff_generate_h__
|
|
8
8
|
#define INCLUDE_diff_generate_h__
|
|
9
9
|
|
|
10
|
+
#include "common.h"
|
|
11
|
+
|
|
12
|
+
#include "diff.h"
|
|
13
|
+
#include "pool.h"
|
|
14
|
+
#include "index.h"
|
|
15
|
+
|
|
10
16
|
enum {
|
|
11
17
|
GIT_DIFFCAPS_HAS_SYMLINKS = (1 << 0), /* symlinks on platform? */
|
|
12
18
|
GIT_DIFFCAPS_IGNORE_STAT = (1 << 1), /* use stat? */
|
|
@@ -120,4 +126,3 @@ GIT_INLINE(int) git_diff_file__resolve_zero_size(
|
|
|
120
126
|
}
|
|
121
127
|
|
|
122
128
|
#endif
|
|
123
|
-
|
|
@@ -4,9 +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
|
-
|
|
8
|
-
#include "diff.h"
|
|
7
|
+
|
|
9
8
|
#include "diff_parse.h"
|
|
9
|
+
|
|
10
|
+
#include "diff.h"
|
|
10
11
|
#include "patch.h"
|
|
11
12
|
#include "patch_parse.h"
|
|
12
13
|
|
|
@@ -35,7 +36,7 @@ static git_diff_parsed *diff_parsed_alloc(void)
|
|
|
35
36
|
if ((diff = git__calloc(1, sizeof(git_diff_parsed))) == NULL)
|
|
36
37
|
return NULL;
|
|
37
38
|
|
|
38
|
-
GIT_REFCOUNT_INC(diff);
|
|
39
|
+
GIT_REFCOUNT_INC(&diff->base);
|
|
39
40
|
diff->base.type = GIT_DIFF_TYPE_PARSED;
|
|
40
41
|
diff->base.strcomp = git__strcmp;
|
|
41
42
|
diff->base.strncomp = git__strncmp;
|
|
@@ -82,7 +83,7 @@ int git_diff_from_buffer(
|
|
|
82
83
|
ctx = git_patch_parse_ctx_init(content, content_len, NULL);
|
|
83
84
|
GITERR_CHECK_ALLOC(ctx);
|
|
84
85
|
|
|
85
|
-
while (ctx->remain_len) {
|
|
86
|
+
while (ctx->parse_ctx.remain_len) {
|
|
86
87
|
if ((error = git_patch_parse(&patch, ctx)) < 0)
|
|
87
88
|
break;
|
|
88
89
|
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
#ifndef INCLUDE_diff_tform_h__
|
|
8
8
|
#define INCLUDE_diff_tform_h__
|
|
9
9
|
|
|
10
|
+
#include "common.h"
|
|
11
|
+
|
|
12
|
+
#include "diff_file.h"
|
|
13
|
+
|
|
10
14
|
extern int git_diff_find_similar__hashsig_for_file(
|
|
11
15
|
void **out, const git_diff_file *f, const char *path, void *p);
|
|
12
16
|
|
|
@@ -19,4 +23,3 @@ extern int git_diff_find_similar__calc_similarity(
|
|
|
19
23
|
int *score, void *siga, void *sigb, void *payload);
|
|
20
24
|
|
|
21
25
|
#endif
|
|
22
|
-
|
|
@@ -4,11 +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
|
+
|
|
8
|
+
#include "diff_xdiff.h"
|
|
9
|
+
|
|
7
10
|
#include "git2/errors.h"
|
|
8
|
-
#include "common.h"
|
|
9
11
|
#include "diff.h"
|
|
10
12
|
#include "diff_driver.h"
|
|
11
|
-
#include "diff_xdiff.h"
|
|
12
13
|
#include "patch_generate.h"
|
|
13
14
|
|
|
14
15
|
static int git_xdiff_scan_int(const char **str, int *value)
|
|
@@ -238,6 +239,8 @@ void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts)
|
|
|
238
239
|
xo->params.flags |= XDF_IGNORE_WHITESPACE_CHANGE;
|
|
239
240
|
if (flags & GIT_DIFF_IGNORE_WHITESPACE_EOL)
|
|
240
241
|
xo->params.flags |= XDF_IGNORE_WHITESPACE_AT_EOL;
|
|
242
|
+
if (flags & GIT_DIFF_INDENT_HEURISTIC)
|
|
243
|
+
xo->params.flags |= XDF_INDENT_HEURISTIC;
|
|
241
244
|
|
|
242
245
|
if (flags & GIT_DIFF_PATIENCE)
|
|
243
246
|
xo->params.flags |= XDF_PATIENCE_DIFF;
|
data/vendor/libgit2/src/errors.c
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#ifndef INCLUDE_features_h__
|
|
2
|
+
#define INCLUDE_features_h__
|
|
3
|
+
|
|
4
|
+
#cmakedefine GIT_DEBUG_POOL 1
|
|
5
|
+
#cmakedefine GIT_TRACE 1
|
|
6
|
+
#cmakedefine GIT_THREADS 1
|
|
7
|
+
#cmakedefine GIT_MSVC_CRTDBG 1
|
|
8
|
+
|
|
9
|
+
#cmakedefine GIT_ARCH_64 1
|
|
10
|
+
#cmakedefine GIT_ARCH_32 1
|
|
11
|
+
|
|
12
|
+
#cmakedefine GIT_USE_ICONV 1
|
|
13
|
+
#cmakedefine GIT_USE_NSEC 1
|
|
14
|
+
#cmakedefine GIT_USE_STAT_MTIM 1
|
|
15
|
+
#cmakedefine GIT_USE_STAT_MTIMESPEC 1
|
|
16
|
+
#cmakedefine GIT_USE_STAT_MTIME_NSEC 1
|
|
17
|
+
#cmakedefine GIT_USE_FUTIMENS 1
|
|
18
|
+
#cmakedefine GIT_USE_REGCOMP_L 1
|
|
19
|
+
|
|
20
|
+
#cmakedefine GIT_SSH 1
|
|
21
|
+
#cmakedefine GIT_SSH_MEMORY_CREDENTIALS 1
|
|
22
|
+
|
|
23
|
+
#cmakedefine GIT_GSSAPI 1
|
|
24
|
+
#cmakedefine GIT_WINHTTP 1
|
|
25
|
+
#cmakedefine GIT_CURL 1
|
|
26
|
+
|
|
27
|
+
#cmakedefine GIT_HTTPS 1
|
|
28
|
+
#cmakedefine GIT_OPENSSL 1
|
|
29
|
+
#cmakedefine GIT_SECURE_TRANSPORT 1
|
|
30
|
+
|
|
31
|
+
#cmakedefine GIT_SHA1_COLLISIONDETECT 1
|
|
32
|
+
#cmakedefine GIT_SHA1_WIN32 1
|
|
33
|
+
#cmakedefine GIT_SHA1_COMMON_CRYPTO 1
|
|
34
|
+
#cmakedefine GIT_SHA1_OPENSSL 1
|
|
35
|
+
|
|
36
|
+
#endif
|
data/vendor/libgit2/src/fetch.c
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "fetch.h"
|
|
9
|
+
|
|
8
10
|
#include "git2/oid.h"
|
|
9
11
|
#include "git2/refs.h"
|
|
10
12
|
#include "git2/revwalk.h"
|
|
11
13
|
#include "git2/transport.h"
|
|
12
14
|
|
|
13
|
-
#include "common.h"
|
|
14
15
|
#include "remote.h"
|
|
15
16
|
#include "refspec.h"
|
|
16
17
|
#include "pack.h"
|
|
17
|
-
#include "fetch.h"
|
|
18
18
|
#include "netops.h"
|
|
19
19
|
#include "repository.h"
|
|
20
20
|
#include "refs.h"
|
data/vendor/libgit2/src/fetch.h
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "fetchhead.h"
|
|
9
|
+
|
|
8
10
|
#include "git2/types.h"
|
|
9
11
|
#include "git2/oid.h"
|
|
10
12
|
|
|
11
|
-
#include "fetchhead.h"
|
|
12
|
-
#include "common.h"
|
|
13
13
|
#include "buffer.h"
|
|
14
14
|
#include "fileops.h"
|
|
15
15
|
#include "filebuf.h"
|
|
@@ -118,7 +118,7 @@ int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs)
|
|
|
118
118
|
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0)
|
|
119
119
|
return -1;
|
|
120
120
|
|
|
121
|
-
if (git_filebuf_open(&file, path.ptr,
|
|
121
|
+
if (git_filebuf_open(&file, path.ptr, GIT_FILEBUF_APPEND, GIT_REFS_FILE_MODE) < 0) {
|
|
122
122
|
git_buf_free(&path);
|
|
123
123
|
return -1;
|
|
124
124
|
}
|
|
@@ -4,8 +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
|
-
|
|
7
|
+
|
|
8
8
|
#include "filebuf.h"
|
|
9
|
+
|
|
9
10
|
#include "fileops.h"
|
|
10
11
|
|
|
11
12
|
static const size_t WRITE_BUFFER_SIZE = (4096 * 2);
|
|
@@ -4,8 +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
|
-
|
|
7
|
+
|
|
8
8
|
#include "fileops.h"
|
|
9
|
+
|
|
9
10
|
#include "global.h"
|
|
10
11
|
#include "strmap.h"
|
|
11
12
|
#include <ctype.h>
|
|
@@ -101,6 +102,16 @@ int git_futils_open_ro(const char *path)
|
|
|
101
102
|
return fd;
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
int git_futils_truncate(const char *path, int mode)
|
|
106
|
+
{
|
|
107
|
+
int fd = p_open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
|
|
108
|
+
if (fd < 0)
|
|
109
|
+
return git_path_set_error(errno, path, "open");
|
|
110
|
+
|
|
111
|
+
close(fd);
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
104
115
|
git_off_t git_futils_filesize(git_file fd)
|
|
105
116
|
{
|
|
106
117
|
struct stat sb;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#define INCLUDE_fileops_h__
|
|
9
9
|
|
|
10
10
|
#include "common.h"
|
|
11
|
+
|
|
11
12
|
#include "map.h"
|
|
12
13
|
#include "posix.h"
|
|
13
14
|
#include "path.h"
|
|
@@ -246,6 +247,11 @@ extern int git_futils_cp_r(
|
|
|
246
247
|
*/
|
|
247
248
|
extern int git_futils_open_ro(const char *path);
|
|
248
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Truncate a file, creating it if it doesn't exist.
|
|
252
|
+
*/
|
|
253
|
+
extern int git_futils_truncate(const char *path, int mode);
|
|
254
|
+
|
|
249
255
|
/**
|
|
250
256
|
* Get the filesize in bytes of a file
|
|
251
257
|
*/
|
|
@@ -381,4 +387,4 @@ extern int git_futils_fsync_dir(const char *path);
|
|
|
381
387
|
*/
|
|
382
388
|
extern int git_futils_fsync_parent(const char *path);
|
|
383
389
|
|
|
384
|
-
#endif
|
|
390
|
+
#endif
|
data/vendor/libgit2/src/filter.c
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* a Linking Exception. For full terms see the included COPYING file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include "filter.h"
|
|
9
|
+
|
|
8
10
|
#include "common.h"
|
|
9
11
|
#include "fileops.h"
|
|
10
12
|
#include "hash.h"
|
|
11
|
-
#include "filter.h"
|
|
12
13
|
#include "repository.h"
|
|
13
14
|
#include "global.h"
|
|
14
15
|
#include "git2/sys/filter.h"
|
data/vendor/libgit2/src/filter.h
CHANGED