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,24 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "odb.h"
3
-
4
- static git_odb *_odb;
5
-
6
- void test_odb_mixed__initialize(void)
7
- {
8
- cl_git_pass(git_odb_open(&_odb, cl_fixture("duplicate.git/objects")));
9
- }
10
-
11
- void test_odb_mixed__cleanup(void)
12
- {
13
- git_odb_free(_odb);
14
- }
15
-
16
- void test_odb_mixed__dup_oid(void) {
17
- const char hex[] = "ce013625030ba8dba906f756967f9e9ca394464a";
18
- git_oid oid;
19
- git_odb_object *obj;
20
- cl_git_pass(git_oid_fromstr(&oid, hex));
21
- cl_git_pass(git_odb_read_prefix(&obj, _odb, &oid, GIT_OID_HEXSZ));
22
- git_odb_object_free(obj);
23
- }
24
-
@@ -1,151 +0,0 @@
1
-
2
- static const char *packed_objects[] = {
3
- "0266163a49e280c4f5ed1e08facd36a2bd716bcf",
4
- "53fc32d17276939fc79ed05badaef2db09990016",
5
- "6336846bd5c88d32f93ae57d846683e61ab5c530",
6
- "6dcf9bf7541ee10456529833502442f385010c3d",
7
- "bed08a0b30b72a9d4aed7f1af8c8ca124e8d64b9",
8
- "e90810b8df3e80c413d903f631643c716887138d",
9
- "fc3c3a2083e9f6f89e6bd53e9420e70d1e357c9b",
10
- "fc58168adf502d0c0ef614c3111a7038fc8c09c8",
11
- "fd0ec0333948dfe23265ac46be0205a436a8c3a5",
12
- "fd8430bc864cfcd5f10e5590f8a447e01b942bfe",
13
- "fd899f45951c15c1c5f7c34b1c864e91bd6556c6",
14
- "fda23b974899e7e1f938619099280bfda13bdca9",
15
- "fdbec189efb657c8325962b494875987881a356b",
16
- "fe1ca6bd22b5d8353ce6c2f3aba80805c438a7a5",
17
- "fe3a6a42c87ff1239370c741a265f3997add87c1",
18
- "deb106bfd2d36ecf9f0079224c12022201a39ad1",
19
- "dec93efc79e60f2680de3e666755d335967eec30",
20
- "def425bf8568b9c1e20879bf5be6f9c52b7361c4",
21
- "df48000ac4f48570054e3a71a81916357997b680",
22
- "dfae6ed8f6dd8acc3b40a31811ea316239223559",
23
- "dff79e27d3d2cdc09790ded80fe2ea8ff5d61034",
24
- "e00e46abe4c542e17c8bc83d72cf5be8018d7b0e",
25
- "e01b107b4f77f8f98645adac0206a504f2d29d7c",
26
- "e032d863f512c47b479bd984f8b6c8061f66b7d4",
27
- "e044baa468a1c74f9f9da36805445f6888358b49",
28
- "e04529998989ba8ae3419538dd57969af819b241",
29
- "e0637ddfbea67c8d7f557c709e095af8906e9176",
30
- "e0743ad4031231e71700abdc6fdbe94f189d20e5",
31
- "cf33ac7a3d8b2b8f6bb266518aadbf59de397608",
32
- "cf5f7235b9c9689b133f6ea12015720b411329bd",
33
- "cf6cccf1297284833a9a03138a1f5738fa1c6c94",
34
- "cf7992bde17ce7a79cab5f0c1fcbe8a0108721ed",
35
- "cfe3a027ab12506d4144ee8a35669ae8fc4b7ab1",
36
- "cfe96f31dfad7bab49977aa1df7302f7fafcb025",
37
- "cff54d138945ef4de384e9d2759291d0c13ea90a",
38
- "d01f7573ac34c2f502bd1cf18cde73480c741151",
39
- "d03f567593f346a1ca96a57f8191def098d126e3",
40
- "d047b47aadf88501238f36f5c17dd0a50dc62087",
41
- "d0a0d63086fae3b0682af7261df21f7d0f7f066d",
42
- "d0a44bd6ed0be21b725a96c0891bbc79bc1a540c",
43
- "d0d7e736e536a41bcb885005f8bf258c61cad682",
44
- "d0e7959d4b95ffec6198df6f5a7ae259b23a5f50",
45
- "bf2fe2acca17d13356ce802ba9dc8343f710dfb7",
46
- "bf55f407d6d9418e51f42ea7a3a6aadf17388349",
47
- "bf92206f8b633b88a66dca4a911777630b06fbac",
48
- "bfaf8c42eb8842abe206179fee864cfba87e3ca9",
49
- "bfe05675d4e8f6b59d50932add8790f1a06b10ee",
50
- "bff8618112330763327cfa6ce6e914db84f51ddf",
51
- "bff873e9853ed99fed52c25f7ad29f78b27dcec2",
52
- "c01c3fae7251098d7af1b459bcd0786e81d4616d",
53
- "c0220fca67f48b8a5d4163d53b1486224be3a198",
54
- "c02d0b160b82ee72469c269f13de4c26a7ea09cb",
55
- "c059510ad1b45ab58390e042d7dee1ac46703854",
56
- "c07204a1897aeeaa3c248d29dbfa9b033baf9755",
57
- "c073337a4dd7276931b4b3fdbc3f0040e9441793",
58
- "0fd7e4bfba5b3a82be88d1057757ca8b2c5e6d26",
59
- "100746511cc45c9f1ad6721c4ef5be49222fee4d",
60
- "1088490171d9b984d68b8b9be9ca003f4eafff59",
61
- "1093c8ff4cb78fcf5f79dbbeedcb6e824bd4e253",
62
- "10aa3fa72afab7ee31e116ae06442fe0f7b79df2",
63
- "10b759e734e8299aa0dca08be935d95d886127b6",
64
- "111d5ccf0bb010c4e8d7af3eedfa12ef4c5e265b",
65
- "11261fbff21758444d426356ff6327ee01e90752",
66
- "112998d425717bb922ce74e8f6f0f831d8dc4510",
67
- "2ef4e5d838b6507bd61d457cf6466662b791c5c0",
68
- "2ef4faa0f82efa00eeac6cae9e8b2abccc8566ee",
69
- "2f06098183b0d7be350acbe39cdbaccff2df0c4a",
70
- "2f1c5d509ac5bffb3c62f710a1c2c542e126dfd1",
71
- "2f205b20fc16423c42b3ba51b2ea78d7b9ff3578",
72
- "2f9b6b6e3d9250ba09360734aa47973a993b59d1",
73
- "30c62a2d5a8d644f1311d4f7fe3f6a788e4c8188",
74
- "31438e245492d85fd6da4d1406eba0fbde8332a4",
75
- "3184a3abdfea231992254929ff4e275898e5bbf6",
76
- "3188ffdbb3a3d52e0f78f30c484533899224436e",
77
- "32581d0093429770d044a60eb0e9cc0462bedb13",
78
- "32679a9544d83e5403202c4d5efb61ad02492847",
79
- "4e7e9f60b7e2049b7f5697daf133161a18ef688f",
80
- "4e8cda27ddc8be7db875ceb0f360c37734724c6d",
81
- "4ea481c61c59ab55169b7cbaae536ad50b49d6f0",
82
- "4f0adcd0e61eabe06fe32be66b16559537124b7a",
83
- "4f1355c91100d12f9e7202f91b245df0c110867c",
84
- "4f6eadeb08b9d0d1e8b1b3eac8a34940adf29a2d",
85
- "4f9339df943c53117a5fc8e86e2f38716ff3a668",
86
- "4fc3874b118752e40de556b1c3e7b4a9f1737d00",
87
- "4ff1dd0992dd6baafdb5e166be6f9f23b59bdf87",
88
- "5018a35e0b7e2eec7ce5050baf9c7343f3f74164",
89
- "50298f44a45eda3a29dae82dbe911b5aa176ac07",
90
- "502acd164fb115768d723144da2e7bb5a24891bb",
91
- "50330c02bd4fd95c9db1fcf2f97f4218e42b7226",
92
- "5052bf355d9f8c52446561a39733a8767bf31e37",
93
- "6f2cd729ae42988c1dd43588d3a6661ba48ad7a0",
94
- "6f4e2c42d9138bfbf3e0f908f1308828cc6f2178",
95
- "6f6a17db05a83620cef4572761831c20a70ba9b9",
96
- "6faad60901e36538634f0d8b8ff3f21f83503c71",
97
- "6fc72e46de3df0c3842dab302bbacf697a63abab",
98
- "6fdccd49f442a7204399ca9b418f017322dbded8",
99
- "6fe7568fc3861c334cb008fd85d57d9647249ef5",
100
- "700f55d91d7b55665594676a4bada1f1457a0598",
101
- "702bd70595a7b19afc48a1f784a6505be68469d4",
102
- "7033f9ee0e52b08cb5679cd49b7b7999eaf9eaf8",
103
- "70957110ce446c4e250f865760fb3da513cdcc92",
104
- "8ec696a4734f16479d091bc70574d23dd9fe7443",
105
- "8ed341c55ed4d6f4cdc8bf4f0ca18a08c93f6962",
106
- "8edc2805f1f11b63e44bf81f4557f8b473612b69",
107
- "8ef9060a954118a698fc10e20acdc430566a100f",
108
- "8f0c4b543f4bb6eb1518ecfc3d4699e43108d393",
109
- "8fac94df3035405c2e60b3799153ce7c428af6b9",
110
- "904c0ac12b23548de524adae712241b423d765a3",
111
- "90bbaa9a809c3a768d873a9cc7d52b4f3bf3d1b9",
112
- "90d4d2f0fc362beabbbf76b4ffda0828229c198d",
113
- "90f9ff6755330b685feff6c3d81782ee3592ab04",
114
- "91822c50ebe4f9bf5bbb8308ecf9f6557062775c",
115
- "91d973263a55708fa8255867b3202d81ef9c2868",
116
- "af292c99c6148d772af3315a1c74e83330e7ead7",
117
- "af3b99d5be330dbbce0b9250c3a5fb05911908cc",
118
- "af55d0cdeb280af2db8697e5afa506e081012719",
119
- "af795e498d411142ddb073e8ca2c5447c3295a4c",
120
- "afadc73a392f8cc8e2cc77dd62a7433dd3bafa8c",
121
- "affd84ed8ec7ce67612fe3c12a80f8164b101f6a",
122
- "b0941f9c70ffe67f0387a827b338e64ecf3190f0",
123
- "b0a3077f9ef6e093f8d9869bdb0c07095bd722cb",
124
- "b0a8568a7614806378a54db5706ee3b06ae58693",
125
- "b0fb7372f242233d1d35ce7d8e74d3990cbc5841",
126
- "b10489944b9ead17427551759d180d10203e06ba",
127
- "b196a807b323f2748ffc6b1d42cd0812d04c9a40",
128
- "b1bb1d888f0c5e19278536d49fa77db035fac7ae"
129
- };
130
-
131
- static const char *loose_objects[] = {
132
- "45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
133
- "a8233120f6ad708f843d861ce2b7228ec4e3dec6",
134
- "fd093bff70906175335656e6ce6ae05783708765",
135
- "c47800c7266a2be04c571c04d5a6614691ea99bd",
136
- "a71586c1dfe8a71c6cbf6c129f404c5642ff31bd",
137
- "8496071c1b46c854b31185ea97743be6a8774479",
138
- "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
139
- "814889a078c031f61ed08ab5fa863aea9314344d",
140
- "5b5b025afb0b4c913b4c338a42934a3863bf3644",
141
- "1385f264afb75a56a5bec74243be9b367ba4ca08",
142
- "f60079018b664e4e79329a7ef9559c8d9e0378d1",
143
- "be3563ae3f795b2b4353bcce3a527ad0a4f7f644",
144
- "75057dd4114e74cca1d750d0aee1647c903cb60a",
145
- "fa49b077972391ad58037050f2a75f74e3671e92",
146
- "9fd738e8f7967c078dceed8190330fc8648ee56a",
147
- "1810dff58d8a660512d4832e740f692884338ccd",
148
- "181037049a54a1eb5fab404658a3a250b44335d7",
149
- "a4a7dce85cf63874e984719f4fdd239f5145052f",
150
- "4a202b346bb0fb0db7eff3cffeb3c70babbd2045"
151
- };
@@ -1,78 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "odb.h"
3
- #include "pack_data.h"
4
-
5
- static git_odb *_odb;
6
-
7
- void test_odb_packed__initialize(void)
8
- {
9
- cl_git_pass(git_odb_open(&_odb, cl_fixture("testrepo.git/objects")));
10
- }
11
-
12
- void test_odb_packed__cleanup(void)
13
- {
14
- git_odb_free(_odb);
15
- }
16
-
17
- void test_odb_packed__mass_read(void)
18
- {
19
- unsigned int i;
20
-
21
- for (i = 0; i < ARRAY_SIZE(packed_objects); ++i) {
22
- git_oid id;
23
- git_odb_object *obj;
24
-
25
- cl_git_pass(git_oid_fromstr(&id, packed_objects[i]));
26
- cl_assert(git_odb_exists(_odb, &id) == 1);
27
- cl_git_pass(git_odb_read(&obj, _odb, &id));
28
-
29
- git_odb_object_free(obj);
30
- }
31
- }
32
-
33
- void test_odb_packed__read_header_0(void)
34
- {
35
- unsigned int i;
36
-
37
- for (i = 0; i < ARRAY_SIZE(packed_objects); ++i) {
38
- git_oid id;
39
- git_odb_object *obj;
40
- size_t len;
41
- git_otype type;
42
-
43
- cl_git_pass(git_oid_fromstr(&id, packed_objects[i]));
44
-
45
- cl_git_pass(git_odb_read(&obj, _odb, &id));
46
- cl_git_pass(git_odb_read_header(&len, &type, _odb, &id));
47
-
48
- cl_assert(obj->raw.len == len);
49
- cl_assert(obj->raw.type == type);
50
-
51
- git_odb_object_free(obj);
52
- }
53
- }
54
-
55
- void test_odb_packed__read_header_1(void)
56
- {
57
- unsigned int i;
58
-
59
- for (i = 0; i < ARRAY_SIZE(loose_objects); ++i) {
60
- git_oid id;
61
- git_odb_object *obj;
62
- size_t len;
63
- git_otype type;
64
-
65
- cl_git_pass(git_oid_fromstr(&id, loose_objects[i]));
66
-
67
- cl_assert(git_odb_exists(_odb, &id) == 1);
68
-
69
- cl_git_pass(git_odb_read(&obj, _odb, &id));
70
- cl_git_pass(git_odb_read_header(&len, &type, _odb, &id));
71
-
72
- cl_assert(obj->raw.len == len);
73
- cl_assert(obj->raw.type == type);
74
-
75
- git_odb_object_free(obj);
76
- }
77
- }
78
-
@@ -1,71 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "git2/odb_backend.h"
3
- #include "odb.h"
4
-
5
- typedef struct {
6
- git_odb_backend base;
7
- int position;
8
- } fake_backend;
9
-
10
- static git_odb_backend *new_backend(int position)
11
- {
12
- fake_backend *b;
13
-
14
- b = git__malloc(sizeof(fake_backend));
15
- if (b == NULL)
16
- return NULL;
17
-
18
- memset(b, 0x0, sizeof(fake_backend));
19
- b->position = position;
20
- return (git_odb_backend *)b;
21
- }
22
-
23
- static void check_backend_sorting(git_odb *odb)
24
- {
25
- unsigned int i;
26
-
27
- for (i = 0; i < odb->backends.length; ++i) {
28
- fake_backend *internal =
29
- *((fake_backend **)git_vector_get(&odb->backends, i));
30
-
31
- cl_assert(internal != NULL);
32
- cl_assert(internal->position == (int)i);
33
- }
34
- }
35
-
36
- static git_odb *_odb;
37
-
38
- void test_odb_sorting__initialize(void)
39
- {
40
- cl_git_pass(git_odb_new(&_odb));
41
- }
42
-
43
- void test_odb_sorting__cleanup(void)
44
- {
45
- git_odb_free(_odb);
46
- _odb = NULL;
47
- }
48
-
49
- void test_odb_sorting__basic_backends_sorting(void)
50
- {
51
- cl_git_pass(git_odb_add_backend(_odb, new_backend(0), 5));
52
- cl_git_pass(git_odb_add_backend(_odb, new_backend(2), 3));
53
- cl_git_pass(git_odb_add_backend(_odb, new_backend(1), 4));
54
- cl_git_pass(git_odb_add_backend(_odb, new_backend(3), 1));
55
-
56
- check_backend_sorting(_odb);
57
- }
58
-
59
- void test_odb_sorting__alternate_backends_sorting(void)
60
- {
61
- cl_git_pass(git_odb_add_backend(_odb, new_backend(0), 5));
62
- cl_git_pass(git_odb_add_backend(_odb, new_backend(2), 3));
63
- cl_git_pass(git_odb_add_backend(_odb, new_backend(1), 4));
64
- cl_git_pass(git_odb_add_backend(_odb, new_backend(3), 1));
65
- cl_git_pass(git_odb_add_alternate(_odb, new_backend(4), 5));
66
- cl_git_pass(git_odb_add_alternate(_odb, new_backend(6), 3));
67
- cl_git_pass(git_odb_add_alternate(_odb, new_backend(5), 4));
68
- cl_git_pass(git_odb_add_alternate(_odb, new_backend(7), 1));
69
-
70
- check_backend_sorting(_odb);
71
- }
@@ -1,113 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "refs.h"
3
- #include "branch.h"
4
-
5
- static git_repository *repo;
6
- static git_oid branch_target_oid;
7
- static git_object *target;
8
-
9
- void test_refs_branches_create__initialize(void)
10
- {
11
- cl_fixture_sandbox("testrepo.git");
12
- cl_git_pass(git_repository_open(&repo, "testrepo.git"));
13
- }
14
-
15
- void test_refs_branches_create__cleanup(void)
16
- {
17
- git_object_free(target);
18
- git_repository_free(repo);
19
-
20
- cl_fixture_cleanup("testrepo.git");
21
- }
22
-
23
- static void retrieve_target_from_oid(git_object **object_out, git_repository *repo, const char *sha)
24
- {
25
- git_oid oid;
26
-
27
- cl_git_pass(git_oid_fromstr(&oid, sha));
28
- cl_git_pass(git_object_lookup(object_out, repo, &oid, GIT_OBJ_ANY));
29
- }
30
-
31
- static void retrieve_known_commit(git_object **object, git_repository *repo)
32
- {
33
- retrieve_target_from_oid(object, repo, "e90810b8df3e80c413d903f631643c716887138d");
34
- }
35
-
36
- #define NEW_BRANCH_NAME "new-branch-on-the-block"
37
-
38
- void test_refs_branches_create__can_create_a_local_branch(void)
39
- {
40
- retrieve_known_commit(&target, repo);
41
-
42
- cl_git_pass(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
43
- cl_git_pass(git_oid_cmp(&branch_target_oid, git_object_id(target)));
44
- }
45
-
46
- void test_refs_branches_create__creating_a_local_branch_triggers_the_creation_of_a_new_direct_reference(void)
47
- {
48
- git_reference *branch;
49
-
50
- retrieve_known_commit(&target, repo);
51
-
52
- cl_git_fail(git_reference_lookup(&branch, repo, GIT_REFS_HEADS_DIR NEW_BRANCH_NAME));
53
-
54
- cl_git_pass(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
55
-
56
- cl_git_pass(git_reference_lookup(&branch, repo, GIT_REFS_HEADS_DIR NEW_BRANCH_NAME));
57
- cl_assert(git_reference_type(branch) == GIT_REF_OID);
58
-
59
- git_reference_free(branch);
60
- }
61
-
62
- void test_refs_branches_create__can_not_create_a_branch_if_its_name_collide_with_an_existing_one(void)
63
- {
64
- retrieve_known_commit(&target, repo);
65
-
66
- cl_git_fail(git_branch_create(&branch_target_oid, repo, "br2", target, 0));
67
- }
68
-
69
- void test_refs_branches_create__can_force_create_over_an_existing_branch(void)
70
- {
71
- retrieve_known_commit(&target, repo);
72
-
73
- cl_git_pass(git_branch_create(&branch_target_oid, repo, "br2", target, 1));
74
- cl_git_pass(git_oid_cmp(&branch_target_oid, git_object_id(target)));
75
- }
76
-
77
- void test_refs_branches_create__can_not_create_a_branch_pointing_at_an_object_unknown_from_the_repository(void)
78
- {
79
- git_repository *repo2;
80
-
81
- /* Open another instance of the same repository */
82
- cl_git_pass(git_repository_open(&repo2, cl_fixture("testrepo.git")));
83
-
84
- /* Retrieve a commit object from this different repository */
85
- retrieve_known_commit(&target, repo2);
86
-
87
- cl_git_fail(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
88
-
89
- git_repository_free(repo2);
90
- }
91
-
92
- void test_refs_branches_create__creating_a_branch_targeting_a_tag_dereferences_it_to_its_commit(void)
93
- {
94
- /* b25fa35 is a tag, pointing to another tag which points to a commit */
95
- retrieve_target_from_oid(&target, repo, "b25fa35b38051e4ae45d4222e795f9df2e43f1d1");
96
-
97
- cl_git_pass(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
98
- cl_git_pass(git_oid_streq(&branch_target_oid, "e90810b8df3e80c413d903f631643c716887138d"));
99
- }
100
-
101
- void test_refs_branches_create__can_not_create_a_branch_pointing_to_a_non_commit_object(void)
102
- {
103
- /* 53fc32d is the tree of commit e90810b */
104
- retrieve_target_from_oid(&target, repo, "53fc32d17276939fc79ed05badaef2db09990016");
105
-
106
- cl_git_fail(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
107
- git_object_free(target);
108
-
109
- /* 521d87c is an annotated tag pointing to a blob */
110
- retrieve_target_from_oid(&target, repo, "521d87c1ec3aef9824daf6d96cc0ae3710766d91");
111
-
112
- cl_git_fail(git_branch_create(&branch_target_oid, repo, NEW_BRANCH_NAME, target, 0));
113
- }
@@ -1,91 +0,0 @@
1
- #include "clar_libgit2.h"
2
- #include "refs.h"
3
- #include "branch.h"
4
-
5
- static git_repository *repo;
6
- static git_reference *fake_remote;
7
-
8
- void test_refs_branches_delete__initialize(void)
9
- {
10
- git_oid id;
11
-
12
- cl_fixture_sandbox("testrepo.git");
13
- cl_git_pass(git_repository_open(&repo, "testrepo.git"));
14
-
15
- cl_git_pass(git_oid_fromstr(&id, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
16
- cl_git_pass(git_reference_create_oid(&fake_remote, repo, "refs/remotes/nulltoken/master", &id, 0));
17
- }
18
-
19
- void test_refs_branches_delete__cleanup(void)
20
- {
21
- git_reference_free(fake_remote);
22
- git_repository_free(repo);
23
-
24
- cl_fixture_cleanup("testrepo.git");
25
- }
26
-
27
- void test_refs_branches_delete__can_not_delete_a_non_existing_branch(void)
28
- {
29
- cl_git_fail(git_branch_delete(repo, "i-am-not-a-local-branch", GIT_BRANCH_LOCAL));
30
- cl_git_fail(git_branch_delete(repo, "neither/a-remote-one", GIT_BRANCH_REMOTE));
31
- }
32
-
33
- void test_refs_branches_delete__can_not_delete_a_branch_pointed_at_by_HEAD(void)
34
- {
35
- git_reference *head;
36
-
37
- /* Ensure HEAD targets the local master branch */
38
- cl_git_pass(git_reference_lookup(&head, repo, GIT_HEAD_FILE));
39
- cl_assert(strcmp("refs/heads/master", git_reference_target(head)) == 0);
40
- git_reference_free(head);
41
-
42
- cl_git_fail(git_branch_delete(repo, "master", GIT_BRANCH_LOCAL));
43
- }
44
-
45
- void test_refs_branches_delete__can_not_delete_a_branch_if_HEAD_is_missing(void)
46
- {
47
- git_reference *head;
48
-
49
- cl_git_pass(git_reference_lookup(&head, repo, GIT_HEAD_FILE));
50
- git_reference_delete(head);
51
-
52
- cl_git_fail(git_branch_delete(repo, "br2", GIT_BRANCH_LOCAL));
53
- }
54
-
55
- void test_refs_branches_delete__can_delete_a_branch_pointed_at_by_detached_HEAD(void)
56
- {
57
- git_reference *master, *head;
58
-
59
- /* Detach HEAD and make it target the commit that "master" points to */
60
- cl_git_pass(git_reference_lookup(&master, repo, "refs/heads/master"));
61
- cl_git_pass(git_reference_create_oid(&head, repo, "HEAD", git_reference_oid(master), 1));
62
- git_reference_free(head);
63
- git_reference_free(master);
64
-
65
- cl_git_pass(git_branch_delete(repo, "master", GIT_BRANCH_LOCAL));
66
- }
67
-
68
- void test_refs_branches_delete__can_delete_a_local_branch(void)
69
- {
70
- cl_git_pass(git_branch_delete(repo, "br2", GIT_BRANCH_LOCAL));
71
- }
72
-
73
- void test_refs_branches_delete__can_delete_a_remote_branch(void)
74
- {
75
- cl_git_pass(git_branch_delete(repo, "nulltoken/master", GIT_BRANCH_REMOTE));
76
- }
77
-
78
- static void assert_non_exisitng_branch_removal(const char *branch_name, git_branch_t branch_type)
79
- {
80
- int error;
81
- error = git_branch_delete(repo, branch_name, branch_type);
82
-
83
- cl_git_fail(error);
84
- cl_assert_equal_i(GIT_ENOTFOUND, error);
85
- }
86
-
87
- void test_refs_branches_delete__deleting_a_non_existing_branch_returns_ENOTFOUND(void)
88
- {
89
- assert_non_exisitng_branch_removal("i-do-not-locally-exist", GIT_BRANCH_LOCAL);
90
- assert_non_exisitng_branch_removal("neither/remotely", GIT_BRANCH_REMOTE);
91
- }