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.
Files changed (374) hide show
  1. data/Rakefile +10 -11
  2. data/ext/rugged/extconf.rb +5 -13
  3. data/ext/rugged/rugged_commit.c +2 -5
  4. data/ext/rugged/rugged_reference.c +29 -28
  5. data/ext/rugged/rugged_remote.c +1 -1
  6. data/ext/rugged/rugged_repo.c +4 -1
  7. data/ext/rugged/rugged_tree.c +20 -19
  8. data/lib/rugged/commit.rb +5 -1
  9. data/lib/rugged/repository.rb +6 -4
  10. data/lib/rugged/version.rb +1 -1
  11. data/test/config_test.rb +1 -1
  12. data/test/index_test.rb +4 -2
  13. data/test/object_test.rb +3 -3
  14. data/test/reference_test.rb +66 -1
  15. data/test/repo_test.rb +4 -4
  16. data/test/tree_test.rb +1 -1
  17. data/test/walker_test.rb +1 -1
  18. data/vendor/libgit2/Makefile.embed +42 -0
  19. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/http-parser/http_parser.c +0 -0
  20. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/http-parser/http_parser.h +0 -0
  21. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/config.h +0 -0
  22. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regcomp.c +0 -0
  23. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex.c +0 -0
  24. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex.h +0 -0
  25. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex_internal.c +0 -0
  26. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regex_internal.h +0 -0
  27. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/regex/regexec.c +0 -0
  28. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/adler32.c +0 -0
  29. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/crc32.c +0 -0
  30. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/crc32.h +0 -0
  31. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/deflate.c +0 -0
  32. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/deflate.h +0 -0
  33. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffast.c +0 -0
  34. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffast.h +0 -0
  35. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inffixed.h +0 -0
  36. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inflate.c +0 -0
  37. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inflate.h +0 -0
  38. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inftrees.c +0 -0
  39. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/inftrees.h +0 -0
  40. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/trees.c +0 -0
  41. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/trees.h +0 -0
  42. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zconf.h +0 -0
  43. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zlib.h +0 -0
  44. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zutil.c +0 -0
  45. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/deps/zlib/zutil.h +0 -0
  46. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2.h +6 -0
  47. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/attr.h +35 -20
  48. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/blob.h +1 -1
  49. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/branch.h +62 -24
  50. data/vendor/libgit2/include/git2/checkout.h +66 -0
  51. data/vendor/libgit2/include/git2/clone.h +59 -0
  52. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/commit.h +22 -3
  53. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/common.h +27 -0
  54. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/config.h +22 -4
  55. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/diff.h +20 -1
  56. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/errors.h +2 -37
  57. data/vendor/libgit2/include/git2/ignore.h +74 -0
  58. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/index.h +37 -5
  59. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/indexer.h +2 -2
  60. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/inttypes.h +0 -0
  61. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/merge.h +10 -0
  62. data/vendor/libgit2/include/git2/message.h +43 -0
  63. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/net.h +0 -0
  64. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/notes.h +24 -20
  65. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/object.h +18 -1
  66. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/odb.h +16 -1
  67. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/odb_backend.h +8 -1
  68. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/oid.h +26 -2
  69. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/reflog.h +39 -9
  70. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/refs.h +55 -3
  71. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/refspec.h +0 -0
  72. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/remote.h +68 -2
  73. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/repository.h +39 -1
  74. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/reset.h +0 -0
  75. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/revparse.h +0 -0
  76. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/revwalk.h +2 -2
  77. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/signature.h +3 -0
  78. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/status.h +5 -2
  79. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/stdint.h +0 -0
  80. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/submodule.h +0 -0
  81. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/tag.h +3 -3
  82. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/threads.h +0 -0
  83. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/tree.h +77 -20
  84. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/types.h +14 -0
  85. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/version.h +0 -0
  86. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/include/git2/windows.h +0 -0
  87. data/vendor/libgit2/src/amiga/map.c +51 -0
  88. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr.c +39 -6
  89. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr.h +1 -0
  90. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr_file.c +2 -16
  91. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/attr_file.h +4 -0
  92. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/blob.c +0 -0
  93. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/blob.h +0 -0
  94. data/vendor/libgit2/src/branch.c +294 -0
  95. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/bswap.h +0 -0
  96. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/buffer.c +40 -0
  97. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/buffer.h +22 -0
  98. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cache.c +1 -0
  99. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cache.h +0 -0
  100. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/cc-compat.h +0 -0
  101. data/vendor/libgit2/src/checkout.c +230 -0
  102. data/vendor/libgit2/src/clone.c +254 -0
  103. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/commit.c +42 -16
  104. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/commit.h +0 -0
  105. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/common.h +3 -9
  106. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/compat/fnmatch.c +0 -0
  107. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/compat/fnmatch.h +0 -0
  108. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config.c +15 -5
  109. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config.h +0 -0
  110. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_cache.c +0 -0
  111. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_file.c +86 -19
  112. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/config_file.h +16 -1
  113. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/crlf.c +92 -4
  114. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/date.c +20 -20
  115. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/delta-apply.c +0 -0
  116. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/delta-apply.h +0 -0
  117. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff.c +45 -18
  118. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff.h +0 -0
  119. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/diff_output.c +63 -46
  120. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/errors.c +0 -0
  121. data/vendor/libgit2/src/fetch.c +380 -0
  122. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fetch.h +1 -2
  123. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filebuf.c +7 -2
  124. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filebuf.h +0 -0
  125. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fileops.c +16 -1
  126. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/fileops.h +10 -0
  127. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filter.c +38 -2
  128. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/filter.h +15 -0
  129. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/global.c +5 -0
  130. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/global.h +2 -6
  131. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/hash.c +0 -0
  132. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/hash.h +0 -0
  133. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ignore.c +50 -1
  134. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ignore.h +0 -0
  135. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/index.c +95 -28
  136. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/index.h +5 -0
  137. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/indexer.c +27 -25
  138. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/iterator.c +0 -0
  139. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/iterator.h +0 -0
  140. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/khash.h +6 -4
  141. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/map.h +4 -0
  142. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/message.c +27 -2
  143. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/message.h +2 -1
  144. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/mwindow.c +54 -10
  145. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/mwindow.h +1 -1
  146. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/netops.c +48 -38
  147. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/netops.h +7 -4
  148. data/vendor/libgit2/src/notes.c +610 -0
  149. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/notes.h +0 -0
  150. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/object.c +73 -2
  151. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb.c +20 -1
  152. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb.h +0 -0
  153. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb_loose.c +89 -3
  154. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/odb_pack.c +61 -3
  155. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/oid.c +1 -6
  156. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/oidmap.h +1 -6
  157. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pack.c +49 -4
  158. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pack.h +5 -1
  159. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/path.c +144 -21
  160. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/path.h +46 -0
  161. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pkt.c +30 -8
  162. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pkt.h +0 -0
  163. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pool.c +7 -0
  164. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pool.h +7 -0
  165. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/posix.c +92 -1
  166. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/posix.h +36 -1
  167. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ppc/sha1.c +0 -0
  168. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/ppc/sha1.h +0 -0
  169. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pqueue.c +0 -0
  170. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/pqueue.h +0 -0
  171. data/vendor/libgit2/src/protocol.c +88 -0
  172. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/protocol.h +3 -9
  173. data/vendor/libgit2/src/reflog.c +489 -0
  174. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/reflog.h +3 -0
  175. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refs.c +95 -52
  176. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refs.h +0 -0
  177. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refspec.c +0 -0
  178. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/refspec.h +0 -0
  179. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/remote.c +130 -8
  180. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/remote.h +6 -0
  181. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/repository.c +167 -42
  182. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/repository.h +7 -0
  183. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/reset.c +1 -1
  184. data/vendor/libgit2/src/revparse.c +830 -0
  185. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/revwalk.c +83 -15
  186. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1.c +0 -0
  187. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1.h +5 -0
  188. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1_lookup.c +0 -0
  189. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/sha1_lookup.h +0 -0
  190. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/signature.c +19 -5
  191. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/signature.h +0 -0
  192. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/status.c +24 -18
  193. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/strmap.h +1 -1
  194. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/submodule.c +3 -3
  195. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tag.c +2 -9
  196. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tag.h +0 -0
  197. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/thread-utils.c +0 -0
  198. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/thread-utils.h +0 -0
  199. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transport.c +0 -0
  200. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transport.h +13 -9
  201. data/vendor/libgit2/src/transports/git.c +245 -0
  202. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transports/http.c +93 -336
  203. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/transports/local.c +35 -32
  204. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree-cache.c +0 -0
  205. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree-cache.h +0 -0
  206. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree.c +214 -124
  207. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tree.h +7 -3
  208. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/tsort.c +0 -0
  209. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/unix/map.c +2 -0
  210. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/unix/posix.h +2 -1
  211. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/util.c +30 -0
  212. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/util.h +13 -6
  213. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/vector.c +1 -1
  214. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/vector.h +5 -5
  215. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/dir.c +0 -0
  216. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/dir.h +0 -0
  217. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/map.c +0 -0
  218. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/mingw-compat.h +0 -0
  219. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/msvc-compat.h +0 -0
  220. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/posix.h +1 -0
  221. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/posix_w32.c +17 -1
  222. data/vendor/libgit2/src/win32/precompiled.c +1 -0
  223. data/vendor/libgit2/src/win32/precompiled.h +19 -0
  224. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/pthread.c +0 -0
  225. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/pthread.h +0 -0
  226. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/utf-conv.c +0 -0
  227. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/win32/utf-conv.h +0 -0
  228. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiff.h +0 -0
  229. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiffi.c +0 -0
  230. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xdiffi.h +0 -0
  231. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xemit.c +0 -0
  232. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xemit.h +0 -0
  233. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xhistogram.c +0 -0
  234. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xinclude.h +0 -0
  235. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xmacros.h +0 -0
  236. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xmerge.c +0 -0
  237. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xpatience.c +0 -0
  238. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xprepare.c +0 -0
  239. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xprepare.h +0 -0
  240. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xtypes.h +0 -0
  241. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xutils.c +0 -0
  242. data/{ext/rugged/vendor/libgit2-dist → vendor/libgit2}/src/xdiff/xutils.h +0 -0
  243. metadata +265 -348
  244. data/ext/rugged/vendor/libgit2-dist.tar.gz +0 -0
  245. data/ext/rugged/vendor/libgit2-dist/examples/diff.c +0 -238
  246. data/ext/rugged/vendor/libgit2-dist/examples/general.c +0 -451
  247. data/ext/rugged/vendor/libgit2-dist/examples/network/common.h +0 -14
  248. data/ext/rugged/vendor/libgit2-dist/examples/network/fetch.c +0 -113
  249. data/ext/rugged/vendor/libgit2-dist/examples/network/git2.c +0 -62
  250. data/ext/rugged/vendor/libgit2-dist/examples/network/index-pack.c +0 -102
  251. data/ext/rugged/vendor/libgit2-dist/examples/network/ls-remote.c +0 -76
  252. data/ext/rugged/vendor/libgit2-dist/examples/showindex.c +0 -43
  253. data/ext/rugged/vendor/libgit2-dist/src/branch.c +0 -208
  254. data/ext/rugged/vendor/libgit2-dist/src/branch.h +0 -17
  255. data/ext/rugged/vendor/libgit2-dist/src/fetch.c +0 -200
  256. data/ext/rugged/vendor/libgit2-dist/src/notes.c +0 -548
  257. data/ext/rugged/vendor/libgit2-dist/src/protocol.c +0 -58
  258. data/ext/rugged/vendor/libgit2-dist/src/reflog.c +0 -340
  259. data/ext/rugged/vendor/libgit2-dist/src/revparse.c +0 -748
  260. data/ext/rugged/vendor/libgit2-dist/src/transports/git.c +0 -477
  261. data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/attr_expect.h +0 -43
  262. data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/file.c +0 -226
  263. data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/flags.c +0 -108
  264. data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/lookup.c +0 -262
  265. data/ext/rugged/vendor/libgit2-dist/tests-clar/attr/repo.c +0 -273
  266. data/ext/rugged/vendor/libgit2-dist/tests-clar/buf/basic.c +0 -29
  267. data/ext/rugged/vendor/libgit2-dist/tests-clar/clar_helpers.c +0 -181
  268. data/ext/rugged/vendor/libgit2-dist/tests-clar/clar_libgit2.h +0 -55
  269. data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/commit.c +0 -44
  270. data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/parse.c +0 -350
  271. data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/signature.c +0 -65
  272. data/ext/rugged/vendor/libgit2-dist/tests-clar/commit/write.c +0 -140
  273. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/add.c +0 -37
  274. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/multivar.c +0 -151
  275. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/new.c +0 -36
  276. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/read.c +0 -221
  277. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/stress.c +0 -61
  278. data/ext/rugged/vendor/libgit2-dist/tests-clar/config/write.c +0 -92
  279. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/buffer.c +0 -613
  280. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/dirent.c +0 -235
  281. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/env.c +0 -115
  282. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/errors.c +0 -60
  283. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/filebuf.c +0 -92
  284. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/hex.c +0 -22
  285. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/oid.c +0 -18
  286. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/path.c +0 -420
  287. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/pool.c +0 -85
  288. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/rmdir.c +0 -68
  289. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/string.c +0 -28
  290. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/strmap.c +0 -102
  291. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/strtol.c +0 -37
  292. data/ext/rugged/vendor/libgit2-dist/tests-clar/core/vector.c +0 -191
  293. data/ext/rugged/vendor/libgit2-dist/tests-clar/date/date.c +0 -15
  294. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/blob.c +0 -254
  295. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/diff_helpers.c +0 -104
  296. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/diff_helpers.h +0 -47
  297. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/index.c +0 -92
  298. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/iterator.c +0 -572
  299. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/patch.c +0 -99
  300. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/tree.c +0 -210
  301. data/ext/rugged/vendor/libgit2-dist/tests-clar/diff/workdir.c +0 -543
  302. data/ext/rugged/vendor/libgit2-dist/tests-clar/index/read_tree.c +0 -46
  303. data/ext/rugged/vendor/libgit2-dist/tests-clar/index/rename.c +0 -50
  304. data/ext/rugged/vendor/libgit2-dist/tests-clar/index/tests.c +0 -246
  305. data/ext/rugged/vendor/libgit2-dist/tests-clar/network/createremotethenload.c +0 -33
  306. data/ext/rugged/vendor/libgit2-dist/tests-clar/network/remotelocal.c +0 -137
  307. data/ext/rugged/vendor/libgit2-dist/tests-clar/network/remotes.c +0 -183
  308. data/ext/rugged/vendor/libgit2-dist/tests-clar/notes/notes.c +0 -133
  309. data/ext/rugged/vendor/libgit2-dist/tests-clar/notes/notesref.c +0 -57
  310. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/filter.c +0 -125
  311. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/fromchunks.c +0 -87
  312. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/blob/write.c +0 -69
  313. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/commit/commitstagedfile.c +0 -126
  314. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/lookup.c +0 -63
  315. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/message.c +0 -171
  316. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/chars.c +0 -41
  317. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/compare.c +0 -124
  318. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/convert.c +0 -75
  319. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/data.h +0 -323
  320. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/fromstr.c +0 -30
  321. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/hash.c +0 -166
  322. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/short.c +0 -94
  323. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/size.c +0 -13
  324. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/type2string.c +0 -54
  325. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/raw/write.c +0 -455
  326. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/peel.c +0 -56
  327. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/read.c +0 -130
  328. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tag/write.c +0 -192
  329. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/frompath.c +0 -81
  330. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/read.c +0 -75
  331. data/ext/rugged/vendor/libgit2-dist/tests-clar/object/tree/write.c +0 -84
  332. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/loose.c +0 -84
  333. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/loose_data.h +0 -522
  334. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/mixed.c +0 -24
  335. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/pack_data.h +0 -151
  336. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/packed.c +0 -78
  337. data/ext/rugged/vendor/libgit2-dist/tests-clar/odb/sorting.c +0 -71
  338. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/create.c +0 -113
  339. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/delete.c +0 -91
  340. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/listall.c +0 -78
  341. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/branches/move.c +0 -72
  342. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/crashes.c +0 -17
  343. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/create.c +0 -149
  344. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/delete.c +0 -85
  345. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/list.c +0 -53
  346. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/listall.c +0 -36
  347. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/lookup.c +0 -42
  348. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/normalize.c +0 -200
  349. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/overwrite.c +0 -136
  350. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/pack.c +0 -67
  351. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/read.c +0 -194
  352. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/reflog.c +0 -123
  353. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/rename.c +0 -339
  354. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/revparse.c +0 -174
  355. data/ext/rugged/vendor/libgit2-dist/tests-clar/refs/unicode.c +0 -42
  356. data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/discover.c +0 -142
  357. data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/getters.c +0 -86
  358. data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/init.c +0 -249
  359. data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/open.c +0 -282
  360. data/ext/rugged/vendor/libgit2-dist/tests-clar/repo/setters.c +0 -80
  361. data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/mixed.c +0 -47
  362. data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/reset_helpers.c +0 -10
  363. data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/reset_helpers.h +0 -6
  364. data/ext/rugged/vendor/libgit2-dist/tests-clar/reset/soft.c +0 -102
  365. data/ext/rugged/vendor/libgit2-dist/tests-clar/revwalk/basic.c +0 -181
  366. data/ext/rugged/vendor/libgit2-dist/tests-clar/revwalk/mergebase.c +0 -148
  367. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/ignore.c +0 -147
  368. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/single.c +0 -29
  369. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_data.h +0 -202
  370. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_helpers.c +0 -49
  371. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/status_helpers.h +0 -33
  372. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/submodules.c +0 -112
  373. data/ext/rugged/vendor/libgit2-dist/tests-clar/status/worktree.c +0 -649
  374. data/ext/rugged/vendor/libgit2-dist/tests-clar/threads/basic.c +0 -20
