rugged 0.17.0b2 → 0.17.0.b6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +10 -11
- data/ext/rugged/extconf.rb +5 -13
- data/ext/rugged/rugged_commit.c +2 -5
- data/ext/rugged/rugged_reference.c +29 -28
- data/ext/rugged/rugged_remote.c +1 -1
- data/ext/rugged/rugged_repo.c +4 -1
- data/ext/rugged/rugged_tree.c +20 -19
- data/lib/rugged/commit.rb +5 -1
- data/lib/rugged/repository.rb +6 -4
- data/lib/rugged/version.rb +1 -1
- data/test/config_test.rb +1 -1
- data/test/index_test.rb +4 -2
- data/test/object_test.rb +3 -3
- data/test/reference_test.rb +66 -1
- data/test/repo_test.rb +4 -4
- data/test/tree_test.rb +1 -1
- data/test/walker_test.rb +1 -1
- data/vendor/libgit2/Makefile.embed +42 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/http-parser/http_parser.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/http-parser/http_parser.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/config.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regcomp.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex_internal.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex_internal.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regexec.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/adler32.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/crc32.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/crc32.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/deflate.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/deflate.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffast.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffast.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffixed.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inflate.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inflate.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inftrees.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inftrees.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/trees.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/trees.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zconf.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zlib.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zutil.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zutil.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2.h +6 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/attr.h +35 -20
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/blob.h +1 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/branch.h +62 -24
- data/vendor/libgit2/include/git2/checkout.h +66 -0
- data/vendor/libgit2/include/git2/clone.h +59 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/commit.h +22 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/common.h +27 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/config.h +22 -4
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/diff.h +20 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/errors.h +2 -37
- data/vendor/libgit2/include/git2/ignore.h +74 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/index.h +37 -5
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/indexer.h +2 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/inttypes.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/merge.h +10 -0
- data/vendor/libgit2/include/git2/message.h +43 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/net.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/notes.h +24 -20
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/object.h +18 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/odb.h +16 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/odb_backend.h +8 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/oid.h +26 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/reflog.h +39 -9
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/refs.h +55 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/refspec.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/remote.h +68 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/repository.h +39 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/reset.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/revparse.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/revwalk.h +2 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/signature.h +3 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/status.h +5 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/stdint.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/submodule.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/tag.h +3 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/threads.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/tree.h +77 -20
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/types.h +14 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/version.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/windows.h +0 -0
- data/vendor/libgit2/src/amiga/map.c +51 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr.c +39 -6
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr.h +1 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr_file.c +2 -16
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr_file.h +4 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/blob.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/blob.h +0 -0
- data/vendor/libgit2/src/branch.c +294 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/bswap.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/buffer.c +40 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/buffer.h +22 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cache.c +1 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cache.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cc-compat.h +0 -0
- data/vendor/libgit2/src/checkout.c +230 -0
- data/vendor/libgit2/src/clone.c +254 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/commit.c +42 -16
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/commit.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/common.h +3 -9
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/compat/fnmatch.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/compat/fnmatch.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config.c +15 -5
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_cache.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_file.c +86 -19
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_file.h +16 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/crlf.c +92 -4
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/date.c +20 -20
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/delta-apply.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/delta-apply.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff.c +45 -18
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff_output.c +63 -46
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/errors.c +0 -0
- data/vendor/libgit2/src/fetch.c +380 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fetch.h +1 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filebuf.c +7 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filebuf.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fileops.c +16 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fileops.h +10 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filter.c +38 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filter.h +15 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/global.c +5 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/global.h +2 -6
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/hash.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/hash.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ignore.c +50 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ignore.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/index.c +95 -28
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/index.h +5 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/indexer.c +27 -25
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/iterator.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/iterator.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/khash.h +6 -4
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/map.h +4 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/message.c +27 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/message.h +2 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/mwindow.c +54 -10
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/mwindow.h +1 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/netops.c +48 -38
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/netops.h +7 -4
- data/vendor/libgit2/src/notes.c +610 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/notes.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/object.c +73 -2
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb.c +20 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb_loose.c +89 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb_pack.c +61 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/oid.c +1 -6
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/oidmap.h +1 -6
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pack.c +49 -4
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pack.h +5 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/path.c +144 -21
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/path.h +46 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pkt.c +30 -8
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pkt.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pool.c +7 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pool.h +7 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/posix.c +92 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/posix.h +36 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ppc/sha1.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ppc/sha1.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pqueue.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pqueue.h +0 -0
- data/vendor/libgit2/src/protocol.c +88 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/protocol.h +3 -9
- data/vendor/libgit2/src/reflog.c +489 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/reflog.h +3 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refs.c +95 -52
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refs.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refspec.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refspec.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/remote.c +130 -8
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/remote.h +6 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/repository.c +167 -42
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/repository.h +7 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/reset.c +1 -1
- data/vendor/libgit2/src/revparse.c +830 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/revwalk.c +83 -15
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1.h +5 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1_lookup.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1_lookup.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/signature.c +19 -5
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/signature.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/status.c +24 -18
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/strmap.h +1 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/submodule.c +3 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tag.c +2 -9
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tag.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/thread-utils.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/thread-utils.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transport.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transport.h +13 -9
- data/vendor/libgit2/src/transports/git.c +245 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transports/http.c +93 -336
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transports/local.c +35 -32
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree-cache.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree-cache.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree.c +214 -124
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree.h +7 -3
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tsort.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/unix/map.c +2 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/unix/posix.h +2 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/util.c +30 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/util.h +13 -6
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/vector.c +1 -1
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/vector.h +5 -5
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/dir.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/dir.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/map.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/mingw-compat.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/msvc-compat.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/posix.h +1 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/posix_w32.c +17 -1
- data/vendor/libgit2/src/win32/precompiled.c +1 -0
- data/vendor/libgit2/src/win32/precompiled.h +19 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/pthread.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/pthread.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/utf-conv.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/utf-conv.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiff.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiffi.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiffi.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xemit.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xemit.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xhistogram.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xinclude.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xmacros.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xmerge.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xpatience.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xprepare.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xprepare.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xtypes.h +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xutils.c +0 -0
- data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xutils.h +0 -0
- metadata +265 -348
- data/ext/rugged/vendor/libgit2-dist.tar.gz +0 -0
- data/ext/rugged/vendor/libgit2-dist/examples/diff.c +0 -238
- data/ext/rugged/vendor/libgit2-dist/examples/general.c +0 -451
- data/ext/rugged/vendor/libgit2-dist/examples/network/common.h +0 -14
- data/ext/rugged/vendor/libgit2-dist/examples/network/fetch.c +0 -113
- data/ext/rugged/vendor/libgit2-dist/examples/network/git2.c +0 -62
- data/ext/rugged/vendor/libgit2-dist/examples/network/index-pack.c +0 -102
- data/ext/rugged/vendor/libgit2-dist/examples/network/ls-remote.c +0 -76
- data/ext/rugged/vendor/libgit2-dist/examples/showindex.c +0 -43
- data/ext/rugged/vendor/libgit2-dist/src/branch.c +0 -208
- data/ext/rugged/vendor/libgit2-dist/src/branch.h +0 -17
- data/ext/rugged/vendor/libgit2-dist/src/fetch.c +0 -200
- data/ext/rugged/vendor/libgit2-dist/src/notes.c +0 -548
- data/ext/rugged/vendor/libgit2-dist/src/protocol.c +0 -58
- data/ext/rugged/vendor/libgit2-dist/src/reflog.c +0 -340
- data/ext/rugged/vendor/libgit2-dist/src/revparse.c +0 -748
- data/ext/rugged/vendor/libgit2-dist/src/transports/git.c +0 -477
- data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/attr_expect.h +0 -43
- data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/file.c +0 -226
- data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/flags.c +0 -108
- data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/lookup.c +0 -262
- data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/repo.c +0 -273
- data/ext/rugged/vendor/libgit2-dist/tests-clar/buf/basic.c +0 -29
- data/ext/rugged/vendor/libgit2-dist/tests-clar/clar_helpers.c +0 -181
- data/ext/rugged/vendor/libgit2-dist/tests-clar/clar_libgit2.h +0 -55
- data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/commit.c +0 -44
- data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/parse.c +0 -350
- data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/signature.c +0 -65
- data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/write.c +0 -140
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/add.c +0 -37
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/multivar.c +0 -151
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/new.c +0 -36
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/read.c +0 -221
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/stress.c +0 -61
- data/ext/rugged/vendor/libgit2-dist/tests-clar/config/write.c +0 -92
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/buffer.c +0 -613
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/dirent.c +0 -235
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/env.c +0 -115
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/errors.c +0 -60
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/filebuf.c +0 -92
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/hex.c +0 -22
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/oid.c +0 -18
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/path.c +0 -420
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/pool.c +0 -85
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/rmdir.c +0 -68
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/string.c +0 -28
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/strmap.c +0 -102
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/strtol.c +0 -37
- data/ext/rugged/vendor/libgit2-dist/tests-clar/core/vector.c +0 -191
- data/ext/rugged/vendor/libgit2-dist/tests-clar/date/date.c +0 -15
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/blob.c +0 -254
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/diff_helpers.c +0 -104
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/diff_helpers.h +0 -47
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/index.c +0 -92
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/iterator.c +0 -572
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/patch.c +0 -99
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/tree.c +0 -210
- data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/workdir.c +0 -543
- data/ext/rugged/vendor/libgit2-dist/tests-clar/index/read_tree.c +0 -46
- data/ext/rugged/vendor/libgit2-dist/tests-clar/index/rename.c +0 -50
- data/ext/rugged/vendor/libgit2-dist/tests-clar/index/tests.c +0 -246
- data/ext/rugged/vendor/libgit2-dist/tests-clar/network/createremotethenload.c +0 -33
- data/ext/rugged/vendor/libgit2-dist/tests-clar/network/remotelocal.c +0 -137
- data/ext/rugged/vendor/libgit2-dist/tests-clar/network/remotes.c +0 -183
- data/ext/rugged/vendor/libgit2-dist/tests-clar/notes/notes.c +0 -133
- data/ext/rugged/vendor/libgit2-dist/tests-clar/notes/notesref.c +0 -57
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/filter.c +0 -125
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/fromchunks.c +0 -87
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/write.c +0 -69
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/commit/commitstagedfile.c +0 -126
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/lookup.c +0 -63
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/message.c +0 -171
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/chars.c +0 -41
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/compare.c +0 -124
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/convert.c +0 -75
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/data.h +0 -323
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/fromstr.c +0 -30
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/hash.c +0 -166
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/short.c +0 -94
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/size.c +0 -13
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/type2string.c +0 -54
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/write.c +0 -455
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/peel.c +0 -56
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/read.c +0 -130
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/write.c +0 -192
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/frompath.c +0 -81
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/read.c +0 -75
- data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/write.c +0 -84
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/loose.c +0 -84
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/loose_data.h +0 -522
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/mixed.c +0 -24
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/pack_data.h +0 -151
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/packed.c +0 -78
- data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/sorting.c +0 -71
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/create.c +0 -113
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/delete.c +0 -91
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/listall.c +0 -78
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/move.c +0 -72
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/crashes.c +0 -17
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/create.c +0 -149
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/delete.c +0 -85
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/list.c +0 -53
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/listall.c +0 -36
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/lookup.c +0 -42
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/normalize.c +0 -200
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/overwrite.c +0 -136
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/pack.c +0 -67
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/read.c +0 -194
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/reflog.c +0 -123
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/rename.c +0 -339
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/revparse.c +0 -174
- data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/unicode.c +0 -42
- data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/discover.c +0 -142
- data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/getters.c +0 -86
- data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/init.c +0 -249
- data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/open.c +0 -282
- data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/setters.c +0 -80
- data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/mixed.c +0 -47
- data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/reset_helpers.c +0 -10
- data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/reset_helpers.h +0 -6
- data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/soft.c +0 -102
- data/ext/rugged/vendor/libgit2-dist/tests-clar/revwalk/basic.c +0 -181
- data/ext/rugged/vendor/libgit2-dist/tests-clar/revwalk/mergebase.c +0 -148
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/ignore.c +0 -147
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/single.c +0 -29
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_data.h +0 -202
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_helpers.c +0 -49
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_helpers.h +0 -33
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/submodules.c +0 -112
- data/ext/rugged/vendor/libgit2-dist/tests-clar/status/worktree.c +0 -649
- data/ext/rugged/vendor/libgit2-dist/tests-clar/threads/basic.c +0 -20
@@ -1,41 +0,0 @@
|
|
1
|
-
|
2
|
-
#include "clar_libgit2.h"
|
3
|
-
|
4
|
-
#include "odb.h"
|
5
|
-
|
6
|
-
void test_object_raw_chars__find_invalid_chars_in_oid(void)
|
7
|
-
{
|
8
|
-
git_oid out;
|
9
|
-
unsigned char exp[] = {
|
10
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
11
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
12
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
13
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
14
|
-
};
|
15
|
-
char in[41] = "16a67770b7d8d72317c4b775213c23a8bd74f5e0";
|
16
|
-
unsigned int i;
|
17
|
-
|
18
|
-
for (i = 0; i < 256; i++) {
|
19
|
-
in[38] = (char)i;
|
20
|
-
if (git__fromhex(i) >= 0) {
|
21
|
-
exp[19] = (unsigned char)(git__fromhex(i) << 4);
|
22
|
-
cl_git_pass(git_oid_fromstr(&out, in));
|
23
|
-
cl_assert(memcmp(out.id, exp, sizeof(out.id)) == 0);
|
24
|
-
} else {
|
25
|
-
cl_git_fail(git_oid_fromstr(&out, in));
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
void test_object_raw_chars__build_valid_oid_from_raw_bytes(void)
|
31
|
-
{
|
32
|
-
git_oid out;
|
33
|
-
unsigned char exp[] = {
|
34
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
35
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
36
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
37
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
38
|
-
};
|
39
|
-
git_oid_fromraw(&out, exp);
|
40
|
-
cl_git_pass(memcmp(out.id, exp, sizeof(out.id)));
|
41
|
-
}
|
@@ -1,124 +0,0 @@
|
|
1
|
-
|
2
|
-
#include "clar_libgit2.h"
|
3
|
-
|
4
|
-
#include "odb.h"
|
5
|
-
|
6
|
-
void test_object_raw_compare__succeed_on_copy_oid(void)
|
7
|
-
{
|
8
|
-
git_oid a, b;
|
9
|
-
unsigned char exp[] = {
|
10
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
11
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
12
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
13
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
14
|
-
};
|
15
|
-
memset(&b, 0, sizeof(b));
|
16
|
-
git_oid_fromraw(&a, exp);
|
17
|
-
git_oid_cpy(&b, &a);
|
18
|
-
cl_git_pass(memcmp(a.id, exp, sizeof(a.id)));
|
19
|
-
}
|
20
|
-
|
21
|
-
void test_object_raw_compare__succeed_on_oid_comparison_lesser(void)
|
22
|
-
{
|
23
|
-
git_oid a, b;
|
24
|
-
unsigned char a_in[] = {
|
25
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
26
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
27
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
28
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
29
|
-
};
|
30
|
-
unsigned char b_in[] = {
|
31
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
32
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
33
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
34
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xf0,
|
35
|
-
};
|
36
|
-
git_oid_fromraw(&a, a_in);
|
37
|
-
git_oid_fromraw(&b, b_in);
|
38
|
-
cl_assert(git_oid_cmp(&a, &b) < 0);
|
39
|
-
}
|
40
|
-
|
41
|
-
void test_object_raw_compare__succeed_on_oid_comparison_equal(void)
|
42
|
-
{
|
43
|
-
git_oid a, b;
|
44
|
-
unsigned char a_in[] = {
|
45
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
46
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
47
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
48
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
49
|
-
};
|
50
|
-
git_oid_fromraw(&a, a_in);
|
51
|
-
git_oid_fromraw(&b, a_in);
|
52
|
-
cl_assert(git_oid_cmp(&a, &b) == 0);
|
53
|
-
}
|
54
|
-
|
55
|
-
void test_object_raw_compare__succeed_on_oid_comparison_greater(void)
|
56
|
-
{
|
57
|
-
git_oid a, b;
|
58
|
-
unsigned char a_in[] = {
|
59
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
60
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
61
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
62
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
|
63
|
-
};
|
64
|
-
unsigned char b_in[] = {
|
65
|
-
0x16, 0xa6, 0x77, 0x70, 0xb7,
|
66
|
-
0xd8, 0xd7, 0x23, 0x17, 0xc4,
|
67
|
-
0xb7, 0x75, 0x21, 0x3c, 0x23,
|
68
|
-
0xa8, 0xbd, 0x74, 0xf5, 0xd0,
|
69
|
-
};
|
70
|
-
git_oid_fromraw(&a, a_in);
|
71
|
-
git_oid_fromraw(&b, b_in);
|
72
|
-
cl_assert(git_oid_cmp(&a, &b) > 0);
|
73
|
-
}
|
74
|
-
|
75
|
-
void test_object_raw_compare__compare_fmt_oids(void)
|
76
|
-
{
|
77
|
-
const char *exp = "16a0123456789abcdef4b775213c23a8bd74f5e0";
|
78
|
-
git_oid in;
|
79
|
-
char out[GIT_OID_HEXSZ + 1];
|
80
|
-
|
81
|
-
cl_git_pass(git_oid_fromstr(&in, exp));
|
82
|
-
|
83
|
-
/* Format doesn't touch the last byte */
|
84
|
-
out[GIT_OID_HEXSZ] = 'Z';
|
85
|
-
git_oid_fmt(out, &in);
|
86
|
-
cl_assert(out[GIT_OID_HEXSZ] == 'Z');
|
87
|
-
|
88
|
-
/* Format produced the right result */
|
89
|
-
out[GIT_OID_HEXSZ] = '\0';
|
90
|
-
cl_assert_equal_s(exp, out);
|
91
|
-
}
|
92
|
-
|
93
|
-
void test_object_raw_compare__compare_allocfmt_oids(void)
|
94
|
-
{
|
95
|
-
const char *exp = "16a0123456789abcdef4b775213c23a8bd74f5e0";
|
96
|
-
git_oid in;
|
97
|
-
char *out;
|
98
|
-
|
99
|
-
cl_git_pass(git_oid_fromstr(&in, exp));
|
100
|
-
|
101
|
-
out = git_oid_allocfmt(&in);
|
102
|
-
cl_assert(out);
|
103
|
-
cl_assert_equal_s(exp, out);
|
104
|
-
git__free(out);
|
105
|
-
}
|
106
|
-
|
107
|
-
void test_object_raw_compare__compare_pathfmt_oids(void)
|
108
|
-
{
|
109
|
-
const char *exp1 = "16a0123456789abcdef4b775213c23a8bd74f5e0";
|
110
|
-
const char *exp2 = "16/a0123456789abcdef4b775213c23a8bd74f5e0";
|
111
|
-
git_oid in;
|
112
|
-
char out[GIT_OID_HEXSZ + 2];
|
113
|
-
|
114
|
-
cl_git_pass(git_oid_fromstr(&in, exp1));
|
115
|
-
|
116
|
-
/* Format doesn't touch the last byte */
|
117
|
-
out[GIT_OID_HEXSZ + 1] = 'Z';
|
118
|
-
git_oid_pathfmt(out, &in);
|
119
|
-
cl_assert(out[GIT_OID_HEXSZ + 1] == 'Z');
|
120
|
-
|
121
|
-
/* Format produced the right result */
|
122
|
-
out[GIT_OID_HEXSZ + 1] = '\0';
|
123
|
-
cl_assert_equal_s(exp2, out);
|
124
|
-
}
|
@@ -1,75 +0,0 @@
|
|
1
|
-
|
2
|
-
#include "clar_libgit2.h"
|
3
|
-
|
4
|
-
#include "odb.h"
|
5
|
-
|
6
|
-
void test_object_raw_convert__succeed_on_oid_to_string_conversion(void)
|
7
|
-
{
|
8
|
-
const char *exp = "16a0123456789abcdef4b775213c23a8bd74f5e0";
|
9
|
-
git_oid in;
|
10
|
-
char out[GIT_OID_HEXSZ + 1];
|
11
|
-
char *str;
|
12
|
-
int i;
|
13
|
-
|
14
|
-
cl_git_pass(git_oid_fromstr(&in, exp));
|
15
|
-
|
16
|
-
/* NULL buffer pointer, returns static empty string */
|
17
|
-
str = git_oid_tostr(NULL, sizeof(out), &in);
|
18
|
-
cl_assert(str && *str == '\0' && str != out);
|
19
|
-
|
20
|
-
/* zero buffer size, returns static empty string */
|
21
|
-
str = git_oid_tostr(out, 0, &in);
|
22
|
-
cl_assert(str && *str == '\0' && str != out);
|
23
|
-
|
24
|
-
/* NULL oid pointer, returns static empty string */
|
25
|
-
str = git_oid_tostr(out, sizeof(out), NULL);
|
26
|
-
cl_assert(str && *str == '\0' && str != out);
|
27
|
-
|
28
|
-
/* n == 1, returns out as an empty string */
|
29
|
-
str = git_oid_tostr(out, 1, &in);
|
30
|
-
cl_assert(str && *str == '\0' && str == out);
|
31
|
-
|
32
|
-
for (i = 1; i < GIT_OID_HEXSZ; i++) {
|
33
|
-
out[i+1] = 'Z';
|
34
|
-
str = git_oid_tostr(out, i+1, &in);
|
35
|
-
/* returns out containing c-string */
|
36
|
-
cl_assert(str && str == out);
|
37
|
-
/* must be '\0' terminated */
|
38
|
-
cl_assert(*(str+i) == '\0');
|
39
|
-
/* must not touch bytes past end of string */
|
40
|
-
cl_assert(*(str+(i+1)) == 'Z');
|
41
|
-
/* i == n-1 charaters of string */
|
42
|
-
cl_git_pass(strncmp(exp, out, i));
|
43
|
-
}
|
44
|
-
|
45
|
-
/* returns out as hex formatted c-string */
|
46
|
-
str = git_oid_tostr(out, sizeof(out), &in);
|
47
|
-
cl_assert(str && str == out && *(str+GIT_OID_HEXSZ) == '\0');
|
48
|
-
cl_assert_equal_s(exp, out);
|
49
|
-
}
|
50
|
-
|
51
|
-
void test_object_raw_convert__succeed_on_oid_to_string_conversion_big(void)
|
52
|
-
{
|
53
|
-
const char *exp = "16a0123456789abcdef4b775213c23a8bd74f5e0";
|
54
|
-
git_oid in;
|
55
|
-
char big[GIT_OID_HEXSZ + 1 + 3]; /* note + 4 => big buffer */
|
56
|
-
char *str;
|
57
|
-
|
58
|
-
cl_git_pass(git_oid_fromstr(&in, exp));
|
59
|
-
|
60
|
-
/* place some tail material */
|
61
|
-
big[GIT_OID_HEXSZ+0] = 'W'; /* should be '\0' afterwards */
|
62
|
-
big[GIT_OID_HEXSZ+1] = 'X'; /* should remain untouched */
|
63
|
-
big[GIT_OID_HEXSZ+2] = 'Y'; /* ditto */
|
64
|
-
big[GIT_OID_HEXSZ+3] = 'Z'; /* ditto */
|
65
|
-
|
66
|
-
/* returns big as hex formatted c-string */
|
67
|
-
str = git_oid_tostr(big, sizeof(big), &in);
|
68
|
-
cl_assert(str && str == big && *(str+GIT_OID_HEXSZ) == '\0');
|
69
|
-
cl_assert_equal_s(exp, big);
|
70
|
-
|
71
|
-
/* check tail material is untouched */
|
72
|
-
cl_assert(str && str == big && *(str+GIT_OID_HEXSZ+1) == 'X');
|
73
|
-
cl_assert(str && str == big && *(str+GIT_OID_HEXSZ+2) == 'Y');
|
74
|
-
cl_assert(str && str == big && *(str+GIT_OID_HEXSZ+3) == 'Z');
|
75
|
-
}
|
@@ -1,323 +0,0 @@
|
|
1
|
-
|
2
|
-
/*
|
3
|
-
* Raw data
|
4
|
-
*/
|
5
|
-
static unsigned char commit_data[] = {
|
6
|
-
0x74, 0x72, 0x65, 0x65, 0x20, 0x64, 0x66, 0x66,
|
7
|
-
0x32, 0x64, 0x61, 0x39, 0x30, 0x62, 0x32, 0x35,
|
8
|
-
0x34, 0x65, 0x31, 0x62, 0x65, 0x62, 0x38, 0x38,
|
9
|
-
0x39, 0x64, 0x31, 0x66, 0x31, 0x66, 0x31, 0x32,
|
10
|
-
0x38, 0x38, 0x62, 0x65, 0x31, 0x38, 0x30, 0x33,
|
11
|
-
0x37, 0x38, 0x32, 0x64, 0x66, 0x0a, 0x61, 0x75,
|
12
|
-
0x74, 0x68, 0x6f, 0x72, 0x20, 0x41, 0x20, 0x55,
|
13
|
-
0x20, 0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61,
|
14
|
-
0x75, 0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78,
|
15
|
-
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
|
16
|
-
0x6d, 0x3e, 0x20, 0x31, 0x32, 0x32, 0x37, 0x38,
|
17
|
-
0x31, 0x34, 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30,
|
18
|
-
0x30, 0x30, 0x30, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
|
19
|
-
0x69, 0x74, 0x74, 0x65, 0x72, 0x20, 0x43, 0x20,
|
20
|
-
0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
|
21
|
-
0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
|
22
|
-
0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
|
23
|
-
0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
|
24
|
-
0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
|
25
|
-
0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
|
26
|
-
0x30, 0x0a, 0x0a, 0x41, 0x20, 0x6f, 0x6e, 0x65,
|
27
|
-
0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f,
|
28
|
-
0x6d, 0x6d, 0x69, 0x74, 0x20, 0x73, 0x75, 0x6d,
|
29
|
-
0x6d, 0x61, 0x72, 0x79, 0x0a, 0x0a, 0x54, 0x68,
|
30
|
-
0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6f,
|
31
|
-
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
|
32
|
-
0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x65, 0x73,
|
33
|
-
0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x63, 0x6f,
|
34
|
-
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
|
35
|
-
0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72,
|
36
|
-
0x20, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61,
|
37
|
-
0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20,
|
38
|
-
0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x72, 0x70,
|
39
|
-
0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74,
|
40
|
-
0x68, 0x65, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
41
|
-
0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f,
|
42
|
-
0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79,
|
43
|
-
0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d,
|
44
|
-
0x6d, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x53, 0x69,
|
45
|
-
0x67, 0x6e, 0x65, 0x64, 0x2d, 0x6f, 0x66, 0x2d,
|
46
|
-
0x62, 0x79, 0x3a, 0x20, 0x41, 0x20, 0x55, 0x20,
|
47
|
-
0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61, 0x75,
|
48
|
-
0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78, 0x61,
|
49
|
-
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
|
50
|
-
0x3e, 0x0a,
|
51
|
-
};
|
52
|
-
|
53
|
-
|
54
|
-
static unsigned char tree_data[] = {
|
55
|
-
0x31, 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x6f,
|
56
|
-
0x6e, 0x65, 0x00, 0x8b, 0x13, 0x78, 0x91, 0x79,
|
57
|
-
0x1f, 0xe9, 0x69, 0x27, 0xad, 0x78, 0xe6, 0x4b,
|
58
|
-
0x0a, 0xad, 0x7b, 0xde, 0xd0, 0x8b, 0xdc, 0x31,
|
59
|
-
0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x73, 0x6f,
|
60
|
-
0x6d, 0x65, 0x00, 0xfd, 0x84, 0x30, 0xbc, 0x86,
|
61
|
-
0x4c, 0xfc, 0xd5, 0xf1, 0x0e, 0x55, 0x90, 0xf8,
|
62
|
-
0xa4, 0x47, 0xe0, 0x1b, 0x94, 0x2b, 0xfe, 0x31,
|
63
|
-
0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x74, 0x77,
|
64
|
-
0x6f, 0x00, 0x78, 0x98, 0x19, 0x22, 0x61, 0x3b,
|
65
|
-
0x2a, 0xfb, 0x60, 0x25, 0x04, 0x2f, 0xf6, 0xbd,
|
66
|
-
0x87, 0x8a, 0xc1, 0x99, 0x4e, 0x85, 0x31, 0x30,
|
67
|
-
0x30, 0x36, 0x34, 0x34, 0x20, 0x7a, 0x65, 0x72,
|
68
|
-
0x6f, 0x00, 0xe6, 0x9d, 0xe2, 0x9b, 0xb2, 0xd1,
|
69
|
-
0xd6, 0x43, 0x4b, 0x8b, 0x29, 0xae, 0x77, 0x5a,
|
70
|
-
0xd8, 0xc2, 0xe4, 0x8c, 0x53, 0x91,
|
71
|
-
};
|
72
|
-
|
73
|
-
static unsigned char tag_data[] = {
|
74
|
-
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x33,
|
75
|
-
0x64, 0x37, 0x66, 0x38, 0x61, 0x36, 0x61, 0x66,
|
76
|
-
0x30, 0x37, 0x36, 0x63, 0x38, 0x63, 0x33, 0x66,
|
77
|
-
0x32, 0x30, 0x30, 0x37, 0x31, 0x61, 0x38, 0x39,
|
78
|
-
0x33, 0x35, 0x63, 0x64, 0x62, 0x65, 0x38, 0x32,
|
79
|
-
0x32, 0x38, 0x35, 0x39, 0x34, 0x64, 0x31, 0x0a,
|
80
|
-
0x74, 0x79, 0x70, 0x65, 0x20, 0x63, 0x6f, 0x6d,
|
81
|
-
0x6d, 0x69, 0x74, 0x0a, 0x74, 0x61, 0x67, 0x20,
|
82
|
-
0x76, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x0a, 0x74,
|
83
|
-
0x61, 0x67, 0x67, 0x65, 0x72, 0x20, 0x43, 0x20,
|
84
|
-
0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
|
85
|
-
0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
|
86
|
-
0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
|
87
|
-
0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
|
88
|
-
0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
|
89
|
-
0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
|
90
|
-
0x30, 0x0a, 0x0a, 0x54, 0x68, 0x69, 0x73, 0x20,
|
91
|
-
0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,
|
92
|
-
0x61, 0x67, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
|
93
|
-
0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65,
|
94
|
-
0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x76, 0x30,
|
95
|
-
0x2e, 0x30, 0x2e, 0x31, 0x0a,
|
96
|
-
};
|
97
|
-
|
98
|
-
/*
|
99
|
-
* Dummy data
|
100
|
-
*/
|
101
|
-
static unsigned char zero_data[] = {
|
102
|
-
0x00,
|
103
|
-
};
|
104
|
-
|
105
|
-
static unsigned char one_data[] = {
|
106
|
-
0x0a,
|
107
|
-
};
|
108
|
-
|
109
|
-
static unsigned char two_data[] = {
|
110
|
-
0x61, 0x0a,
|
111
|
-
};
|
112
|
-
|
113
|
-
static unsigned char some_data[] = {
|
114
|
-
0x2f, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x54, 0x68,
|
115
|
-
0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20,
|
116
|
-
0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20,
|
117
|
-
0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
|
118
|
-
0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61,
|
119
|
-
0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74,
|
120
|
-
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x69,
|
121
|
-
0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72,
|
122
|
-
0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0a,
|
123
|
-
0x20, 0x2a, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e,
|
124
|
-
0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
|
125
|
-
0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66,
|
126
|
-
0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
|
127
|
-
0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
|
128
|
-
0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
|
129
|
-
0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c,
|
130
|
-
0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
131
|
-
0x20, 0x32, 0x2c, 0x0a, 0x20, 0x2a, 0x20, 0x61,
|
132
|
-
0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,
|
133
|
-
0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74,
|
134
|
-
0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
|
135
|
-
0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
|
136
|
-
0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
|
137
|
-
0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x2a, 0x0a,
|
138
|
-
0x20, 0x2a, 0x20, 0x49, 0x6e, 0x20, 0x61, 0x64,
|
139
|
-
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
|
140
|
-
0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65,
|
141
|
-
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
142
|
-
0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
|
143
|
-
0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,
|
144
|
-
0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62,
|
145
|
-
0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,
|
146
|
-
0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x20, 0x2a, 0x20,
|
147
|
-
0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68,
|
148
|
-
0x6f, 0x72, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65,
|
149
|
-
0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x6e, 0x6c,
|
150
|
-
0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x70,
|
151
|
-
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
152
|
-
0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6e,
|
153
|
-
0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
|
154
|
-
0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x0a, 0x20,
|
155
|
-
0x2a, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
156
|
-
0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69,
|
157
|
-
0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x69,
|
158
|
-
0x6e, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x62,
|
159
|
-
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
160
|
-
0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x74,
|
161
|
-
0x68, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67,
|
162
|
-
0x72, 0x61, 0x6d, 0x73, 0x2c, 0x0a, 0x20, 0x2a,
|
163
|
-
0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20,
|
164
|
-
0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75,
|
165
|
-
0x74, 0x65, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65,
|
166
|
-
0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61,
|
167
|
-
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69,
|
168
|
-
0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e,
|
169
|
-
0x79, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69,
|
170
|
-
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x2a,
|
171
|
-
0x20, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x20,
|
172
|
-
0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65,
|
173
|
-
0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20,
|
174
|
-
0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
|
175
|
-
0x65, 0x2e, 0x20, 0x20, 0x28, 0x54, 0x68, 0x65,
|
176
|
-
0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
|
177
|
-
0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
|
178
|
-
0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
|
179
|
-
0x20, 0x2a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72,
|
180
|
-
0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20,
|
181
|
-
0x64, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79,
|
182
|
-
0x20, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65,
|
183
|
-
0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63,
|
184
|
-
0x74, 0x73, 0x3b, 0x20, 0x66, 0x6f, 0x72, 0x20,
|
185
|
-
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c,
|
186
|
-
0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x63, 0x6f,
|
187
|
-
0x76, 0x65, 0x72, 0x0a, 0x20, 0x2a, 0x20, 0x6d,
|
188
|
-
0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
|
189
|
-
0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74,
|
190
|
-
0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c,
|
191
|
-
0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x73,
|
192
|
-
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f,
|
193
|
-
0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6e,
|
194
|
-
0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x65,
|
195
|
-
0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x0a, 0x20,
|
196
|
-
0x2a, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,
|
197
|
-
0x69, 0x6e, 0x65, 0x64, 0x20, 0x65, 0x78, 0x65,
|
198
|
-
0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e,
|
199
|
-
0x29, 0x0a, 0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20,
|
200
|
-
0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
|
201
|
-
0x65, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73,
|
202
|
-
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
|
203
|
-
0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
|
204
|
-
0x68, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x68, 0x61,
|
205
|
-
0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c,
|
206
|
-
0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65,
|
207
|
-
0x66, 0x75, 0x6c, 0x2c, 0x20, 0x62, 0x75, 0x74,
|
208
|
-
0x0a, 0x20, 0x2a, 0x20, 0x57, 0x49, 0x54, 0x48,
|
209
|
-
0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e, 0x59, 0x20,
|
210
|
-
0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59,
|
211
|
-
0x3b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75,
|
212
|
-
0x74, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74,
|
213
|
-
0x68, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69,
|
214
|
-
0x65, 0x64, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61,
|
215
|
-
0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x0a, 0x20,
|
216
|
-
0x2a, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41,
|
217
|
-
0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
|
218
|
-
0x59, 0x20, 0x6f, 0x72, 0x20, 0x46, 0x49, 0x54,
|
219
|
-
0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52,
|
220
|
-
0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49,
|
221
|
-
0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55,
|
222
|
-
0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e, 0x20, 0x20,
|
223
|
-
0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
|
224
|
-
0x47, 0x4e, 0x55, 0x0a, 0x20, 0x2a, 0x20, 0x47,
|
225
|
-
0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,
|
226
|
-
0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69,
|
227
|
-
0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f,
|
228
|
-
0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x64,
|
229
|
-
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x0a,
|
230
|
-
0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x59, 0x6f,
|
231
|
-
0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64,
|
232
|
-
0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65,
|
233
|
-
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x61,
|
234
|
-
0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
|
235
|
-
0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
|
236
|
-
0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
|
237
|
-
0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
|
238
|
-
0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
|
239
|
-
0x20, 0x2a, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67,
|
240
|
-
0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
|
241
|
-
0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,
|
242
|
-
0x61, 0x6d, 0x3b, 0x20, 0x73, 0x65, 0x65, 0x20,
|
243
|
-
0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65,
|
244
|
-
0x20, 0x43, 0x4f, 0x50, 0x59, 0x49, 0x4e, 0x47,
|
245
|
-
0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f,
|
246
|
-
0x74, 0x2c, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65,
|
247
|
-
0x20, 0x74, 0x6f, 0x0a, 0x20, 0x2a, 0x20, 0x74,
|
248
|
-
0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
|
249
|
-
0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
|
250
|
-
0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
|
251
|
-
0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x35, 0x31, 0x20,
|
252
|
-
0x46, 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e,
|
253
|
-
0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x2c,
|
254
|
-
0x20, 0x46, 0x69, 0x66, 0x74, 0x68, 0x20, 0x46,
|
255
|
-
0x6c, 0x6f, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x2a,
|
256
|
-
0x20, 0x42, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2c,
|
257
|
-
0x20, 0x4d, 0x41, 0x20, 0x30, 0x32, 0x31, 0x31,
|
258
|
-
0x30, 0x2d, 0x31, 0x33, 0x30, 0x31, 0x2c, 0x20,
|
259
|
-
0x55, 0x53, 0x41, 0x2e, 0x0a, 0x20, 0x2a, 0x2f,
|
260
|
-
0x0a,
|
261
|
-
};
|
262
|
-
|
263
|
-
/*
|
264
|
-
* SHA1 Hashes
|
265
|
-
*/
|
266
|
-
static char *commit_id = "3d7f8a6af076c8c3f20071a8935cdbe8228594d1";
|
267
|
-
static char *tree_id = "dff2da90b254e1beb889d1f1f1288be1803782df";
|
268
|
-
static char *tag_id = "09d373e1dfdc16b129ceec6dd649739911541e05";
|
269
|
-
static char *zero_id = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";
|
270
|
-
static char *one_id = "8b137891791fe96927ad78e64b0aad7bded08bdc";
|
271
|
-
static char *two_id = "78981922613b2afb6025042ff6bd878ac1994e85";
|
272
|
-
static char *some_id = "fd8430bc864cfcd5f10e5590f8a447e01b942bfe";
|
273
|
-
|
274
|
-
/*
|
275
|
-
* In-memory objects
|
276
|
-
*/
|
277
|
-
static git_rawobj tree_obj = {
|
278
|
-
tree_data,
|
279
|
-
sizeof(tree_data),
|
280
|
-
GIT_OBJ_TREE
|
281
|
-
};
|
282
|
-
|
283
|
-
static git_rawobj tag_obj = {
|
284
|
-
tag_data,
|
285
|
-
sizeof(tag_data),
|
286
|
-
GIT_OBJ_TAG
|
287
|
-
};
|
288
|
-
|
289
|
-
static git_rawobj zero_obj = {
|
290
|
-
zero_data,
|
291
|
-
0,
|
292
|
-
GIT_OBJ_BLOB
|
293
|
-
};
|
294
|
-
|
295
|
-
static git_rawobj one_obj = {
|
296
|
-
one_data,
|
297
|
-
sizeof(one_data),
|
298
|
-
GIT_OBJ_BLOB
|
299
|
-
};
|
300
|
-
|
301
|
-
static git_rawobj two_obj = {
|
302
|
-
two_data,
|
303
|
-
sizeof(two_data),
|
304
|
-
GIT_OBJ_BLOB
|
305
|
-
};
|
306
|
-
|
307
|
-
static git_rawobj commit_obj = {
|
308
|
-
commit_data,
|
309
|
-
sizeof(commit_data),
|
310
|
-
GIT_OBJ_COMMIT
|
311
|
-
};
|
312
|
-
|
313
|
-
static git_rawobj some_obj = {
|
314
|
-
some_data,
|
315
|
-
sizeof(some_data),
|
316
|
-
GIT_OBJ_BLOB
|
317
|
-
};
|
318
|
-
|
319
|
-
static git_rawobj junk_obj = {
|
320
|
-
NULL,
|
321
|
-
0,
|
322
|
-
GIT_OBJ_BAD
|
323
|
-
};
|