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,30 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
-
4
- #include "odb.h"
5
-
6
- void test_object_raw_fromstr__fail_on_invalid_oid_string(void)
7
- {
8
- git_oid out;
9
- cl_git_fail(git_oid_fromstr(&out, ""));
10
- cl_git_fail(git_oid_fromstr(&out, "moo"));
11
- cl_git_fail(git_oid_fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5ez"));
12
- }
13
-
14
- void test_object_raw_fromstr__succeed_on_valid_oid_string(void)
15
- {
16
- git_oid out;
17
- unsigned char exp[] = {
18
- 0x16, 0xa6, 0x77, 0x70, 0xb7,
19
- 0xd8, 0xd7, 0x23, 0x17, 0xc4,
20
- 0xb7, 0x75, 0x21, 0x3c, 0x23,
21
- 0xa8, 0xbd, 0x74, 0xf5, 0xe0,
22
- };
23
-
24
- cl_git_pass(git_oid_fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5e0"));
25
- cl_git_pass(memcmp(out.id, exp, sizeof(out.id)));
26
-
27
- cl_git_pass(git_oid_fromstr(&out, "16A67770B7D8D72317C4b775213C23A8BD74F5E0"));
28
- cl_git_pass(memcmp(out.id, exp, sizeof(out.id)));
29
-
30
- }
@@ -1,166 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
-
4
- #include "odb.h"
5
- #include "hash.h"
6
-
7
- #include "data.h"
8
-
9
- static void hash_object_pass(git_oid *oid, git_rawobj *obj)
10
- {
11
- cl_git_pass(git_odb_hash(oid, obj->data, obj->len, obj->type));
12
- }
13
- static void hash_object_fail(git_oid *oid, git_rawobj *obj)
14
- {
15
- cl_git_fail(git_odb_hash(oid, obj->data, obj->len, obj->type));
16
- }
17
-
18
- static char *hello_id = "22596363b3de40b06f981fb85d82312e8c0ed511";
19
- static char *hello_text = "hello world\n";
20
-
21
- static char *bye_id = "ce08fe4884650f067bd5703b6a59a8b3b3c99a09";
22
- static char *bye_text = "bye world\n";
23
-
24
- void test_object_raw_hash__hash_by_blocks(void)
25
- {
26
- git_hash_ctx *ctx;
27
- git_oid id1, id2;
28
-
29
- cl_assert((ctx = git_hash_new_ctx()) != NULL);
30
-
31
- /* should already be init'd */
32
- git_hash_update(ctx, hello_text, strlen(hello_text));
33
- git_hash_final(&id2, ctx);
34
- cl_git_pass(git_oid_fromstr(&id1, hello_id));
35
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
36
-
37
- /* reinit should permit reuse */
38
- git_hash_init(ctx);
39
- git_hash_update(ctx, bye_text, strlen(bye_text));
40
- git_hash_final(&id2, ctx);
41
- cl_git_pass(git_oid_fromstr(&id1, bye_id));
42
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
43
-
44
- git_hash_free_ctx(ctx);
45
- }
46
-
47
- void test_object_raw_hash__hash_buffer_in_single_call(void)
48
- {
49
- git_oid id1, id2;
50
-
51
- cl_git_pass(git_oid_fromstr(&id1, hello_id));
52
- git_hash_buf(&id2, hello_text, strlen(hello_text));
53
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
54
- }
55
-
56
- void test_object_raw_hash__hash_vector(void)
57
- {
58
- git_oid id1, id2;
59
- git_buf_vec vec[2];
60
-
61
- cl_git_pass(git_oid_fromstr(&id1, hello_id));
62
-
63
- vec[0].data = hello_text;
64
- vec[0].len = 4;
65
- vec[1].data = hello_text+4;
66
- vec[1].len = strlen(hello_text)-4;
67
-
68
- git_hash_vec(&id2, vec, 2);
69
-
70
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
71
- }
72
-
73
- void test_object_raw_hash__hash_junk_data(void)
74
- {
75
- git_oid id, id_zero;
76
-
77
- cl_git_pass(git_oid_fromstr(&id_zero, zero_id));
78
-
79
- /* invalid types: */
80
- junk_obj.data = some_data;
81
- hash_object_fail(&id, &junk_obj);
82
-
83
- junk_obj.type = GIT_OBJ__EXT1;
84
- hash_object_fail(&id, &junk_obj);
85
-
86
- junk_obj.type = GIT_OBJ__EXT2;
87
- hash_object_fail(&id, &junk_obj);
88
-
89
- junk_obj.type = GIT_OBJ_OFS_DELTA;
90
- hash_object_fail(&id, &junk_obj);
91
-
92
- junk_obj.type = GIT_OBJ_REF_DELTA;
93
- hash_object_fail(&id, &junk_obj);
94
-
95
- /* data can be NULL only if len is zero: */
96
- junk_obj.type = GIT_OBJ_BLOB;
97
- junk_obj.data = NULL;
98
- hash_object_pass(&id, &junk_obj);
99
- cl_assert(git_oid_cmp(&id, &id_zero) == 0);
100
-
101
- junk_obj.len = 1;
102
- hash_object_fail(&id, &junk_obj);
103
- }
104
-
105
- void test_object_raw_hash__hash_commit_object(void)
106
- {
107
- git_oid id1, id2;
108
-
109
- cl_git_pass(git_oid_fromstr(&id1, commit_id));
110
- hash_object_pass(&id2, &commit_obj);
111
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
112
- }
113
-
114
- void test_object_raw_hash__hash_tree_object(void)
115
- {
116
- git_oid id1, id2;
117
-
118
- cl_git_pass(git_oid_fromstr(&id1, tree_id));
119
- hash_object_pass(&id2, &tree_obj);
120
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
121
- }
122
-
123
- void test_object_raw_hash__hash_tag_object(void)
124
- {
125
- git_oid id1, id2;
126
-
127
- cl_git_pass(git_oid_fromstr(&id1, tag_id));
128
- hash_object_pass(&id2, &tag_obj);
129
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
130
- }
131
-
132
- void test_object_raw_hash__hash_zero_length_object(void)
133
- {
134
- git_oid id1, id2;
135
-
136
- cl_git_pass(git_oid_fromstr(&id1, zero_id));
137
- hash_object_pass(&id2, &zero_obj);
138
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
139
- }
140
-
141
- void test_object_raw_hash__hash_one_byte_object(void)
142
- {
143
- git_oid id1, id2;
144
-
145
- cl_git_pass(git_oid_fromstr(&id1, one_id));
146
- hash_object_pass(&id2, &one_obj);
147
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
148
- }
149
-
150
- void test_object_raw_hash__hash_two_byte_object(void)
151
- {
152
- git_oid id1, id2;
153
-
154
- cl_git_pass(git_oid_fromstr(&id1, two_id));
155
- hash_object_pass(&id2, &two_obj);
156
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
157
- }
158
-
159
- void test_object_raw_hash__hash_multi_byte_object(void)
160
- {
161
- git_oid id1, id2;
162
-
163
- cl_git_pass(git_oid_fromstr(&id1, some_id));
164
- hash_object_pass(&id2, &some_obj);
165
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
166
- }
@@ -1,94 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
-
4
- #include "odb.h"
5
- #include "hash.h"
6
-
7
- void test_object_raw_short__oid_shortener_no_duplicates(void)
8
- {
9
- git_oid_shorten *os;
10
- int min_len;
11
-
12
- os = git_oid_shorten_new(0);
13
- cl_assert(os != NULL);
14
-
15
- git_oid_shorten_add(os, "22596363b3de40b06f981fb85d82312e8c0ed511");
16
- git_oid_shorten_add(os, "ce08fe4884650f067bd5703b6a59a8b3b3c99a09");
17
- git_oid_shorten_add(os, "16a0123456789abcdef4b775213c23a8bd74f5e0");
18
- min_len = git_oid_shorten_add(os, "ce08fe4884650f067bd5703b6a59a8b3b3c99a09");
19
-
20
- cl_assert(min_len == GIT_OID_HEXSZ + 1);
21
-
22
- git_oid_shorten_free(os);
23
- }
24
-
25
- void test_object_raw_short__oid_shortener_stresstest_git_oid_shorten(void)
26
- {
27
- #define MAX_OIDS 1000
28
-
29
- git_oid_shorten *os;
30
- char *oids[MAX_OIDS];
31
- char number_buffer[16];
32
- git_oid oid;
33
- size_t i, j;
34
-
35
- int min_len = 0, found_collision;
36
-
37
- os = git_oid_shorten_new(0);
38
- cl_assert(os != NULL);
39
-
40
- /*
41
- * Insert in the shortener 1000 unique SHA1 ids
42
- */
43
- for (i = 0; i < MAX_OIDS; ++i) {
44
- char *oid_text;
45
-
46
- sprintf(number_buffer, "%u", (unsigned int)i);
47
- git_hash_buf(&oid, number_buffer, strlen(number_buffer));
48
-
49
- oid_text = git__malloc(GIT_OID_HEXSZ + 1);
50
- git_oid_fmt(oid_text, &oid);
51
- oid_text[GIT_OID_HEXSZ] = 0;
52
-
53
- min_len = git_oid_shorten_add(os, oid_text);
54
- cl_assert(min_len >= 0);
55
-
56
- oids[i] = oid_text;
57
- }
58
-
59
- /*
60
- * Compare the first `min_char - 1` characters of each
61
- * SHA1 OID. If the minimizer worked, we should find at
62
- * least one collision
63
- */
64
- found_collision = 0;
65
- for (i = 0; i < MAX_OIDS; ++i) {
66
- for (j = 0; j < MAX_OIDS; ++j) {
67
- if (i != j && memcmp(oids[i], oids[j], min_len - 1) == 0)
68
- found_collision = 1;
69
- }
70
- }
71
- cl_assert(found_collision == 1);
72
-
73
- /*
74
- * Compare the first `min_char` characters of each
75
- * SHA1 OID. If the minimizer worked, every single preffix
76
- * should be unique.
77
- */
78
- found_collision = 0;
79
- for (i = 0; i < MAX_OIDS; ++i) {
80
- for (j = 0; j < MAX_OIDS; ++j) {
81
- if (i != j && memcmp(oids[i], oids[j], min_len) == 0)
82
- found_collision = 1;
83
- }
84
- }
85
- cl_assert(found_collision == 0);
86
-
87
- /* cleanup */
88
- for (i = 0; i < MAX_OIDS; ++i)
89
- git__free(oids[i]);
90
-
91
- git_oid_shorten_free(os);
92
-
93
- #undef MAX_OIDS
94
- }
@@ -1,13 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
-
4
- #include "odb.h"
5
-
6
- void test_object_raw_size__validate_oid_size(void)
7
- {
8
- git_oid out;
9
- cl_assert(20 == GIT_OID_RAWSZ);
10
- cl_assert(40 == GIT_OID_HEXSZ);
11
- cl_assert(sizeof(out) == GIT_OID_RAWSZ);
12
- cl_assert(sizeof(out.id) == GIT_OID_RAWSZ);
13
- }
@@ -1,54 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
-
4
- #include "odb.h"
5
- #include "hash.h"
6
-
7
- void test_object_raw_type2string__convert_type_to_string(void)
8
- {
9
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_BAD), "");
10
- cl_assert_equal_s(git_object_type2string(GIT_OBJ__EXT1), "");
11
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_COMMIT), "commit");
12
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_TREE), "tree");
13
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_BLOB), "blob");
14
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_TAG), "tag");
15
- cl_assert_equal_s(git_object_type2string(GIT_OBJ__EXT2), "");
16
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_OFS_DELTA), "OFS_DELTA");
17
- cl_assert_equal_s(git_object_type2string(GIT_OBJ_REF_DELTA), "REF_DELTA");
18
-
19
- cl_assert_equal_s(git_object_type2string(-2), "");
20
- cl_assert_equal_s(git_object_type2string(8), "");
21
- cl_assert_equal_s(git_object_type2string(1234), "");
22
- }
23
-
24
- void test_object_raw_type2string__convert_string_to_type(void)
25
- {
26
- cl_assert(git_object_string2type(NULL) == GIT_OBJ_BAD);
27
- cl_assert(git_object_string2type("") == GIT_OBJ_BAD);
28
- cl_assert(git_object_string2type("commit") == GIT_OBJ_COMMIT);
29
- cl_assert(git_object_string2type("tree") == GIT_OBJ_TREE);
30
- cl_assert(git_object_string2type("blob") == GIT_OBJ_BLOB);
31
- cl_assert(git_object_string2type("tag") == GIT_OBJ_TAG);
32
- cl_assert(git_object_string2type("OFS_DELTA") == GIT_OBJ_OFS_DELTA);
33
- cl_assert(git_object_string2type("REF_DELTA") == GIT_OBJ_REF_DELTA);
34
-
35
- cl_assert(git_object_string2type("CoMmIt") == GIT_OBJ_BAD);
36
- cl_assert(git_object_string2type("hohoho") == GIT_OBJ_BAD);
37
- }
38
-
39
- void test_object_raw_type2string__check_type_is_loose(void)
40
- {
41
- cl_assert(git_object_typeisloose(GIT_OBJ_BAD) == 0);
42
- cl_assert(git_object_typeisloose(GIT_OBJ__EXT1) == 0);
43
- cl_assert(git_object_typeisloose(GIT_OBJ_COMMIT) == 1);
44
- cl_assert(git_object_typeisloose(GIT_OBJ_TREE) == 1);
45
- cl_assert(git_object_typeisloose(GIT_OBJ_BLOB) == 1);
46
- cl_assert(git_object_typeisloose(GIT_OBJ_TAG) == 1);
47
- cl_assert(git_object_typeisloose(GIT_OBJ__EXT2) == 0);
48
- cl_assert(git_object_typeisloose(GIT_OBJ_OFS_DELTA) == 0);
49
- cl_assert(git_object_typeisloose(GIT_OBJ_REF_DELTA) == 0);
50
-
51
- cl_assert(git_object_typeisloose(-2) == 0);
52
- cl_assert(git_object_typeisloose(8) == 0);
53
- cl_assert(git_object_typeisloose(1234) == 0);
54
- }
@@ -1,455 +0,0 @@
1
-
2
- #include "clar_libgit2.h"
3
- #include "fileops.h"
4
- #include "odb.h"
5
-
6
- typedef struct object_data {
7
- char *id; /* object id (sha1) */
8
- char *dir; /* object store (fan-out) directory name */
9
- char *file; /* object store filename */
10
- } object_data;
11
-
12
- static const char *odb_dir = "test-objects";
13
-
14
- void test_body(object_data *d, git_rawobj *o);
15
-
16
-
17
-
18
- // Helpers
19
- static void remove_object_files(object_data *d)
20
- {
21
- cl_git_pass(p_unlink(d->file));
22
- cl_git_pass(p_rmdir(d->dir));
23
- cl_assert(errno != ENOTEMPTY);
24
- cl_git_pass(p_rmdir(odb_dir) < 0);
25
- }
26
-
27
- static void streaming_write(git_oid *oid, git_odb *odb, git_rawobj *raw)
28
- {
29
- git_odb_stream *stream;
30
- int error;
31
-
32
- cl_git_pass(git_odb_open_wstream(&stream, odb, raw->len, raw->type));
33
- stream->write(stream, raw->data, raw->len);
34
- error = stream->finalize_write(oid, stream);
35
- stream->free(stream);
36
- cl_git_pass(error);
37
- }
38
-
39
- static void check_object_files(object_data *d)
40
- {
41
- cl_assert(git_path_exists(d->dir));
42
- cl_assert(git_path_exists(d->file));
43
- }
44
-
45
- static void cmp_objects(git_rawobj *o1, git_rawobj *o2)
46
- {
47
- cl_assert(o1->type == o2->type);
48
- cl_assert(o1->len == o2->len);
49
- if (o1->len > 0)
50
- cl_assert(memcmp(o1->data, o2->data, o1->len) == 0);
51
- }
52
-
53
- static void make_odb_dir(void)
54
- {
55
- cl_git_pass(p_mkdir(odb_dir, GIT_OBJECT_DIR_MODE));
56
- }
57
-
58
-
59
- // Standard test form
60
- void test_body(object_data *d, git_rawobj *o)
61
- {
62
- git_odb *db;
63
- git_oid id1, id2;
64
- git_odb_object *obj;
65
-
66
- make_odb_dir();
67
- cl_git_pass(git_odb_open(&db, odb_dir));
68
- cl_git_pass(git_oid_fromstr(&id1, d->id));
69
-
70
- streaming_write(&id2, db, o);
71
- cl_assert(git_oid_cmp(&id1, &id2) == 0);
72
- check_object_files(d);
73
-
74
- cl_git_pass(git_odb_read(&obj, db, &id1));
75
- cmp_objects(&obj->raw, o);
76
-
77
- git_odb_object_free(obj);
78
- git_odb_free(db);
79
- remove_object_files(d);
80
- }
81
-
82
-
83
- void test_object_raw_write__loose_object(void)
84
- {
85
- object_data commit = {
86
- "3d7f8a6af076c8c3f20071a8935cdbe8228594d1",
87
- "test-objects/3d",
88
- "test-objects/3d/7f8a6af076c8c3f20071a8935cdbe8228594d1",
89
- };
90
-
91
- unsigned char commit_data[] = {
92
- 0x74, 0x72, 0x65, 0x65, 0x20, 0x64, 0x66, 0x66,
93
- 0x32, 0x64, 0x61, 0x39, 0x30, 0x62, 0x32, 0x35,
94
- 0x34, 0x65, 0x31, 0x62, 0x65, 0x62, 0x38, 0x38,
95
- 0x39, 0x64, 0x31, 0x66, 0x31, 0x66, 0x31, 0x32,
96
- 0x38, 0x38, 0x62, 0x65, 0x31, 0x38, 0x30, 0x33,
97
- 0x37, 0x38, 0x32, 0x64, 0x66, 0x0a, 0x61, 0x75,
98
- 0x74, 0x68, 0x6f, 0x72, 0x20, 0x41, 0x20, 0x55,
99
- 0x20, 0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61,
100
- 0x75, 0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78,
101
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
102
- 0x6d, 0x3e, 0x20, 0x31, 0x32, 0x32, 0x37, 0x38,
103
- 0x31, 0x34, 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30,
104
- 0x30, 0x30, 0x30, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
105
- 0x69, 0x74, 0x74, 0x65, 0x72, 0x20, 0x43, 0x20,
106
- 0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
107
- 0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
108
- 0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
109
- 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
110
- 0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
111
- 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
112
- 0x30, 0x0a, 0x0a, 0x41, 0x20, 0x6f, 0x6e, 0x65,
113
- 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f,
114
- 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x73, 0x75, 0x6d,
115
- 0x6d, 0x61, 0x72, 0x79, 0x0a, 0x0a, 0x54, 0x68,
116
- 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6f,
117
- 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
118
- 0x6d, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x65, 0x73,
119
- 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x63, 0x6f,
120
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
121
- 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72,
122
- 0x20, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61,
123
- 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x6f, 0x66, 0x20,
124
- 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x72, 0x70,
125
- 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74,
126
- 0x68, 0x65, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67,
127
- 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f,
128
- 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79,
129
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d,
130
- 0x6d, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x53, 0x69,
131
- 0x67, 0x6e, 0x65, 0x64, 0x2d, 0x6f, 0x66, 0x2d,
132
- 0x62, 0x79, 0x3a, 0x20, 0x41, 0x20, 0x55, 0x20,
133
- 0x54, 0x68, 0x6f, 0x72, 0x20, 0x3c, 0x61, 0x75,
134
- 0x74, 0x68, 0x6f, 0x72, 0x40, 0x65, 0x78, 0x61,
135
- 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
136
- 0x3e, 0x0a,
137
- };
138
-
139
- git_rawobj commit_obj = {
140
- commit_data,
141
- sizeof(commit_data),
142
- GIT_OBJ_COMMIT
143
- };
144
-
145
- test_body(&commit, &commit_obj);
146
- }
147
-
148
- void test_object_raw_write__loose_tree(void)
149
- {
150
- static object_data tree = {
151
- "dff2da90b254e1beb889d1f1f1288be1803782df",
152
- "test-objects/df",
153
- "test-objects/df/f2da90b254e1beb889d1f1f1288be1803782df",
154
- };
155
-
156
- static unsigned char tree_data[] = {
157
- 0x31, 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x6f,
158
- 0x6e, 0x65, 0x00, 0x8b, 0x13, 0x78, 0x91, 0x79,
159
- 0x1f, 0xe9, 0x69, 0x27, 0xad, 0x78, 0xe6, 0x4b,
160
- 0x0a, 0xad, 0x7b, 0xde, 0xd0, 0x8b, 0xdc, 0x31,
161
- 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x73, 0x6f,
162
- 0x6d, 0x65, 0x00, 0xfd, 0x84, 0x30, 0xbc, 0x86,
163
- 0x4c, 0xfc, 0xd5, 0xf1, 0x0e, 0x55, 0x90, 0xf8,
164
- 0xa4, 0x47, 0xe0, 0x1b, 0x94, 0x2b, 0xfe, 0x31,
165
- 0x30, 0x30, 0x36, 0x34, 0x34, 0x20, 0x74, 0x77,
166
- 0x6f, 0x00, 0x78, 0x98, 0x19, 0x22, 0x61, 0x3b,
167
- 0x2a, 0xfb, 0x60, 0x25, 0x04, 0x2f, 0xf6, 0xbd,
168
- 0x87, 0x8a, 0xc1, 0x99, 0x4e, 0x85, 0x31, 0x30,
169
- 0x30, 0x36, 0x34, 0x34, 0x20, 0x7a, 0x65, 0x72,
170
- 0x6f, 0x00, 0xe6, 0x9d, 0xe2, 0x9b, 0xb2, 0xd1,
171
- 0xd6, 0x43, 0x4b, 0x8b, 0x29, 0xae, 0x77, 0x5a,
172
- 0xd8, 0xc2, 0xe4, 0x8c, 0x53, 0x91,
173
- };
174
-
175
- static git_rawobj tree_obj = {
176
- tree_data,
177
- sizeof(tree_data),
178
- GIT_OBJ_TREE
179
- };
180
-
181
- test_body(&tree, &tree_obj);
182
- }
183
-
184
- void test_object_raw_write__loose_tag(void)
185
- {
186
- static object_data tag = {
187
- "09d373e1dfdc16b129ceec6dd649739911541e05",
188
- "test-objects/09",
189
- "test-objects/09/d373e1dfdc16b129ceec6dd649739911541e05",
190
- };
191
-
192
- static unsigned char tag_data[] = {
193
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x33,
194
- 0x64, 0x37, 0x66, 0x38, 0x61, 0x36, 0x61, 0x66,
195
- 0x30, 0x37, 0x36, 0x63, 0x38, 0x63, 0x33, 0x66,
196
- 0x32, 0x30, 0x30, 0x37, 0x31, 0x61, 0x38, 0x39,
197
- 0x33, 0x35, 0x63, 0x64, 0x62, 0x65, 0x38, 0x32,
198
- 0x32, 0x38, 0x35, 0x39, 0x34, 0x64, 0x31, 0x0a,
199
- 0x74, 0x79, 0x70, 0x65, 0x20, 0x63, 0x6f, 0x6d,
200
- 0x6d, 0x69, 0x74, 0x0a, 0x74, 0x61, 0x67, 0x20,
201
- 0x76, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x0a, 0x74,
202
- 0x61, 0x67, 0x67, 0x65, 0x72, 0x20, 0x43, 0x20,
203
- 0x4f, 0x20, 0x4d, 0x69, 0x74, 0x74, 0x65, 0x72,
204
- 0x20, 0x3c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
205
- 0x74, 0x65, 0x72, 0x40, 0x65, 0x78, 0x61, 0x6d,
206
- 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x3e,
207
- 0x20, 0x31, 0x32, 0x32, 0x37, 0x38, 0x31, 0x34,
208
- 0x32, 0x39, 0x37, 0x20, 0x2b, 0x30, 0x30, 0x30,
209
- 0x30, 0x0a, 0x0a, 0x54, 0x68, 0x69, 0x73, 0x20,
210
- 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74,
211
- 0x61, 0x67, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
212
- 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65,
213
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x76, 0x30,
214
- 0x2e, 0x30, 0x2e, 0x31, 0x0a,
215
- };
216
-
217
- static git_rawobj tag_obj = {
218
- tag_data,
219
- sizeof(tag_data),
220
- GIT_OBJ_TAG
221
- };
222
-
223
-
224
- test_body(&tag, &tag_obj);
225
- }
226
-
227
- void test_object_raw_write__zero_length(void)
228
- {
229
- static object_data zero = {
230
- "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
231
- "test-objects/e6",
232
- "test-objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391",
233
- };
234
-
235
- static unsigned char zero_data[] = {
236
- 0x00 /* dummy data */
237
- };
238
-
239
- static git_rawobj zero_obj = {
240
- zero_data,
241
- 0,
242
- GIT_OBJ_BLOB
243
- };
244
-
245
- test_body(&zero, &zero_obj);
246
- }
247
-
248
- void test_object_raw_write__one_byte(void)
249
- {
250
- static object_data one = {
251
- "8b137891791fe96927ad78e64b0aad7bded08bdc",
252
- "test-objects/8b",
253
- "test-objects/8b/137891791fe96927ad78e64b0aad7bded08bdc",
254
- };
255
-
256
- static unsigned char one_data[] = {
257
- 0x0a,
258
- };
259
-
260
- static git_rawobj one_obj = {
261
- one_data,
262
- sizeof(one_data),
263
- GIT_OBJ_BLOB
264
- };
265
-
266
- test_body(&one, &one_obj);
267
- }
268
-
269
- void test_object_raw_write__two_byte(void)
270
- {
271
- static object_data two = {
272
- "78981922613b2afb6025042ff6bd878ac1994e85",
273
- "test-objects/78",
274
- "test-objects/78/981922613b2afb6025042ff6bd878ac1994e85",
275
- };
276
-
277
- static unsigned char two_data[] = {
278
- 0x61, 0x0a,
279
- };
280
-
281
- static git_rawobj two_obj = {
282
- two_data,
283
- sizeof(two_data),
284
- GIT_OBJ_BLOB
285
- };
286
-
287
- test_body(&two, &two_obj);
288
- }
289
-
290
- void test_object_raw_write__several_bytes(void)
291
- {
292
- static object_data some = {
293
- "fd8430bc864cfcd5f10e5590f8a447e01b942bfe",
294
- "test-objects/fd",
295
- "test-objects/fd/8430bc864cfcd5f10e5590f8a447e01b942bfe",
296
- };
297
-
298
- static unsigned char some_data[] = {
299
- 0x2f, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x54, 0x68,
300
- 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20,
301
- 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20,
302
- 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
303
- 0x3b, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61,
304
- 0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74,
305
- 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x69,
306
- 0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72,
307
- 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0a,
308
- 0x20, 0x2a, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e,
309
- 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
310
- 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66,
311
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
312
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
313
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
314
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c,
315
- 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
316
- 0x20, 0x32, 0x2c, 0x0a, 0x20, 0x2a, 0x20, 0x61,
317
- 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,
318
- 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74,
319
- 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
320
- 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
321
- 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
322
- 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x2a, 0x0a,
323
- 0x20, 0x2a, 0x20, 0x49, 0x6e, 0x20, 0x61, 0x64,
324
- 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
325
- 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65,
326
- 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
327
- 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
328
- 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,
329
- 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62,
330
- 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,
331
- 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x20, 0x2a, 0x20,
332
- 0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68,
333
- 0x6f, 0x72, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65,
334
- 0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x6e, 0x6c,
335
- 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x70,
336
- 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
337
- 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6e,
338
- 0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
339
- 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x0a, 0x20,
340
- 0x2a, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
341
- 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69,
342
- 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x69,
343
- 0x6e, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x62,
344
- 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
345
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x74,
346
- 0x68, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67,
347
- 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x0a, 0x20, 0x2a,
348
- 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20,
349
- 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75,
350
- 0x74, 0x65, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65,
351
- 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61,
352
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69,
353
- 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e,
354
- 0x79, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69,
355
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x2a,
356
- 0x20, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x20,
357
- 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65,
358
- 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20,
359
- 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
360
- 0x65, 0x2e, 0x20, 0x20, 0x28, 0x54, 0x68, 0x65,
361
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
362
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
363
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
364
- 0x20, 0x2a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72,
365
- 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20,
366
- 0x64, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79,
367
- 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65,
368
- 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63,
369
- 0x74, 0x73, 0x3b, 0x20, 0x66, 0x6f, 0x72, 0x20,
370
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c,
371
- 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x63, 0x6f,
372
- 0x76, 0x65, 0x72, 0x0a, 0x20, 0x2a, 0x20, 0x6d,
373
- 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
374
- 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74,
375
- 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c,
376
- 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x69, 0x73,
377
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f,
378
- 0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6e,
379
- 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x65,
380
- 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x0a, 0x20,
381
- 0x2a, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x62,
382
- 0x69, 0x6e, 0x65, 0x64, 0x20, 0x65, 0x78, 0x65,
383
- 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e,
384
- 0x29, 0x0a, 0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20,
385
- 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c,
386
- 0x65, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73,
387
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
388
- 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
389
- 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x68, 0x61,
390
- 0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c,
391
- 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65,
392
- 0x66, 0x75, 0x6c, 0x2c, 0x20, 0x62, 0x75, 0x74,
393
- 0x0a, 0x20, 0x2a, 0x20, 0x57, 0x49, 0x54, 0x48,
394
- 0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e, 0x59, 0x20,
395
- 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59,
396
- 0x3b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75,
397
- 0x74, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74,
398
- 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69,
399
- 0x65, 0x64, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61,
400
- 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x0a, 0x20,
401
- 0x2a, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41,
402
- 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
403
- 0x59, 0x20, 0x6f, 0x72, 0x20, 0x46, 0x49, 0x54,
404
- 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52,
405
- 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49,
406
- 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55,
407
- 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e, 0x20, 0x20,
408
- 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
409
- 0x47, 0x4e, 0x55, 0x0a, 0x20, 0x2a, 0x20, 0x47,
410
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50,
411
- 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69,
412
- 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f,
413
- 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x64,
414
- 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x0a,
415
- 0x20, 0x2a, 0x0a, 0x20, 0x2a, 0x20, 0x59, 0x6f,
416
- 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64,
417
- 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65,
418
- 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x61,
419
- 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
420
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55,
421
- 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
422
- 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
423
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a,
424
- 0x20, 0x2a, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67,
425
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
426
- 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,
427
- 0x61, 0x6d, 0x3b, 0x20, 0x73, 0x65, 0x65, 0x20,
428
- 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65,
429
- 0x20, 0x43, 0x4f, 0x50, 0x59, 0x49, 0x4e, 0x47,
430
- 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f,
431
- 0x74, 0x2c, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65,
432
- 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x2a, 0x20, 0x74,
433
- 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20,
434
- 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
435
- 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74,
436
- 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x35, 0x31, 0x20,
437
- 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e,
438
- 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x2c,
439
- 0x20, 0x46, 0x69, 0x66, 0x74, 0x68, 0x20, 0x46,
440
- 0x6c, 0x6f, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x2a,
441
- 0x20, 0x42, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2c,
442
- 0x20, 0x4d, 0x41, 0x20, 0x30, 0x32, 0x31, 0x31,
443
- 0x30, 0x2d, 0x31, 0x33, 0x30, 0x31, 0x2c, 0x20,
444
- 0x55, 0x53, 0x41, 0x2e, 0x0a, 0x20, 0x2a, 0x2f,
445
- 0x0a,
446
- };
447
-
448
- static git_rawobj some_obj = {
449
- some_data,
450
- sizeof(some_data),
451
- GIT_OBJ_BLOB
452
- };
453
-
454
- test_body(&some, &some_obj);
455
- }