@@ -1,75 +0,0 @@
1
- #include "clar_libgit2.h"
2
-
3
- #include "tree.h"
4
-
5
- static const char *tree_oid = "1810dff58d8a660512d4832e740f692884338ccd";
6
-
7
- static git_repository *g_repo;
8
-
9
- // Fixture setup and teardown
10
- void test_object_tree_read__initialize(void)
11
- {
12
- g_repo = cl_git_sandbox_init("testrepo");
13
- }
14
-
15
- void test_object_tree_read__cleanup(void)
16
- {
17
- cl_git_sandbox_cleanup();
18
- }
19
-
20
-
21
-
22
- void test_object_tree_read__loaded(void)
23
- {
24
- // acces randomly the entries on a loaded tree
25
- git_oid id;
26
- git_tree *tree;
27
-
28
- git_oid_fromstr(&id, tree_oid);
29
-
30
- cl_git_pass(git_tree_lookup(&tree, g_repo, &id));
31
-
32
- cl_assert(git_tree_entry_byname(tree, "README") != NULL);
33
- cl_assert(git_tree_entry_byname(tree, "NOTEXISTS") == NULL);
34
- cl_assert(git_tree_entry_byname(tree, "") == NULL);
35
- cl_assert(git_tree_entry_byindex(tree, 0) != NULL);
36
- cl_assert(git_tree_entry_byindex(tree, 2) != NULL);
37
- cl_assert(git_tree_entry_byindex(tree, 3) == NULL);
38
- cl_assert(git_tree_entry_byindex(tree, (unsigned int)-1) == NULL);
39
-
40
- git_tree_free(tree);
41
- }
42
-
43
- void test_object_tree_read__two(void)
44
- {
45
- // read a tree from the repository
46
- git_oid id;
47
- git_tree *tree;
48
- const git_tree_entry *entry;
49
- git_object *obj;
50
-
51
- git_oid_fromstr(&id, tree_oid);
52
-
53
- cl_git_pass(git_tree_lookup(&tree, g_repo, &id));
54
-
55
- cl_assert(git_tree_entrycount(tree) == 3);
56
-
57
- /* GH-86: git_object_lookup() should also check the type if the object comes from the cache */
58
- cl_assert(git_object_lookup(&obj, g_repo, &id, GIT_OBJ_TREE) == 0);
59
- cl_assert(obj != NULL);
60
- git_object_free(obj);
61
- obj = NULL;
62
- cl_git_fail(git_object_lookup(&obj, g_repo, &id, GIT_OBJ_BLOB));
63
- cl_assert(obj == NULL);
64
-
65
- entry = git_tree_entry_byname(tree, "README");
66
- cl_assert(entry != NULL);
67
-
68
- cl_assert_equal_s(git_tree_entry_name(entry), "README");
69
-
70
- cl_git_pass(git_tree_entry_to_object(&obj, g_repo, entry));
71
- cl_assert(obj != NULL);
72
-
73
- git_object_free(obj);
74
- git_tree_free(tree);
75
- }
@@ -1,84 +0,0 @@
1
- #include "clar_libgit2.h"
2
-
3
- #include "tree.h"
4
-
5
- static const char *blob_oid = "fa49b077972391ad58037050f2a75f74e3671e92";
6
- static const char *first_tree = "181037049a54a1eb5fab404658a3a250b44335d7";
7
- static const char *second_tree = "f60079018b664e4e79329a7ef9559c8d9e0378d1";
8
- static const char *third_tree = "eb86d8b81d6adbd5290a935d6c9976882de98488";
9
-
10
- static git_repository *g_repo;
11
-
12
- // Fixture setup and teardown
13
- void test_object_tree_write__initialize(void)
14
- {
15
- g_repo = cl_git_sandbox_init("testrepo");
16
- }
17
-
18
- void test_object_tree_write__cleanup(void)
19
- {
20
- cl_git_sandbox_cleanup();
21
- }
22
-
23
- void test_object_tree_write__from_memory(void)
24
- {
25
- // write a tree from a memory
26
- git_treebuilder *builder;
27
- git_tree *tree;
28
- git_oid id, bid, rid, id2;
29
-
30
- git_oid_fromstr(&id, first_tree);
31
- git_oid_fromstr(&id2, second_tree);
32
- git_oid_fromstr(&bid, blob_oid);
33
-
34
- //create a second tree from first tree using `git_treebuilder_insert` on REPOSITORY_FOLDER.
35
- cl_git_pass(git_tree_lookup(&tree, g_repo, &id));
36
- cl_git_pass(git_treebuilder_create(&builder, tree));
37
-
38
- cl_git_fail(git_treebuilder_insert(NULL, builder, "", &bid, 0100644));
39
- cl_git_fail(git_treebuilder_insert(NULL, builder, "/", &bid, 0100644));
40
- cl_git_fail(git_treebuilder_insert(NULL, builder, "folder/new.txt", &bid, 0100644));
41
-
42
- cl_git_pass(git_treebuilder_insert(NULL,builder,"new.txt",&bid,0100644));
43
- cl_git_pass(git_treebuilder_write(&rid, g_repo, builder));
44
-
45
- cl_assert(git_oid_cmp(&rid, &id2) == 0);
46
-
47
- git_treebuilder_free(builder);
48
- git_tree_free(tree);
49
- }
50
-
51
- void test_object_tree_write__subtree(void)
52
- {
53
- // write a hierarchical tree from a memory
54
- git_treebuilder *builder;
55
- git_tree *tree;
56
- git_oid id, bid, subtree_id, id2, id3;
57
- git_oid id_hiearar;
58
-
59
- git_oid_fromstr(&id, first_tree);
60
- git_oid_fromstr(&id2, second_tree);
61
- git_oid_fromstr(&id3, third_tree);
62
- git_oid_fromstr(&bid, blob_oid);
63
-
64
- //create subtree
65
- cl_git_pass(git_treebuilder_create(&builder, NULL));
66
- cl_git_pass(git_treebuilder_insert(NULL,builder,"new.txt",&bid,0100644)); //-V536
67
- cl_git_pass(git_treebuilder_write(&subtree_id, g_repo, builder));
68
- git_treebuilder_free(builder);
69
-
70
- // create parent tree
71
- cl_git_pass(git_tree_lookup(&tree, g_repo, &id));
72
- cl_git_pass(git_treebuilder_create(&builder, tree));
73
- cl_git_pass(git_treebuilder_insert(NULL,builder,"new",&subtree_id,040000)); //-V536
74
- cl_git_pass(git_treebuilder_write(&id_hiearar, g_repo, builder));
75
- git_treebuilder_free(builder);
76
- git_tree_free(tree);
77
-
78
- cl_assert(git_oid_cmp(&id_hiearar, &id3) == 0);
79
-
80
- // check data is correct
81
- cl_git_pass(git_tree_lookup(&tree, g_repo, &id_hiearar));
82
- cl_assert(2 == git_tree_entrycount(tree));
83
- git_tree_free(tree);
84
- }
@@ -1,84 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "odb.h"
3
- #include "posix.h"
4
- #include "loose_data.h"
5
-
6
- static void write_object_files(object_data *d)
7
- {
8
- int fd;
9
-
10
- if (p_mkdir(d->dir, GIT_OBJECT_DIR_MODE) < 0)
11
- cl_assert(errno == EEXIST);
12
-
13
- cl_assert((fd = p_creat(d->file, S_IREAD | S_IWRITE)) >= 0);
14
- cl_must_pass(p_write(fd, d->bytes, d->blen));
15
-
16
- p_close(fd);
17
- }
18
-
19
- static void cmp_objects(git_rawobj *o, object_data *d)
20
- {
21
- cl_assert(o->type == git_object_string2type(d->type));
22
- cl_assert(o->len == d->dlen);
23
-
24
- if (o->len > 0)
25
- cl_assert(memcmp(o->data, d->data, o->len) == 0);
26
- }
27
-
28
- static void test_read_object(object_data *data)
29
- {
30
- git_oid id;
31
- git_odb_object *obj;
32
- git_odb *odb;
33
-
34
- write_object_files(data);
35
-
36
- cl_git_pass(git_odb_open(&odb, "test-objects"));
37
- cl_git_pass(git_oid_fromstr(&id, data->id));
38
- cl_git_pass(git_odb_read(&obj, odb, &id));
39
-
40
- cmp_objects((git_rawobj *)&obj->raw, data);
41
-
42
- git_odb_object_free(obj);
43
- git_odb_free(odb);
44
- }
45
-
46
- void test_odb_loose__initialize(void)
47
- {
48
- cl_must_pass(p_mkdir("test-objects", GIT_OBJECT_DIR_MODE));
49
- }
50
-
51
- void test_odb_loose__cleanup(void)
52
- {
53
- cl_fixture_cleanup("test-objects");
54
- }
55
-
56
- void test_odb_loose__exists(void)
57
- {
58
- git_oid id, id2;
59
- git_odb *odb;
60
-
61
- write_object_files(&one);
62
- cl_git_pass(git_odb_open(&odb, "test-objects"));
63
-
64
- cl_git_pass(git_oid_fromstr(&id, one.id));
65
-
66
- cl_assert(git_odb_exists(odb, &id));
67
-
68
- /* Test for a non-existant object */
69
- cl_git_pass(git_oid_fromstr(&id2, "8b137891791fe96927ad78e64b0aad7bded08baa"));
70
- cl_assert(!git_odb_exists(odb, &id2));
71
-
72
- git_odb_free(odb);
73
- }
74
-
75
- void test_odb_loose__simple_reads(void)
76
- {
77
- test_read_object(&commit);
78
- test_read_object(&tree);
79
- test_read_object(&tag);
80
- test_read_object(&zero);
81
- test_read_object(&one);
82
- test_read_object(&two);
83
- test_read_object(&some);
84
- }
@@ -1,522 +0,0 @@
1
- typedef struct object_data {
2
- unsigned char *bytes; /* (compressed) bytes stored in object store */
3
- size_t blen; /* length of data in object store */
4
- char *id; /* object id (sha1) */
5
- char *type; /* object type */
6
- char *dir; /* object store (fan-out) directory name */
7
- char *file; /* object store filename */
8
- unsigned char *data; /* (uncompressed) object data */
9
- size_t dlen; /* length of (uncompressed) object data */
10
- } object_data;
11
-
12
- /* one == 8b137891791fe96927ad78e64b0aad7bded08bdc */
13
- static unsigned char one_bytes[] = {
14
- 0x31, 0x78, 0x9c, 0xe3, 0x02, 0x00, 0x00, 0x0b,
15
- 0x00, 0x0b,
16
- };
17
-
18
- static unsigned char one_data[] = {
19
- 0x0a,
20
- };
21
-
22
- static object_data one = {
23
- one_bytes,
24
- sizeof(one_bytes),
25
- "8b137891791fe96927ad78e64b0aad7bded08bdc",
26
- "blob",
27
- "test-objects/8b",
28
- "test-objects/8b/137891791fe96927ad78e64b0aad7bded08bdc",
29
- one_data,
30
- sizeof(one_data),
31
- };
32
-
33
-
34
- /* commit == 3d7f8a6af076c8c3f20071a8935cdbe8228594d1 */
35
- static unsigned char commit_bytes[] = {
36
- 0x78, 0x01, 0x85, 0x50, 0xc1, 0x6a, 0xc3, 0x30,
37
- 0x0c, 0xdd, 0xd9, 0x5f, 0xa1, 0xfb, 0x96, 0x12,
38
- 0xbb, 0x29, 0x71, 0x46, 0x19, 0x2b, 0x3d, 0x97,
39
- 0x1d, 0xd6, 0x7d, 0x80, 0x1d, 0xcb, 0x89, 0x21,
40
- 0xb6, 0x82, 0xed, 0x40, 0xf3, 0xf7, 0xf3, 0x48,
41
- 0x29, 0x3b, 0x6d, 0xd2, 0xe5, 0xbd, 0x27, 0xbd,
42
- 0x27, 0x50, 0x4f, 0xde, 0xbb, 0x0c, 0xfb, 0x43,
43
- 0xf3, 0x94, 0x23, 0x22, 0x18, 0x6b, 0x85, 0x51,
44
- 0x5d, 0xad, 0xc5, 0xa1, 0x41, 0xae, 0x51, 0x4b,
45
- 0xd9, 0x19, 0x6e, 0x4b, 0x0b, 0x29, 0x35, 0x72,
46
- 0x59, 0xef, 0x5b, 0x29, 0x8c, 0x65, 0x6a, 0xc9,
47
- 0x23, 0x45, 0x38, 0xc1, 0x17, 0x5c, 0x7f, 0xc0,
48
- 0x71, 0x13, 0xde, 0xf1, 0xa6, 0xfc, 0x3c, 0xe1,
49
- 0xae, 0x27, 0xff, 0x06, 0x5c, 0x88, 0x56, 0xf2,
50
- 0x46, 0x74, 0x2d, 0x3c, 0xd7, 0xa5, 0x58, 0x51,
51
- 0xcb, 0xb9, 0x8c, 0x11, 0xce, 0xf0, 0x01, 0x97,
52
- 0x0d, 0x1e, 0x1f, 0xea, 0x3f, 0x6e, 0x76, 0x02,
53
- 0x0a, 0x58, 0x4d, 0x2e, 0x20, 0x6c, 0x1e, 0x48,
54
- 0x8b, 0xf7, 0x2a, 0xae, 0x8c, 0x5d, 0x47, 0x04,
55
- 0x4d, 0x66, 0x05, 0xb2, 0x90, 0x0b, 0xbe, 0xcf,
56
- 0x3d, 0xa6, 0xa4, 0x06, 0x7c, 0x29, 0x3c, 0x64,
57
- 0xe5, 0x82, 0x0b, 0x03, 0xd8, 0x25, 0x96, 0x8d,
58
- 0x08, 0x78, 0x9b, 0x27, 0x15, 0x54, 0x76, 0x14,
59
- 0xd8, 0xdd, 0x35, 0x2f, 0x71, 0xa6, 0x84, 0x8f,
60
- 0x90, 0x51, 0x85, 0x01, 0x13, 0xb8, 0x90, 0x23,
61
- 0x99, 0xa5, 0x47, 0x03, 0x7a, 0xfd, 0x15, 0xbf,
62
- 0x63, 0xec, 0xd3, 0x0d, 0x01, 0x4d, 0x45, 0xb6,
63
- 0xd2, 0xeb, 0xeb, 0xdf, 0xef, 0x60, 0xdf, 0xef,
64
- 0x1f, 0x78, 0x35,
65
- };
66
-
67
- static unsigned char commit_data[] = {
68
- 0x74, 0x72, 0x65, 0x65, 0x20, 0x64, 0x66, 0x66,
69
- 0x32, 0x64, 0x61, 0x39, 0x30, 0x62, 0x32, 0x35,
70
- 0x34, 0x65, 0x31, 0x62, 0x65, 0x62, 0x38, 0x38,
71
- 0x39, 0x64, 0x31, 0x66, 0x31, 0x66, 0x31, 0x32,
72
- 0x38, 0x38, 0x62, 0x65, 0x31, 0x38, 0x30, 0x33,
73
- 0x37, 0x38, 0x32, 0x64, 0x66, 0x0a, 0x61, 0x75,
74
- 0x74, 0x68, 0x6f, 0x72, 0x20, 0x41, 0x20, 0x55,
75
- 0x20, 0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61,
76
- 0x75, 0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78,
77
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
78
- 0x6d, 0x3e, 0x20, 0x31, 0x32, 0x32, 0x37, 0x38,
79
- 0x31, 0x34, 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30,
80
- 0x30, 0x30, 0x30, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
81
- 0x69, 0x74, 0x74, 0x65, 0x72, 0x20, 0x43, 0x20,
82
- 0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
83
- 0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
84
- 0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
85
- 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
86
- 0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
87
- 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
88
- 0x30, 0x0a, 0x0a, 0x41, 0x20, 0x6f, 0x6e, 0x65,
89
- 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f,
90
- 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x73, 0x75, 0x6d,
91
- 0x6d, 0x61, 0x72, 0x79, 0x0a, 0x0a, 0x54, 0x68,
92
- 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6f,
93
- 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
94
- 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x65, 0x73,
95
- 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x63, 0x6f,
96
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
97
- 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72,
98
- 0x20, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61,
99
- 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20,
100
- 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x72, 0x70,
101
- 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74,
102
- 0x68, 0x65, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67,
103
- 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f,
104
- 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79,
105
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d,
106
- 0x6d, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x53, 0x69,
107
- 0x67, 0x6e, 0x65, 0x64, 0x2d, 0x6f, 0x66, 0x2d,
108
- 0x62, 0x79, 0x3a, 0x20, 0x41, 0x20, 0x55, 0x20,
109
- 0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61, 0x75,
110
- 0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78, 0x61,
111
- 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
112
- 0x3e, 0x0a,
113
- };
114
-
115
- static object_data commit = {
116
- commit_bytes,
117
- sizeof(commit_bytes),
118
- "3d7f8a6af076c8c3f20071a8935cdbe8228594d1",
119
- "commit",
120
- "test-objects/3d",
121
- "test-objects/3d/7f8a6af076c8c3f20071a8935cdbe8228594d1",
122
- commit_data,
123
- sizeof(commit_data),
124
- };
125
-
126
- /* tree == dff2da90b254e1beb889d1f1f1288be1803782df */
127
- static unsigned char tree_bytes[] = {
128
- 0x78, 0x01, 0x2b, 0x29, 0x4a, 0x4d, 0x55, 0x30,
129
- 0x34, 0x32, 0x63, 0x30, 0x34, 0x30, 0x30, 0x33,
130
- 0x31, 0x51, 0xc8, 0xcf, 0x4b, 0x65, 0xe8, 0x16,
131
- 0xae, 0x98, 0x58, 0x29, 0xff, 0x32, 0x53, 0x7d,
132
- 0x6d, 0xc5, 0x33, 0x6f, 0xae, 0xb5, 0xd5, 0xf7,
133
- 0x2e, 0x74, 0xdf, 0x81, 0x4a, 0x17, 0xe7, 0xe7,
134
- 0xa6, 0x32, 0xfc, 0x6d, 0x31, 0xd8, 0xd3, 0xe6,
135
- 0xf3, 0xe7, 0xea, 0x47, 0xbe, 0xd0, 0x09, 0x3f,
136
- 0x96, 0xb8, 0x3f, 0x90, 0x9e, 0xa2, 0xfd, 0x0f,
137
- 0x2a, 0x5f, 0x52, 0x9e, 0xcf, 0x50, 0x31, 0x43,
138
- 0x52, 0x29, 0xd1, 0x5a, 0xeb, 0x77, 0x82, 0x2a,
139
- 0x8b, 0xfe, 0xb7, 0xbd, 0xed, 0x5d, 0x07, 0x67,
140
- 0xfa, 0xb5, 0x42, 0xa5, 0xab, 0x52, 0x8b, 0xf2,
141
- 0x19, 0x9e, 0xcd, 0x7d, 0x34, 0x7b, 0xd3, 0xc5,
142
- 0x6b, 0xce, 0xde, 0xdd, 0x9a, 0xeb, 0xca, 0xa3,
143
- 0x6e, 0x1c, 0x7a, 0xd2, 0x13, 0x3c, 0x11, 0x00,
144
- 0xe2, 0xaa, 0x38, 0x57,
145
- };
146
-
147
- static unsigned char tree_data[] = {
148
- 0x31, 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x6f,
149
- 0x6e, 0x65, 0x00, 0x8b, 0x13, 0x78, 0x91, 0x79,
150
- 0x1f, 0xe9, 0x69, 0x27, 0xad, 0x78, 0xe6, 0x4b,
151
- 0x0a, 0xad, 0x7b, 0xde, 0xd0, 0x8b, 0xdc, 0x31,
152
- 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x73, 0x6f,
153
- 0x6d, 0x65, 0x00, 0xfd, 0x84, 0x30, 0xbc, 0x86,
154
- 0x4c, 0xfc, 0xd5, 0xf1, 0x0e, 0x55, 0x90, 0xf8,
155
- 0xa4, 0x47, 0xe0, 0x1b, 0x94, 0x2b, 0xfe, 0x31,
156
- 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x74, 0x77,
157
- 0x6f, 0x00, 0x78, 0x98, 0x19, 0x22, 0x61, 0x3b,
158
- 0x2a, 0xfb, 0x60, 0x25, 0x04, 0x2f, 0xf6, 0xbd,
159
- 0x87, 0x8a, 0xc1, 0x99, 0x4e, 0x85, 0x31, 0x30,
160
- 0x30, 0x36, 0x34, 0x34, 0x20, 0x7a, 0x65, 0x72,
161
- 0x6f, 0x00, 0xe6, 0x9d, 0xe2, 0x9b, 0xb2, 0xd1,
162
- 0xd6, 0x43, 0x4b, 0x8b, 0x29, 0xae, 0x77, 0x5a,
163
- 0xd8, 0xc2, 0xe4, 0x8c, 0x53, 0x91,
164
- };
165
-
166
- static object_data tree = {
167
- tree_bytes,
168
- sizeof(tree_bytes),
169
- "dff2da90b254e1beb889d1f1f1288be1803782df",
170
- "tree",
171
- "test-objects/df",
172
- "test-objects/df/f2da90b254e1beb889d1f1f1288be1803782df",
173
- tree_data,
174
- sizeof(tree_data),
175
- };
176
-
177
- /* tag == 09d373e1dfdc16b129ceec6dd649739911541e05 */
178
- static unsigned char tag_bytes[] = {
179
- 0x78, 0x01, 0x35, 0x4e, 0xcb, 0x0a, 0xc2, 0x40,
180
- 0x10, 0xf3, 0xbc, 0x5f, 0x31, 0x77, 0xa1, 0xec,
181
- 0xa3, 0xed, 0x6e, 0x41, 0x44, 0xf0, 0x2c, 0x5e,
182
- 0xfc, 0x81, 0xe9, 0x76, 0xb6, 0xad, 0xb4, 0xb4,
183
- 0x6c, 0x07, 0xd1, 0xbf, 0x77, 0x44, 0x0d, 0x39,
184
- 0x84, 0x10, 0x92, 0x30, 0xf6, 0x60, 0xbc, 0xdb,
185
- 0x2d, 0xed, 0x9d, 0x22, 0x83, 0xeb, 0x7c, 0x0a,
186
- 0x58, 0x63, 0xd2, 0xbe, 0x8e, 0x21, 0xba, 0x64,
187
- 0xb5, 0xf6, 0x06, 0x43, 0xe3, 0xaa, 0xd8, 0xb5,
188
- 0x14, 0xac, 0x0d, 0x55, 0x53, 0x76, 0x46, 0xf1,
189
- 0x6b, 0x25, 0x88, 0xcb, 0x3c, 0x8f, 0xac, 0x58,
190
- 0x3a, 0x1e, 0xba, 0xd0, 0x85, 0xd8, 0xd8, 0xf7,
191
- 0x94, 0xe1, 0x0c, 0x57, 0xb8, 0x8c, 0xcc, 0x22,
192
- 0x0f, 0xdf, 0x90, 0xc8, 0x13, 0x3d, 0x71, 0x5e,
193
- 0x27, 0x2a, 0xc4, 0x39, 0x82, 0xb1, 0xd6, 0x07,
194
- 0x53, 0xda, 0xc6, 0xc3, 0x5e, 0x0b, 0x94, 0xba,
195
- 0x0d, 0xe3, 0x06, 0x42, 0x1e, 0x08, 0x3e, 0x95,
196
- 0xbf, 0x4b, 0x69, 0xc9, 0x90, 0x69, 0x22, 0xdc,
197
- 0xe8, 0xbf, 0xf2, 0x06, 0x42, 0x9a, 0x36, 0xb1,
198
- };
199
-
200
- static unsigned char tag_data[] = {
201
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x33,
202
- 0x64, 0x37, 0x66, 0x38, 0x61, 0x36, 0x61, 0x66,
203
- 0x30, 0x37, 0x36, 0x63, 0x38, 0x63, 0x33, 0x66,
204
- 0x32, 0x30, 0x30, 0x37, 0x31, 0x61, 0x38, 0x39,
205
- 0x33, 0x35, 0x63, 0x64, 0x62, 0x65, 0x38, 0x32,
206
- 0x32, 0x38, 0x35, 0x39, 0x34, 0x64, 0x31, 0x0a,
207
- 0x74, 0x79, 0x70, 0x65, 0x20, 0x63, 0x6f, 0x6d,
208
- 0x6d, 0x69, 0x74, 0x0a, 0x74, 0x61, 0x67, 0x20,
209
- 0x76, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x0a, 0x74,
210
- 0x61, 0x67, 0x67, 0x65, 0x72, 0x20, 0x43, 0x20,
211
- 0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
212
- 0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
213
- 0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
214
- 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
215
- 0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
216
- 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
217
- 0x30, 0x0a, 0x0a, 0x54, 0x68, 0x69, 0x73, 0x20,
218
- 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,
219
- 0x61, 0x67, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
220
- 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65,
221
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x76, 0x30,
222
- 0x2e, 0x30, 0x2e, 0x31, 0x0a,
223
- };
224
-
225
- static object_data tag = {
226
- tag_bytes,
227
- sizeof(tag_bytes),
228
- "09d373e1dfdc16b129ceec6dd649739911541e05",
229
- "tag",
230
- "test-objects/09",
231
- "test-objects/09/d373e1dfdc16b129ceec6dd649739911541e05",
232
- tag_data,
233
- sizeof(tag_data),
234
- };
235
-
236
- /* zero == e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 */
237
- static unsigned char zero_bytes[] = {
238
- 0x78, 0x01, 0x4b, 0xca, 0xc9, 0x4f, 0x52, 0x30,
239
- 0x60, 0x00, 0x00, 0x09, 0xb0, 0x01, 0xf0,
240
- };
241
-
242
- static unsigned char zero_data[] = {
243
- 0x00 /* dummy data */
244
- };
245
-
246
- static object_data zero = {
247
- zero_bytes,
248
- sizeof(zero_bytes),
249
- "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
250
- "blob",
251
- "test-objects/e6",
252
- "test-objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391",
253
- zero_data,
254
- 0,
255
- };
256
-
257
- /* two == 78981922613b2afb6025042ff6bd878ac1994e85 */
258
- static unsigned char two_bytes[] = {
259
- 0x78, 0x01, 0x4b, 0xca, 0xc9, 0x4f, 0x52, 0x30,
260
- 0x62, 0x48, 0xe4, 0x02, 0x00, 0x0e, 0x64, 0x02,
261
- 0x5d,
262
- };
263
-
264
- static unsigned char two_data[] = {
265
- 0x61, 0x0a,
266
- };
267
-
268
- static object_data two = {
269
- two_bytes,
270
- sizeof(two_bytes),
271
- "78981922613b2afb6025042ff6bd878ac1994e85",
272
- "blob",
273
- "test-objects/78",
274
- "test-objects/78/981922613b2afb6025042ff6bd878ac1994e85",
275
- two_data,
276
- sizeof(two_data),
277
- };
278
-
279
- /* some == fd8430bc864cfcd5f10e5590f8a447e01b942bfe */
280
- static unsigned char some_bytes[] = {
281
- 0x78, 0x01, 0x7d, 0x54, 0xc1, 0x4e, 0xe3, 0x30,
282
- 0x10, 0xdd, 0x33, 0x5f, 0x31, 0xc7, 0x5d, 0x94,
283
- 0xa5, 0x84, 0xd5, 0x22, 0xad, 0x7a, 0x0a, 0x15,
284
- 0x85, 0x48, 0xd0, 0x56, 0x49, 0x2a, 0xd4, 0xa3,
285
- 0x13, 0x4f, 0x88, 0x85, 0x63, 0x47, 0xb6, 0x43,
286
- 0xc9, 0xdf, 0xef, 0x8c, 0x69, 0x17, 0x56, 0x0b,
287
- 0x7b, 0xaa, 0x62, 0x7b, 0xde, 0xbc, 0xf7, 0xe6,
288
- 0x4d, 0x6b, 0x6d, 0x6b, 0x48, 0xd3, 0xcb, 0x5f,
289
- 0x5f, 0x66, 0xa7, 0x27, 0x70, 0x0a, 0x55, 0xa7,
290
- 0x3c, 0xb4, 0x4a, 0x23, 0xf0, 0xaf, 0x43, 0x04,
291
- 0x6f, 0xdb, 0xb0, 0x17, 0x0e, 0xe7, 0x30, 0xd9,
292
- 0x11, 0x1a, 0x61, 0xc0, 0xa1, 0x54, 0x3e, 0x38,
293
- 0x55, 0x8f, 0x81, 0x9e, 0x05, 0x10, 0x46, 0xce,
294
- 0xac, 0x83, 0xde, 0x4a, 0xd5, 0x4e, 0x0c, 0x42,
295
- 0x67, 0xa3, 0x91, 0xe8, 0x20, 0x74, 0x08, 0x01,
296
- 0x5d, 0xef, 0xc1, 0xb6, 0xf1, 0xe3, 0x66, 0xb5,
297
- 0x85, 0x1b, 0x34, 0xe8, 0x84, 0x86, 0xcd, 0x58,
298
- 0x6b, 0xd5, 0xc0, 0x9d, 0x6a, 0xd0, 0x78, 0x4c,
299
- 0xe0, 0x19, 0x9d, 0x57, 0xd6, 0xc0, 0x45, 0xc2,
300
- 0x18, 0xc2, 0xc3, 0xc0, 0x0f, 0x7c, 0x87, 0x12,
301
- 0xea, 0x29, 0x56, 0x2f, 0x99, 0x4f, 0x79, 0xe0,
302
- 0x03, 0x4b, 0x4b, 0x4d, 0x44, 0xa0, 0x92, 0x33,
303
- 0x2a, 0xe0, 0x9a, 0xdc, 0x80, 0x90, 0x52, 0xf1,
304
- 0x11, 0x04, 0x1b, 0x4b, 0x06, 0xea, 0xae, 0x3c,
305
- 0xe3, 0x7a, 0x50, 0x74, 0x4a, 0x84, 0xfe, 0xc3,
306
- 0x81, 0x41, 0xf8, 0x89, 0x18, 0x43, 0x67, 0x9d,
307
- 0x87, 0x47, 0xf5, 0x8c, 0x51, 0xf6, 0x68, 0xb4,
308
- 0xea, 0x55, 0x20, 0x2a, 0x6f, 0x80, 0xdc, 0x42,
309
- 0x2b, 0xf3, 0x14, 0x2b, 0x1a, 0xdb, 0x0f, 0xe4,
310
- 0x9a, 0x64, 0x84, 0xa3, 0x90, 0xa8, 0xf9, 0x8f,
311
- 0x9d, 0x86, 0x9e, 0xd3, 0xab, 0x5a, 0x99, 0xc8,
312
- 0xd9, 0xc3, 0x5e, 0x85, 0x0e, 0x2c, 0xb5, 0x73,
313
- 0x30, 0x38, 0xfb, 0xe8, 0x44, 0xef, 0x5f, 0x95,
314
- 0x1b, 0xc9, 0xd0, 0xef, 0x3c, 0x26, 0x32, 0x1e,
315
- 0xff, 0x2d, 0xb6, 0x23, 0x7b, 0x3f, 0xd1, 0x3c,
316
- 0x78, 0x1a, 0x0d, 0xcb, 0xe6, 0xf6, 0xd4, 0x44,
317
- 0x99, 0x47, 0x1a, 0x9e, 0xed, 0x23, 0xb5, 0x91,
318
- 0x6a, 0xdf, 0x53, 0x39, 0x03, 0xf8, 0x5a, 0xb1,
319
- 0x0f, 0x1f, 0xce, 0x81, 0x11, 0xde, 0x01, 0x7a,
320
- 0x90, 0x16, 0xc4, 0x30, 0xe8, 0x89, 0xed, 0x7b,
321
- 0x65, 0x4b, 0xd7, 0x03, 0x36, 0xc1, 0xcf, 0xa1,
322
- 0xa5, 0xb1, 0xe3, 0x8b, 0xe8, 0x07, 0x4d, 0xf3,
323
- 0x23, 0x25, 0x13, 0x35, 0x27, 0xf5, 0x8c, 0x11,
324
- 0xd3, 0xa0, 0x9a, 0xa8, 0xf5, 0x38, 0x7d, 0xce,
325
- 0x55, 0xc2, 0x71, 0x79, 0x13, 0xc7, 0xa3, 0xda,
326
- 0x77, 0x68, 0xc0, 0xd8, 0x10, 0xdd, 0x24, 0x8b,
327
- 0x15, 0x59, 0xc5, 0x10, 0xe2, 0x20, 0x99, 0x8e,
328
- 0xf0, 0x05, 0x9b, 0x31, 0x88, 0x5a, 0xe3, 0xd9,
329
- 0x37, 0xba, 0xe2, 0xdb, 0xbf, 0x92, 0xfa, 0x66,
330
- 0x16, 0x97, 0x47, 0xd9, 0x9d, 0x1d, 0x28, 0x7c,
331
- 0x9d, 0x08, 0x1c, 0xc7, 0xbd, 0xd2, 0x1a, 0x6a,
332
- 0x04, 0xf2, 0xa2, 0x1d, 0x75, 0x02, 0x14, 0x5d,
333
- 0xc6, 0x78, 0xc8, 0xab, 0xdb, 0xf5, 0xb6, 0x82,
334
- 0x6c, 0xb5, 0x83, 0x87, 0xac, 0x28, 0xb2, 0x55,
335
- 0xb5, 0x9b, 0xc7, 0xc1, 0xb0, 0xb7, 0xf8, 0x4c,
336
- 0xbc, 0x38, 0x0e, 0x8a, 0x04, 0x2a, 0x62, 0x41,
337
- 0x6b, 0xe0, 0x84, 0x09, 0x13, 0xe9, 0xe1, 0xea,
338
- 0xfb, 0xeb, 0x62, 0x71, 0x4b, 0x25, 0xd9, 0x55,
339
- 0x7e, 0x97, 0x57, 0x3b, 0x20, 0x33, 0x96, 0x79,
340
- 0xb5, 0xba, 0x2e, 0x4b, 0x58, 0xae, 0x0b, 0xc8,
341
- 0x60, 0x93, 0x15, 0x55, 0xbe, 0xd8, 0xde, 0x65,
342
- 0x05, 0x6c, 0xb6, 0xc5, 0x66, 0x5d, 0x5e, 0x93,
343
- 0xf7, 0x25, 0x65, 0x98, 0x41, 0x29, 0x86, 0x0c,
344
- 0xf2, 0xf1, 0x14, 0xa2, 0xb3, 0xbd, 0x75, 0x08,
345
- 0x12, 0x83, 0x50, 0xda, 0x1f, 0x23, 0xbe, 0xa3,
346
- 0x1d, 0xf4, 0x9d, 0x1d, 0xb5, 0x84, 0x4e, 0x50,
347
- 0x38, 0x1d, 0x36, 0x48, 0x21, 0x95, 0xd1, 0xac,
348
- 0x81, 0x99, 0x1d, 0xc1, 0x3f, 0x41, 0xe6, 0x9e,
349
- 0x42, 0x5b, 0x0a, 0x48, 0xcc, 0x5f, 0xe0, 0x7d,
350
- 0x3f, 0xc4, 0x6f, 0x0e, 0xfe, 0xc0, 0x2d, 0xfe,
351
- 0x01, 0x2c, 0xd6, 0x9b, 0x5d, 0xbe, 0xba, 0x21,
352
- 0xca, 0x79, 0xcb, 0xe3, 0x49, 0x60, 0xef, 0x68,
353
- 0x05, 0x28, 0x9b, 0x8c, 0xc1, 0x12, 0x3e, 0xdb,
354
- 0xc7, 0x04, 0x7e, 0xa6, 0x74, 0x29, 0xcc, 0x13,
355
- 0xed, 0x07, 0x94, 0x81, 0xd6, 0x96, 0xaa, 0x97,
356
- 0xaa, 0xa5, 0xc0, 0x2f, 0xb5, 0xb5, 0x2e, 0xe6,
357
- 0xfc, 0xca, 0xfa, 0x60, 0x4d, 0x02, 0xf7, 0x19,
358
- 0x9c, 0x5f, 0xa4, 0xe9, 0xf9, 0xf7, 0xf4, 0xc7,
359
- 0x79, 0x9a, 0xc0, 0xb6, 0xcc, 0x58, 0xec, 0xec,
360
- 0xe4, 0x37, 0x22, 0xfa, 0x8b, 0x53,
361
- };
362
-
363
- static unsigned char some_data[] = {
364
- 0x2f, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x54, 0x68,
365
- 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20,
366
- 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20,
367
- 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
368
- 0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61,
369
- 0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74,
370
- 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x69,
371
- 0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72,
372
- 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0a,
373
- 0x20, 0x2a, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e,
374
- 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
375
- 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66,
376
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
377
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
378
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
379
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c,
380
- 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
381
- 0x20, 0x32, 0x2c, 0x0a, 0x20, 0x2a, 0x20, 0x61,
382
- 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,
383
- 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74,
384
- 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
385
- 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
386
- 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
387
- 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x2a, 0x0a,
388
- 0x20, 0x2a, 0x20, 0x49, 0x6e, 0x20, 0x61, 0x64,
389
- 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
390
- 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65,
391
- 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
392
- 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
393
- 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,
394
- 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62,
395
- 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,
396
- 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x20, 0x2a, 0x20,
397
- 0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68,
398
- 0x6f, 0x72, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65,
399
- 0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x6e, 0x6c,
400
- 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x70,
401
- 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
402
- 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6e,
403
- 0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
404
- 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x0a, 0x20,
405
- 0x2a, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
406
- 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69,
407
- 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x69,
408
- 0x6e, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x62,
409
- 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
410
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x74,
411
- 0x68, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67,
412
- 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x0a, 0x20, 0x2a,
413
- 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20,
414
- 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75,
415
- 0x74, 0x65, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65,
416
- 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61,
417
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69,
418
- 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e,
419
- 0x79, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69,
420
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x2a,
421
- 0x20, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x20,
422
- 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65,
423
- 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20,
424
- 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
425
- 0x65, 0x2e, 0x20, 0x20, 0x28, 0x54, 0x68, 0x65,
426
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
427
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
428
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
429
- 0x20, 0x2a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72,
430
- 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20,
431
- 0x64, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79,
432
- 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65,
433
- 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63,
434
- 0x74, 0x73, 0x3b, 0x20, 0x66, 0x6f, 0x72, 0x20,
435
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c,
436
- 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x63, 0x6f,
437
- 0x76, 0x65, 0x72, 0x0a, 0x20, 0x2a, 0x20, 0x6d,
438
- 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
439
- 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74,
440
- 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c,
441
- 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x73,
442
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f,
443
- 0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6e,
444
- 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x65,
445
- 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x0a, 0x20,
446
- 0x2a, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,
447
- 0x69, 0x6e, 0x65, 0x64, 0x20, 0x65, 0x78, 0x65,
448
- 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e,
449
- 0x29, 0x0a, 0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20,
450
- 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
451
- 0x65, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73,
452
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
453
- 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
454
- 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x68, 0x61,
455
- 0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c,
456
- 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65,
457
- 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x62, 0x75, 0x74,
458
- 0x0a, 0x20, 0x2a, 0x20, 0x57, 0x49, 0x54, 0x48,
459
- 0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e, 0x59, 0x20,
460
- 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59,
461
- 0x3b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75,
462
- 0x74, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74,
463
- 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69,
464
- 0x65, 0x64, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61,
465
- 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x0a, 0x20,
466
- 0x2a, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41,
467
- 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
468
- 0x59, 0x20, 0x6f, 0x72, 0x20, 0x46, 0x49, 0x54,
469
- 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52,
470
- 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49,
471
- 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55,
472
- 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e, 0x20, 0x20,
473
- 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
474
- 0x47, 0x4e, 0x55, 0x0a, 0x20, 0x2a, 0x20, 0x47,
475
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,
476
- 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69,
477
- 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f,
478
- 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x64,
479
- 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x0a,
480
- 0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x59, 0x6f,
481
- 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64,
482
- 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65,
483
- 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x61,
484
- 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
485
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
486
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
487
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
488
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
489
- 0x20, 0x2a, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67,
490
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
491
- 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,
492
- 0x61, 0x6d, 0x3b, 0x20, 0x73, 0x65, 0x65, 0x20,
493
- 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65,
494
- 0x20, 0x43, 0x4f, 0x50, 0x59, 0x49, 0x4e, 0x47,
495
- 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f,
496
- 0x74, 0x2c, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65,
497
- 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x2a, 0x20, 0x74,
498
- 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
499
- 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
500
- 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
501
- 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x35, 0x31, 0x20,
502
- 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e,
503
- 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x2c,
504
- 0x20, 0x46, 0x69, 0x66, 0x74, 0x68, 0x20, 0x46,
505
- 0x6c, 0x6f, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x2a,
506
- 0x20, 0x42, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2c,
507
- 0x20, 0x4d, 0x41, 0x20, 0x30, 0x32, 0x31, 0x31,
508
- 0x30, 0x2d, 0x31, 0x33, 0x30, 0x31, 0x2c, 0x20,
509
- 0x55, 0x53, 0x41, 0x2e, 0x0a, 0x20, 0x2a, 0x2f,
510
- 0x0a,
511
- };
512
-
513
- static object_data some = {
514
- some_bytes,
515
- sizeof(some_bytes),
516
- "fd8430bc864cfcd5f10e5590f8a447e01b942bfe",
517
- "blob",
518
- "test-objects/fd",
519
- "test-objects/fd/8430bc864cfcd5f10e5590f8a447e01b942bfe",
520
- some_data,
521
- sizeof(some_data),
522
- };