rugged 0.26.7 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/ext/rugged/rugged_blame.c +6 -3
  4. data/ext/rugged/rugged_branch_collection.c +3 -6
  5. data/ext/rugged/rugged_commit.c +56 -0
  6. data/ext/rugged/rugged_config.c +44 -9
  7. data/ext/rugged/rugged_diff.c +3 -14
  8. data/ext/rugged/rugged_diff_hunk.c +1 -3
  9. data/ext/rugged/rugged_index.c +1 -5
  10. data/ext/rugged/rugged_note.c +1 -4
  11. data/ext/rugged/rugged_patch.c +1 -4
  12. data/ext/rugged/rugged_reference_collection.c +1 -7
  13. data/ext/rugged/rugged_remote.c +5 -8
  14. data/ext/rugged/rugged_remote_collection.c +1 -6
  15. data/ext/rugged/rugged_repo.c +16 -48
  16. data/ext/rugged/rugged_revwalk.c +7 -16
  17. data/ext/rugged/rugged_settings.c +28 -0
  18. data/ext/rugged/rugged_submodule_collection.c +3 -4
  19. data/ext/rugged/rugged_tag_collection.c +1 -5
  20. data/ext/rugged/rugged_tree.c +2 -3
  21. data/lib/rugged/repository.rb +43 -0
  22. data/lib/rugged/version.rb +1 -1
  23. data/vendor/libgit2/AUTHORS +1 -0
  24. data/vendor/libgit2/CMakeLists.txt +61 -510
  25. data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +14 -0
  26. data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +25 -8
  27. data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +27 -8
  28. data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +20 -0
  29. data/vendor/libgit2/cmake/Modules/IdeSplitSources.cmake +22 -0
  30. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +3 -0
  31. data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
  32. data/vendor/libgit2/deps/winhttp/CMakeLists.txt +26 -0
  33. data/vendor/libgit2/deps/zlib/CMakeLists.txt +4 -0
  34. data/vendor/libgit2/include/git2/config.h +29 -2
  35. data/vendor/libgit2/include/git2/describe.h +1 -1
  36. data/vendor/libgit2/include/git2/diff.h +59 -8
  37. data/vendor/libgit2/include/git2/graph.h +3 -0
  38. data/vendor/libgit2/include/git2/merge.h +6 -0
  39. data/vendor/libgit2/include/git2/message.h +43 -3
  40. data/vendor/libgit2/include/git2/notes.h +89 -0
  41. data/vendor/libgit2/include/git2/odb.h +8 -1
  42. data/vendor/libgit2/include/git2/patch.h +2 -2
  43. data/vendor/libgit2/include/git2/pathspec.h +35 -18
  44. data/vendor/libgit2/include/git2/refs.h +3 -0
  45. data/vendor/libgit2/include/git2/remote.h +34 -4
  46. data/vendor/libgit2/include/git2/repository.h +6 -6
  47. data/vendor/libgit2/include/git2/reset.h +4 -4
  48. data/vendor/libgit2/include/git2/status.h +4 -0
  49. data/vendor/libgit2/include/git2/sys/config.h +4 -1
  50. data/vendor/libgit2/include/git2/sys/odb_backend.h +2 -1
  51. data/vendor/libgit2/include/git2/tree.h +4 -3
  52. data/vendor/libgit2/include/git2/types.h +1 -0
  53. data/vendor/libgit2/include/git2/version.h +4 -4
  54. data/vendor/libgit2/include/git2/worktree.h +1 -1
  55. data/vendor/libgit2/src/CMakeLists.txt +463 -0
  56. data/vendor/libgit2/src/annotated_commit.c +1 -1
  57. data/vendor/libgit2/src/annotated_commit.h +2 -0
  58. data/vendor/libgit2/src/apply.c +2 -1
  59. data/vendor/libgit2/src/apply.h +2 -0
  60. data/vendor/libgit2/src/attr.c +24 -4
  61. data/vendor/libgit2/src/attr.h +2 -0
  62. data/vendor/libgit2/src/attr_file.c +9 -2
  63. data/vendor/libgit2/src/attr_file.h +2 -0
  64. data/vendor/libgit2/src/attrcache.c +9 -1
  65. data/vendor/libgit2/src/attrcache.h +2 -0
  66. data/vendor/libgit2/src/blame.c +1 -0
  67. data/vendor/libgit2/src/blame.h +2 -1
  68. data/vendor/libgit2/src/blame_git.c +1 -0
  69. data/vendor/libgit2/src/blame_git.h +2 -0
  70. data/vendor/libgit2/src/blob.c +2 -2
  71. data/vendor/libgit2/src/blob.h +2 -0
  72. data/vendor/libgit2/src/branch.c +8 -1
  73. data/vendor/libgit2/src/branch.h +2 -0
  74. data/vendor/libgit2/src/buf_text.c +7 -7
  75. data/vendor/libgit2/src/buf_text.h +3 -3
  76. data/vendor/libgit2/src/buffer.c +31 -1
  77. data/vendor/libgit2/src/buffer.h +3 -0
  78. data/vendor/libgit2/src/cache.c +2 -2
  79. data/vendor/libgit2/src/cache.h +2 -0
  80. data/vendor/libgit2/src/cc-compat.h +3 -3
  81. data/vendor/libgit2/src/checkout.c +30 -19
  82. data/vendor/libgit2/src/checkout.h +2 -0
  83. data/vendor/libgit2/src/cherrypick.c +1 -0
  84. data/vendor/libgit2/src/clone.c +2 -1
  85. data/vendor/libgit2/src/clone.h +4 -0
  86. data/vendor/libgit2/src/commit.c +2 -1
  87. data/vendor/libgit2/src/commit.h +2 -0
  88. data/vendor/libgit2/src/commit_list.c +1 -1
  89. data/vendor/libgit2/src/commit_list.h +2 -0
  90. data/vendor/libgit2/src/common.h +11 -5
  91. data/vendor/libgit2/src/config.c +12 -10
  92. data/vendor/libgit2/src/config.h +2 -0
  93. data/vendor/libgit2/src/config_cache.c +1 -0
  94. data/vendor/libgit2/src/config_file.c +287 -786
  95. data/vendor/libgit2/src/config_file.h +4 -3
  96. data/vendor/libgit2/src/config_parse.c +525 -0
  97. data/vendor/libgit2/src/config_parse.h +64 -0
  98. data/vendor/libgit2/src/crlf.c +2 -1
  99. data/vendor/libgit2/src/delta.c +28 -30
  100. data/vendor/libgit2/src/delta.h +1 -0
  101. data/vendor/libgit2/src/describe.c +3 -1
  102. data/vendor/libgit2/src/diff.c +148 -2
  103. data/vendor/libgit2/src/diff.h +3 -1
  104. data/vendor/libgit2/src/diff_driver.c +12 -9
  105. data/vendor/libgit2/src/diff_driver.h +4 -1
  106. data/vendor/libgit2/src/diff_file.c +7 -4
  107. data/vendor/libgit2/src/diff_file.h +1 -0
  108. data/vendor/libgit2/src/diff_generate.c +6 -3
  109. data/vendor/libgit2/src/diff_generate.h +6 -1
  110. data/vendor/libgit2/src/diff_parse.c +5 -4
  111. data/vendor/libgit2/src/diff_parse.h +2 -0
  112. data/vendor/libgit2/src/diff_print.c +2 -0
  113. data/vendor/libgit2/src/diff_stats.c +2 -0
  114. data/vendor/libgit2/src/diff_tform.c +2 -1
  115. data/vendor/libgit2/src/diff_tform.h +4 -1
  116. data/vendor/libgit2/src/diff_xdiff.c +5 -2
  117. data/vendor/libgit2/src/diff_xdiff.h +2 -0
  118. data/vendor/libgit2/src/errors.c +2 -0
  119. data/vendor/libgit2/src/features.h.in +36 -0
  120. data/vendor/libgit2/src/fetch.c +2 -2
  121. data/vendor/libgit2/src/fetch.h +4 -0
  122. data/vendor/libgit2/src/fetchhead.c +3 -3
  123. data/vendor/libgit2/src/fetchhead.h +3 -0
  124. data/vendor/libgit2/src/filebuf.c +2 -1
  125. data/vendor/libgit2/src/filebuf.h +2 -0
  126. data/vendor/libgit2/src/fileops.c +12 -1
  127. data/vendor/libgit2/src/fileops.h +7 -1
  128. data/vendor/libgit2/src/filter.c +2 -1
  129. data/vendor/libgit2/src/filter.h +1 -0
  130. data/vendor/libgit2/src/fnmatch.c +2 -2
  131. data/vendor/libgit2/src/fnmatch.h +3 -4
  132. data/vendor/libgit2/src/global.c +4 -3
  133. data/vendor/libgit2/src/global.h +1 -5
  134. data/vendor/libgit2/src/graph.c +2 -0
  135. data/vendor/libgit2/src/hash.c +0 -1
  136. data/vendor/libgit2/src/hash.h +3 -1
  137. data/vendor/libgit2/src/hash/hash_collisiondetect.h +3 -3
  138. data/vendor/libgit2/src/hash/hash_common_crypto.h +18 -5
  139. data/vendor/libgit2/src/hash/hash_generic.c +2 -2
  140. data/vendor/libgit2/src/hash/hash_generic.h +5 -3
  141. data/vendor/libgit2/src/hash/hash_openssl.h +3 -3
  142. data/vendor/libgit2/src/hash/hash_win32.c +57 -14
  143. data/vendor/libgit2/src/hash/hash_win32.h +4 -3
  144. data/vendor/libgit2/src/hashsig.c +3 -0
  145. data/vendor/libgit2/src/ident.c +2 -0
  146. data/vendor/libgit2/src/idxmap.h +2 -1
  147. data/vendor/libgit2/src/ignore.c +14 -2
  148. data/vendor/libgit2/src/ignore.h +2 -0
  149. data/vendor/libgit2/src/index.c +20 -40
  150. data/vendor/libgit2/src/index.h +2 -0
  151. data/vendor/libgit2/src/indexer.c +13 -5
  152. data/vendor/libgit2/src/indexer.h +5 -1
  153. data/vendor/libgit2/src/integer.h +1 -1
  154. data/vendor/libgit2/src/iterator.c +44 -3
  155. data/vendor/libgit2/src/iterator.h +3 -0
  156. data/vendor/libgit2/src/map.h +1 -1
  157. data/vendor/libgit2/src/merge.c +155 -33
  158. data/vendor/libgit2/src/merge.h +2 -0
  159. data/vendor/libgit2/src/merge_driver.c +2 -2
  160. data/vendor/libgit2/src/merge_driver.h +2 -0
  161. data/vendor/libgit2/src/merge_file.c +3 -0
  162. data/vendor/libgit2/src/message.h +3 -1
  163. data/vendor/libgit2/src/mwindow.c +1 -1
  164. data/vendor/libgit2/src/mwindow.h +2 -0
  165. data/vendor/libgit2/src/netops.c +75 -62
  166. data/vendor/libgit2/src/netops.h +2 -1
  167. data/vendor/libgit2/src/notes.c +164 -48
  168. data/vendor/libgit2/src/notes.h +1 -1
  169. data/vendor/libgit2/src/object.c +14 -3
  170. data/vendor/libgit2/src/object.h +4 -0
  171. data/vendor/libgit2/src/object_api.c +3 -2
  172. data/vendor/libgit2/src/odb.c +104 -38
  173. data/vendor/libgit2/src/odb.h +3 -1
  174. data/vendor/libgit2/src/odb_loose.c +414 -267
  175. data/vendor/libgit2/src/odb_mempack.c +1 -0
  176. data/vendor/libgit2/src/odb_pack.c +2 -1
  177. data/vendor/libgit2/src/offmap.h +1 -0
  178. data/vendor/libgit2/src/oid.c +2 -1
  179. data/vendor/libgit2/src/oid.h +3 -8
  180. data/vendor/libgit2/src/oidarray.c +2 -1
  181. data/vendor/libgit2/src/oidarray.h +1 -0
  182. data/vendor/libgit2/src/oidmap.h +1 -0
  183. data/vendor/libgit2/src/pack-objects.c +5 -1
  184. data/vendor/libgit2/src/pack-objects.h +1 -1
  185. data/vendor/libgit2/src/pack.c +2 -6
  186. data/vendor/libgit2/src/pack.h +2 -1
  187. data/vendor/libgit2/src/parse.c +121 -0
  188. data/vendor/libgit2/src/parse.h +61 -0
  189. data/vendor/libgit2/src/patch.c +9 -2
  190. data/vendor/libgit2/src/patch.h +2 -0
  191. data/vendor/libgit2/src/patch_generate.c +6 -5
  192. data/vendor/libgit2/src/patch_generate.h +1 -0
  193. data/vendor/libgit2/src/patch_parse.c +265 -276
  194. data/vendor/libgit2/src/patch_parse.h +6 -11
  195. data/vendor/libgit2/src/path.c +24 -181
  196. data/vendor/libgit2/src/path.h +14 -73
  197. data/vendor/libgit2/src/pathspec.c +2 -1
  198. data/vendor/libgit2/src/pathspec.h +2 -1
  199. data/vendor/libgit2/src/pool.c +8 -0
  200. data/vendor/libgit2/src/pool.h +1 -0
  201. data/vendor/libgit2/src/posix.c +2 -1
  202. data/vendor/libgit2/src/posix.h +1 -0
  203. data/vendor/libgit2/src/pqueue.c +1 -0
  204. data/vendor/libgit2/src/pqueue.h +2 -0
  205. data/vendor/libgit2/src/proxy.c +2 -1
  206. data/vendor/libgit2/src/proxy.h +3 -1
  207. data/vendor/libgit2/src/push.c +4 -171
  208. data/vendor/libgit2/src/push.h +2 -0
  209. data/vendor/libgit2/src/rebase.c +1 -0
  210. data/vendor/libgit2/src/refdb.c +2 -3
  211. data/vendor/libgit2/src/refdb.h +2 -0
  212. data/vendor/libgit2/src/refdb_fs.c +5 -3
  213. data/vendor/libgit2/src/refdb_fs.h +4 -0
  214. data/vendor/libgit2/src/reflog.c +1 -0
  215. data/vendor/libgit2/src/reflog.h +2 -1
  216. data/vendor/libgit2/src/refs.c +1 -0
  217. data/vendor/libgit2/src/refs.h +2 -1
  218. data/vendor/libgit2/src/refspec.c +2 -2
  219. data/vendor/libgit2/src/refspec.h +2 -0
  220. data/vendor/libgit2/src/remote.c +56 -10
  221. data/vendor/libgit2/src/remote.h +2 -0
  222. data/vendor/libgit2/src/repository.c +16 -14
  223. data/vendor/libgit2/src/repository.h +2 -0
  224. data/vendor/libgit2/src/reset.c +6 -5
  225. data/vendor/libgit2/src/revert.c +1 -0
  226. data/vendor/libgit2/src/revparse.c +3 -5
  227. data/vendor/libgit2/src/revwalk.c +2 -2
  228. data/vendor/libgit2/src/revwalk.h +2 -0
  229. data/vendor/libgit2/src/settings.c +6 -8
  230. data/vendor/libgit2/src/sha1_lookup.c +2 -216
  231. data/vendor/libgit2/src/sha1_lookup.h +2 -6
  232. data/vendor/libgit2/src/signature.c +8 -3
  233. data/vendor/libgit2/src/signature.h +2 -0
  234. data/vendor/libgit2/src/sortedcache.c +7 -0
  235. data/vendor/libgit2/src/sortedcache.h +2 -0
  236. data/vendor/libgit2/src/stash.c +1 -0
  237. data/vendor/libgit2/src/status.c +14 -9
  238. data/vendor/libgit2/src/status.h +2 -0
  239. data/vendor/libgit2/src/{curl_stream.c → streams/curl.c} +2 -0
  240. data/vendor/libgit2/src/{curl_stream.h → streams/curl.h} +4 -2
  241. data/vendor/libgit2/src/{openssl_stream.c → streams/openssl.c} +47 -18
  242. data/vendor/libgit2/src/{openssl_stream.h → streams/openssl.h} +6 -2
  243. data/vendor/libgit2/src/{socket_stream.c → streams/socket.c} +2 -2
  244. data/vendor/libgit2/src/{socket_stream.h → streams/socket.h} +4 -2
  245. data/vendor/libgit2/src/{stransport_stream.c → streams/stransport.c} +4 -2
  246. data/vendor/libgit2/src/{stransport_stream.h → streams/stransport.h} +4 -2
  247. data/vendor/libgit2/src/{tls_stream.c → streams/tls.c} +4 -3
  248. data/vendor/libgit2/src/{tls_stream.h → streams/tls.h} +4 -2
  249. data/vendor/libgit2/src/submodule.c +28 -80
  250. data/vendor/libgit2/src/submodule.h +2 -13
  251. data/vendor/libgit2/src/sysdir.c +75 -8
  252. data/vendor/libgit2/src/sysdir.h +2 -1
  253. data/vendor/libgit2/src/tag.c +2 -2
  254. data/vendor/libgit2/src/tag.h +2 -0
  255. data/vendor/libgit2/src/thread-utils.c +1 -0
  256. data/vendor/libgit2/src/thread-utils.h +1 -1
  257. data/vendor/libgit2/src/trace.c +2 -2
  258. data/vendor/libgit2/src/trace.h +2 -0
  259. data/vendor/libgit2/src/trailer.c +416 -0
  260. data/vendor/libgit2/src/transaction.c +2 -1
  261. data/vendor/libgit2/src/transport.c +2 -0
  262. data/vendor/libgit2/src/transports/auth.c +2 -1
  263. data/vendor/libgit2/src/transports/auth.h +4 -3
  264. data/vendor/libgit2/src/transports/auth_negotiate.c +2 -1
  265. data/vendor/libgit2/src/transports/auth_negotiate.h +3 -3
  266. data/vendor/libgit2/src/transports/cred.c +2 -0
  267. data/vendor/libgit2/src/transports/cred.h +4 -2
  268. data/vendor/libgit2/src/transports/cred_helpers.c +1 -0
  269. data/vendor/libgit2/src/transports/git.c +3 -1
  270. data/vendor/libgit2/src/transports/http.c +10 -14
  271. data/vendor/libgit2/src/transports/http.h +23 -0
  272. data/vendor/libgit2/src/transports/local.c +23 -5
  273. data/vendor/libgit2/src/transports/smart.c +3 -1
  274. data/vendor/libgit2/src/transports/smart.h +23 -16
  275. data/vendor/libgit2/src/transports/smart_pkt.c +114 -130
  276. data/vendor/libgit2/src/transports/smart_protocol.c +26 -22
  277. data/vendor/libgit2/src/transports/ssh.c +12 -7
  278. data/vendor/libgit2/src/transports/ssh.h +4 -2
  279. data/vendor/libgit2/src/transports/winhttp.c +19 -21
  280. data/vendor/libgit2/src/tree-cache.c +1 -0
  281. data/vendor/libgit2/src/tree-cache.h +1 -0
  282. data/vendor/libgit2/src/tree.c +20 -14
  283. data/vendor/libgit2/src/tree.h +2 -0
  284. data/vendor/libgit2/src/tsort.c +0 -1
  285. data/vendor/libgit2/src/unix/map.c +4 -1
  286. data/vendor/libgit2/src/unix/posix.h +8 -4
  287. data/vendor/libgit2/src/unix/pthread.h +1 -1
  288. data/vendor/libgit2/src/unix/realpath.c +4 -1
  289. data/vendor/libgit2/src/util.c +6 -5
  290. data/vendor/libgit2/src/util.h +39 -111
  291. data/vendor/libgit2/src/varint.c +0 -1
  292. data/vendor/libgit2/src/varint.h +2 -0
  293. data/vendor/libgit2/src/vector.c +1 -1
  294. data/vendor/libgit2/src/win32/dir.c +3 -0
  295. data/vendor/libgit2/src/win32/dir.h +4 -3
  296. data/vendor/libgit2/src/win32/error.c +1 -1
  297. data/vendor/libgit2/src/win32/error.h +4 -2
  298. data/vendor/libgit2/src/win32/findfile.c +2 -1
  299. data/vendor/libgit2/src/win32/findfile.h +4 -2
  300. data/vendor/libgit2/src/win32/map.c +2 -0
  301. data/vendor/libgit2/src/win32/mingw-compat.h +3 -3
  302. data/vendor/libgit2/src/win32/msvc-compat.h +3 -3
  303. data/vendor/libgit2/src/win32/path_w32.c +7 -12
  304. data/vendor/libgit2/src/win32/path_w32.h +3 -2
  305. data/vendor/libgit2/src/win32/posix.h +2 -2
  306. data/vendor/libgit2/src/win32/posix_w32.c +11 -5
  307. data/vendor/libgit2/src/win32/precompiled.h +2 -1
  308. data/vendor/libgit2/src/win32/reparse.h +2 -2
  309. data/vendor/libgit2/src/win32/thread.c +1 -0
  310. data/vendor/libgit2/src/win32/thread.h +2 -2
  311. data/vendor/libgit2/src/win32/utf-conv.c +0 -1
  312. data/vendor/libgit2/src/win32/utf-conv.h +4 -3
  313. data/vendor/libgit2/src/win32/w32_buffer.c +1 -1
  314. data/vendor/libgit2/src/win32/w32_buffer.h +4 -2
  315. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -1
  316. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +85 -2
  317. data/vendor/libgit2/src/win32/w32_stack.c +2 -1
  318. data/vendor/libgit2/src/win32/w32_stack.h +5 -3
  319. data/vendor/libgit2/src/win32/w32_util.h +4 -2
  320. data/vendor/libgit2/src/win32/win32-compat.h +3 -3
  321. data/vendor/libgit2/src/worktree.c +4 -5
  322. data/vendor/libgit2/src/worktree.h +2 -0
  323. data/vendor/libgit2/src/xdiff/xdiff.h +22 -13
  324. data/vendor/libgit2/src/xdiff/xdiffi.c +523 -81
  325. data/vendor/libgit2/src/xdiff/xdiffi.h +2 -2
  326. data/vendor/libgit2/src/xdiff/xemit.c +63 -39
  327. data/vendor/libgit2/src/xdiff/xemit.h +2 -2
  328. data/vendor/libgit2/src/xdiff/xhistogram.c +0 -1
  329. data/vendor/libgit2/src/xdiff/xinclude.h +3 -2
  330. data/vendor/libgit2/src/xdiff/xmacros.h +2 -2
  331. data/vendor/libgit2/src/xdiff/xmerge.c +80 -20
  332. data/vendor/libgit2/src/xdiff/xpatience.c +41 -9
  333. data/vendor/libgit2/src/xdiff/xprepare.c +2 -2
  334. data/vendor/libgit2/src/xdiff/xprepare.h +2 -2
  335. data/vendor/libgit2/src/xdiff/xtypes.h +2 -2
  336. data/vendor/libgit2/src/xdiff/xutils.c +47 -27
  337. data/vendor/libgit2/src/xdiff/xutils.h +2 -5
  338. data/vendor/libgit2/src/zstream.c +65 -45
  339. data/vendor/libgit2/src/zstream.h +9 -2
  340. metadata +27 -13
  341. data/vendor/libgit2/include/git2/sys/remote.h +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4faf206e22374b400418a90f872b67e623ae2e3266e4fb3415eb44503af2f44c
4
- data.tar.gz: 4e0f187f1256b99e1bbd9f52525dd21af71b964b7fdcedc6c718b0c8f4d0a619
3
+ metadata.gz: e29dd42f856fd7e0e631d3c3235ebf227fc47490338078fa91e0e4769b16cc64
4
+ data.tar.gz: 3f9c8ea45f76799f7eb9096e2de3d551f481f27f5df54cfc21e987a88f9eb019
5
5
  SHA512:
6
- metadata.gz: 2803d2c5cf95a249b6d5ea2a36a5774243234bf96e0bf336e3a1e211eee3917a26a1c7d293019e63835ade97d8ec133275e3b8445dbebfc40d0b1fb439e2b86e
7
- data.tar.gz: 59ba9779ad0090e8dd7ff369ae630e7fc1baf9f1c5de4ee89ec42bb5a9845f71cb485a7fd51a3f5a67f30c34793a94acf09193a77a541344c7143f225a7e7221
6
+ metadata.gz: c4e6fefc154bc8e6095cab238a698eb3ccae43e8d07f67192f07dbbe5fbee2f766aa024cec42783c16da914a80abd6c975f928d378a06f378b98a73f2b1abe11
7
+ data.tar.gz: e6a565322fd8bb4910168a34791a3793a336012193d5d193a89552d2b806ef946f421e289192a22f3314a1524e2593d80789bfa3d0ec65440b53a1e77afa7192
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rugged
1
+ # Rugged [![Build Status](https://travis-ci.org/libgit2/rugged.svg?branch=master)](https://travis-ci.org/libgit2/rugged)
2
2
  **libgit2 bindings in Ruby**
3
3
 
4
4
  Rugged is a library for accessing [libgit2](https://github.com/libgit2/libgit2) in Ruby. It gives you the speed and
@@ -571,7 +571,7 @@ Rugged.raw_to_hex("\277\336Y\315\320\337\254\035\211(\024\366j\225d\032\275\212\
571
571
 
572
572
  ---
573
573
 
574
- ### Alternative backends
574
+ ### Alternative backends
575
575
 
576
576
  You can store bare repositories in alternative backends instead of storing on disk. (see
577
577
  `redbadger/rugged-redis` for an example of how a rugged backend works).
@@ -188,6 +188,11 @@ static VALUE rb_git_blame_count(VALUE self)
188
188
  return UINT2NUM(git_blame_get_hunk_count(blame));
189
189
  }
190
190
 
191
+ static VALUE rugged_blame_enum_size(VALUE rb_blame, VALUE rb_args, VALUE rb_eobj)
192
+ {
193
+ return rb_git_blame_count(rb_blame);
194
+ }
195
+
191
196
  /*
192
197
  * call-seq:
193
198
  * blame[index] -> hunk
@@ -242,9 +247,7 @@ static VALUE rb_git_blame_each(VALUE self)
242
247
  git_blame *blame;
243
248
  uint32_t i, blame_count;
244
249
 
245
- if (!rb_block_given_p()) {
246
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each"), self);
247
- }
250
+ RETURN_SIZED_ENUMERATOR(self, 0, 0, rugged_blame_enum_size);
248
251
 
249
252
  Data_Get_Struct(self, git_blame, blame);
250
253
 
@@ -178,19 +178,16 @@ static VALUE rb_git_branch_collection_aref(VALUE self, VALUE rb_name) {
178
178
 
179
179
  static VALUE each_branch(int argc, VALUE *argv, VALUE self, int branch_names_only)
180
180
  {
181
- VALUE rb_repo = rugged_owner(self), rb_filter;
181
+ VALUE rb_repo, rb_filter;
182
182
  git_repository *repo;
183
183
  git_branch_iterator *iter;
184
184
  int error, exception = 0;
185
185
  git_branch_t filter = (GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE), branch_type;
186
186
 
187
+ RETURN_ENUMERATOR(self, argc, argv);
187
188
  rb_scan_args(argc, argv, "01", &rb_filter);
188
189
 
189
- if (!rb_block_given_p()) {
190
- VALUE symbol = branch_names_only ? CSTR2SYM("each_name") : CSTR2SYM("each");
191
- return rb_funcall(self, rb_intern("to_enum"), 2, symbol, rb_filter);
192
- }
193
-
190
+ rb_repo = rugged_owner(self);
194
191
  rugged_check_repo(rb_repo);
195
192
 
196
193
  if (!NIL_P(rb_filter))
@@ -7,6 +7,7 @@
7
7
 
8
8
  #include "rugged.h"
9
9
  #include "git2/commit.h"
10
+ #include "git2/message.h"
10
11
 
11
12
  extern VALUE rb_mRugged;
12
13
  extern VALUE rb_cRuggedObject;
@@ -44,6 +45,60 @@ static VALUE rb_git_commit_message_GET(VALUE self)
44
45
  return rb_enc_str_new(message, strlen(message), encoding);
45
46
  }
46
47
 
48
+ /*
49
+ * call-seq:
50
+ * commit.trailers -> [["Trailer-name", "trailer value"], ...]
51
+ *
52
+ * Return an array of arrays, each of which is a key/value pair representing a
53
+ * commit message trailer. Both the keys and values will be strings. An array
54
+ * is used to preserve the order the trailers were found.
55
+ *
56
+ * In Ruby 1.9+, the returned strings will be encoded with the encoding
57
+ * specified in the +Encoding+ header of the commit, if available.
58
+ *
59
+ */
60
+ static VALUE rb_git_commit_trailers_GET(VALUE self)
61
+ {
62
+ git_commit *commit;
63
+ const char *message;
64
+ rb_encoding *encoding = rb_utf8_encoding();
65
+ const char *encoding_name;
66
+ git_message_trailer_array arr;
67
+ VALUE trailers = rb_ary_new();
68
+ int error;
69
+ size_t i;
70
+
71
+ Data_Get_Struct(self, git_commit, commit);
72
+
73
+ encoding_name = git_commit_message_encoding(commit);
74
+ if (encoding_name != NULL)
75
+ encoding = rb_enc_find(encoding_name);
76
+
77
+ message = git_commit_message(commit);
78
+
79
+ error = git_message_trailers(&arr, message);
80
+ rugged_exception_check(error);
81
+
82
+ for(i = 0; i < arr.count; i++) {
83
+ VALUE pair = rb_ary_new();
84
+ const char *key = arr.trailers[i].key;
85
+ const char *value = arr.trailers[i].value;
86
+
87
+ // trailer key
88
+ rb_ary_push(pair, rb_enc_str_new(key, strlen(key), encoding));
89
+
90
+ // trailer value
91
+ rb_ary_push(pair, rb_enc_str_new(value, strlen(value), encoding));
92
+
93
+ // add it to the list
94
+ rb_ary_push(trailers, pair);
95
+ }
96
+
97
+ git_message_trailer_array_free(&arr);
98
+
99
+ return trailers;
100
+ }
101
+
47
102
  /*
48
103
  * call-seq:
49
104
  * commit.summary -> summary
@@ -819,6 +874,7 @@ void Init_rugged_commit(void)
819
874
  rb_define_singleton_method(rb_cRuggedCommit, "extract_signature", rb_git_commit_extract_signature, -1);
820
875
 
821
876
  rb_define_method(rb_cRuggedCommit, "message", rb_git_commit_message_GET, 0);
877
+ rb_define_method(rb_cRuggedCommit, "trailers", rb_git_commit_trailers_GET, 0);
822
878
  rb_define_method(rb_cRuggedCommit, "summary", rb_git_commit_summary_GET, 0);
823
879
  rb_define_method(rb_cRuggedCommit, "epoch_time", rb_git_commit_epoch_time_GET, 0);
824
880
  rb_define_method(rb_cRuggedCommit, "committer", rb_git_commit_committer_GET, 0);
@@ -43,7 +43,7 @@ static VALUE rb_git_config_new(VALUE klass, VALUE rb_path)
43
43
  for (i = 0; i < RARRAY_LEN(rb_path) && !error; ++i) {
44
44
  VALUE f = rb_ary_entry(rb_path, i);
45
45
  Check_Type(f, T_STRING);
46
- error = git_config_add_file_ondisk(config, StringValueCStr(f), i + 1, 1);
46
+ error = git_config_add_file_ondisk(config, StringValueCStr(f), i + 1, NULL, 1);
47
47
  }
48
48
 
49
49
  if (error) {
@@ -198,7 +198,7 @@ static int cb_config__to_hash(const git_config_entry *entry, void *opaque)
198
198
  /*
199
199
  * call-seq:
200
200
  * cfg.each_key { |key| block }
201
- * cfg.each_key -> enumarator
201
+ * cfg.each_key -> enumerator
202
202
  *
203
203
  * Call the given block once for each key in the config file. If no block
204
204
  * is given, an enumerator is returned.
@@ -212,11 +212,9 @@ static VALUE rb_git_config_each_key(VALUE self)
212
212
  git_config *config;
213
213
  int error;
214
214
 
215
+ RETURN_ENUMERATOR(self, 0, 0);
215
216
  Data_Get_Struct(self, git_config, config);
216
217
 
217
- if (!rb_block_given_p())
218
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_key"));
219
-
220
218
  error = git_config_foreach(config, &cb_config__each_key, (void *)rb_block_proc());
221
219
  rugged_exception_check(error);
222
220
  return Qnil;
@@ -240,12 +238,10 @@ static VALUE rb_git_config_each_pair(VALUE self)
240
238
  {
241
239
  git_config *config;
242
240
  int error;
243
-
241
+
242
+ RETURN_ENUMERATOR(self, 0, 0);
244
243
  Data_Get_Struct(self, git_config, config);
245
244
 
246
- if (!rb_block_given_p())
247
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_pair"));
248
-
249
245
  error = git_config_foreach(config, &cb_config__each_pair, (void *)rb_block_proc());
250
246
  rugged_exception_check(error);
251
247
  return Qnil;
@@ -358,6 +354,44 @@ static VALUE rb_git_config_transaction(VALUE self)
358
354
  return rb_result;
359
355
  }
360
356
 
357
+ static int each_config_value(const git_config_entry * entry, void *ctx)
358
+ {
359
+ VALUE list = (VALUE)ctx;
360
+ rb_ary_push(list, rb_str_new_utf8(entry->value));
361
+ return 0;
362
+ }
363
+
364
+ /*
365
+ * call-seq:
366
+ * cfg.get_all(key) -> [value1, value2, ...]
367
+ *
368
+ * Get a list of values for the given config +key+. Values are always
369
+ * returned as an +Array+ of +String+, or +nil+ if the given key doesn't exist
370
+ * in the Config file.
371
+ *
372
+ * cfg['apply.whitespace'] #=> ['fix']
373
+ * cfg['diff.renames'] #=> ['true']
374
+ * cfg['remote.origin.fetch'] #=> ["+refs/heads/*:refs/remotes/origin/*", "+refs/heads/*:refs/lolol/origin/*"]
375
+ */
376
+ static VALUE rb_git_config_get_all(VALUE self, VALUE key)
377
+ {
378
+ git_config *config;
379
+ VALUE list;
380
+ int error;
381
+
382
+ Data_Get_Struct(self, git_config, config);
383
+
384
+ list = rb_ary_new();
385
+ error = git_config_get_multivar_foreach(
386
+ config, StringValueCStr(key), NULL, each_config_value, (void *)list);
387
+
388
+ if (error == GIT_ENOTFOUND)
389
+ return Qnil;
390
+
391
+ rugged_exception_check(error);
392
+ return list;
393
+ }
394
+
361
395
  void Init_rugged_config(void)
362
396
  {
363
397
  /*
@@ -376,6 +410,7 @@ void Init_rugged_config(void)
376
410
 
377
411
  rb_define_method(rb_cRuggedConfig, "get", rb_git_config_get, 1);
378
412
  rb_define_method(rb_cRuggedConfig, "[]", rb_git_config_get, 1);
413
+ rb_define_method(rb_cRuggedConfig, "get_all", rb_git_config_get_all, 1);
379
414
 
380
415
  rb_define_method(rb_cRuggedConfig, "each_key", rb_git_config_each_key, 0);
381
416
  rb_define_method(rb_cRuggedConfig, "each_pair", rb_git_config_each_pair, 0);
@@ -447,10 +447,7 @@ static VALUE rb_git_diff_each_patch(VALUE self)
447
447
  int error = 0;
448
448
  size_t d, delta_count;
449
449
 
450
- if (!rb_block_given_p()) {
451
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_patch"), self);
452
- }
453
-
450
+ RETURN_ENUMERATOR(self, 0, 0);
454
451
  Data_Get_Struct(self, git_diff, diff);
455
452
 
456
453
  delta_count = git_diff_num_deltas(diff);
@@ -481,13 +478,9 @@ static VALUE rb_git_diff_each_delta(VALUE self)
481
478
  {
482
479
  git_diff *diff;
483
480
  const git_diff_delta *delta;
484
- int error = 0;
485
481
  size_t d, delta_count;
486
482
 
487
- if (!rb_block_given_p()) {
488
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_delta"), self);
489
- }
490
-
483
+ RETURN_ENUMERATOR(self, 0, 0);
491
484
  Data_Get_Struct(self, git_diff, diff);
492
485
 
493
486
  delta_count = git_diff_num_deltas(diff);
@@ -496,8 +489,6 @@ static VALUE rb_git_diff_each_delta(VALUE self)
496
489
  rb_yield(rugged_diff_delta_new(self, delta));
497
490
  }
498
491
 
499
- rugged_exception_check(error);
500
-
501
492
  return self;
502
493
  }
503
494
 
@@ -524,6 +515,7 @@ static VALUE rb_git_diff_each_line(int argc, VALUE *argv, VALUE self)
524
515
  git_diff_format_t format;
525
516
  int exception = 0, error;
526
517
 
518
+ RETURN_ENUMERATOR(self, argc, argv);
527
519
  Data_Get_Struct(self, git_diff, diff);
528
520
 
529
521
  if (rb_scan_args(argc, argv, "01", &rb_format) == 1) {
@@ -532,9 +524,6 @@ static VALUE rb_git_diff_each_line(int argc, VALUE *argv, VALUE self)
532
524
  rb_format = CSTR2SYM("patch");
533
525
  }
534
526
 
535
- if (!rb_block_given_p())
536
- return rb_funcall(self, rb_intern("to_enum"), 2, CSTR2SYM("each_line"), rb_format);
537
-
538
527
  if (SYM2ID(rb_format) == rb_intern("patch")) {
539
528
  format = GIT_DIFF_FORMAT_PATCH;
540
529
  } else if (SYM2ID(rb_format) == rb_intern("patch_header")) {
@@ -42,9 +42,7 @@ static VALUE rb_git_diff_hunk_each_line(VALUE self)
42
42
  git_patch *patch;
43
43
  int error = 0, l, lines_count, hunk_idx;
44
44
 
45
- if (!rb_block_given_p()) {
46
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_line"), self);
47
- }
45
+ RETURN_ENUMERATOR(self, 0, 0);
48
46
 
49
47
  Data_Get_Struct(rugged_owner(self), git_patch, patch);
50
48
 
@@ -190,11 +190,9 @@ static VALUE rb_git_index_each(VALUE self)
190
190
  git_index *index;
191
191
  unsigned int i, count;
192
192
 
193
+ RETURN_ENUMERATOR(self, 0, 0);
193
194
  Data_Get_Struct(self, git_index, index);
194
195
 
195
- if (!rb_block_given_p())
196
- return rb_funcall(self, rb_intern("to_enum"), 0);
197
-
198
196
  count = (unsigned int)git_index_entrycount(index);
199
197
  for (i = 0; i < count; ++i) {
200
198
  const git_index_entry *entry = git_index_get_byindex(index, i);
@@ -607,8 +605,6 @@ static void rb_git_indexentry_toC(git_index_entry *entry, VALUE rb_entry)
607
605
  entry->flags &= ~GIT_IDXENTRY_VALID;
608
606
  if (rugged_parse_bool(val))
609
607
  entry->flags |= GIT_IDXENTRY_VALID;
610
- } else {
611
- entry->flags |= GIT_IDXENTRY_VALID;
612
608
  }
613
609
  }
614
610
 
@@ -297,12 +297,9 @@ static VALUE rb_git_note_each(int argc, VALUE *argv, VALUE self)
297
297
  struct rugged_cb_payload payload = { self, 0 };
298
298
  VALUE rb_notes_ref;
299
299
 
300
+ RETURN_ENUMERATOR(self, argc, argv);
300
301
  rb_scan_args(argc, argv, "01", &rb_notes_ref);
301
302
 
302
- if (!rb_block_given_p()) {
303
- return rb_funcall(self, rb_intern("to_enum"), 3, CSTR2SYM("each_note"), self, rb_notes_ref);
304
- }
305
-
306
303
  if (!NIL_P(rb_notes_ref)) {
307
304
  Check_Type(rb_notes_ref, T_STRING);
308
305
  notes_ref = StringValueCStr(rb_notes_ref);
@@ -93,10 +93,7 @@ static VALUE rb_git_diff_patch_each_hunk(VALUE self)
93
93
  int error = 0;
94
94
  size_t hunks_count, h;
95
95
 
96
- if (!rb_block_given_p()) {
97
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_hunk"), self);
98
- }
99
-
96
+ RETURN_ENUMERATOR(self, 0, 0);
100
97
  Data_Get_Struct(self, git_patch, patch);
101
98
 
102
99
  hunks_count = git_patch_num_hunks(patch);
@@ -114,15 +114,9 @@ static VALUE rb_git_reference_collection__each(int argc, VALUE *argv, VALUE self
114
114
  git_reference_iterator *iter;
115
115
  int error, exception = 0;
116
116
 
117
+ RETURN_ENUMERATOR(self, argc, argv);
117
118
  rb_scan_args(argc, argv, "01", &rb_glob);
118
119
 
119
- if (!rb_block_given_p()) {
120
- return rb_funcall(self,
121
- rb_intern("to_enum"), 2,
122
- only_names ? CSTR2SYM("each_name") : CSTR2SYM("each"),
123
- rb_glob);
124
- }
125
-
126
120
  rugged_check_repo(rb_repo);
127
121
 
128
122
  Data_Get_Struct(rb_repo, git_repository, repo);
@@ -304,13 +304,10 @@ static VALUE rb_git_remote_ls(int argc, VALUE *argv, VALUE self)
304
304
  int error;
305
305
  size_t heads_len, i;
306
306
 
307
+ RETURN_ENUMERATOR(self, argc, argv);
307
308
  Data_Get_Struct(self, git_remote, remote);
308
-
309
309
  rb_scan_args(argc, argv, ":", &rb_options);
310
310
 
311
- if (!rb_block_given_p())
312
- return rb_funcall(self, rb_intern("to_enum"), 2, CSTR2SYM("ls"), rb_options);
313
-
314
311
  rugged_remote_init_callbacks_and_payload_from_options(rb_options, &callbacks, &payload);
315
312
  init_custom_headers(rb_options, &custom_headers);
316
313
 
@@ -324,7 +321,7 @@ static VALUE rb_git_remote_ls(int argc, VALUE *argv, VALUE self)
324
321
  cleanup:
325
322
 
326
323
  git_remote_disconnect(remote);
327
- git_strarray_free(&custom_headers);
324
+ xfree(custom_headers.strings);
328
325
 
329
326
  if (payload.exception)
330
327
  rb_jump_tag(payload.exception);
@@ -517,7 +514,7 @@ static VALUE rb_git_remote_check_connection(int argc, VALUE *argv, VALUE self)
517
514
  error = git_remote_connect(remote, direction, &callbacks, NULL, &custom_headers);
518
515
  git_remote_disconnect(remote);
519
516
 
520
- git_strarray_free(&custom_headers);
517
+ xfree(custom_headers.strings);
521
518
 
522
519
  if (payload.exception)
523
520
  rb_jump_tag(payload.exception);
@@ -617,7 +614,7 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
617
614
  error = git_remote_fetch(remote, &refspecs, &opts, log_message);
618
615
 
619
616
  xfree(refspecs.strings);
620
- git_strarray_free(&opts.custom_headers);
617
+ xfree(opts.custom_headers.strings);
621
618
 
622
619
  if (payload.exception)
623
620
  rb_jump_tag(payload.exception);
@@ -692,7 +689,7 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
692
689
  error = git_remote_push(remote, &refspecs, &opts);
693
690
 
694
691
  xfree(refspecs.strings);
695
- git_strarray_free(&opts.custom_headers);
692
+ xfree(opts.custom_headers.strings);
696
693
 
697
694
  if (payload.exception)
698
695
  rb_jump_tag(payload.exception);
@@ -139,12 +139,7 @@ static VALUE rb_git_remote_collection__each(VALUE self, int only_names)
139
139
 
140
140
  VALUE rb_repo;
141
141
 
142
- if (!rb_block_given_p()) {
143
- if (only_names)
144
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_name"));
145
- else
146
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each"));
147
- }
142
+ RETURN_ENUMERATOR(self, 0, 0);
148
143
 
149
144
  rb_repo = rugged_owner(self);
150
145
  rugged_check_repo(rb_repo);
@@ -1511,58 +1511,26 @@ static int rugged__status_cb(const char *path, unsigned int flags, void *payload
1511
1511
  return GIT_OK;
1512
1512
  }
1513
1513
 
1514
- /*
1515
- * call-seq:
1516
- * repo.status { |file, status_data| block }
1517
- * repo.status(path) -> status_data
1518
- *
1519
- * Returns the status for one or more files in the working directory
1520
- * of the repository. This is equivalent to the +git status+ command.
1521
- *
1522
- * The returned +status_data+ is always an array containing one or more
1523
- * status flags as Ruby symbols. Possible flags are:
1524
- *
1525
- * - +:index_new+: the file is new in the index
1526
- * - +:index_modified+: the file has been modified in the index
1527
- * - +:index_deleted+: the file has been deleted from the index
1528
- * - +:worktree_new+: the file is new in the working directory
1529
- * - +:worktree_modified+: the file has been modified in the working directory
1530
- * - +:worktree_deleted+: the file has been deleted from the working directory
1531
- *
1532
- * If a +block+ is given, status information will be gathered for every
1533
- * single file on the working dir. The +block+ will be called with the
1534
- * status data for each file.
1535
- *
1536
- * repo.status { |file, status_data| puts "#{file} has status: #{status_data.inspect}" }
1537
- *
1538
- * results in, for example:
1539
- *
1540
- * src/diff.c has status: [:index_new, :worktree_new]
1541
- * README has status: [:worktree_modified]
1542
- *
1543
- * If a +path+ is given instead, the function will return the +status_data+ for
1544
- * the file pointed to by path, or raise an exception if the path doesn't exist.
1545
- *
1546
- * +path+ must be relative to the repository's working directory.
1547
- *
1548
- * repo.status('src/diff.c') #=> [:index_new, :worktree_new]
1549
- */
1550
- static VALUE rb_git_repo_status(int argc, VALUE *argv, VALUE self)
1514
+ static VALUE rb_git_repo_file_status(VALUE self, VALUE rb_path)
1551
1515
  {
1516
+ unsigned int flags;
1552
1517
  int error;
1553
- VALUE rb_path;
1554
1518
  git_repository *repo;
1555
1519
 
1556
1520
  Data_Get_Struct(self, git_repository, repo);
1521
+ Check_Type(rb_path, T_STRING);
1522
+ error = git_status_file(&flags, repo, StringValueCStr(rb_path));
1523
+ rugged_exception_check(error);
1557
1524
 
1558
- if (rb_scan_args(argc, argv, "01", &rb_path) == 1) {
1559
- unsigned int flags;
1560
- Check_Type(rb_path, T_STRING);
1561
- error = git_status_file(&flags, repo, StringValueCStr(rb_path));
1562
- rugged_exception_check(error);
1525
+ return flags_to_rb(flags);
1526
+ }
1563
1527
 
1564
- return flags_to_rb(flags);
1565
- }
1528
+ static VALUE rb_git_repo_file_each_status(VALUE self)
1529
+ {
1530
+ int error;
1531
+ git_repository *repo;
1532
+
1533
+ Data_Get_Struct(self, git_repository, repo);
1566
1534
 
1567
1535
  if (!rb_block_given_p())
1568
1536
  rb_raise(rb_eRuntimeError,
@@ -1601,8 +1569,7 @@ static VALUE rb_git_repo_each_id(VALUE self)
1601
1569
  git_odb *odb;
1602
1570
  int error, exception = 0;
1603
1571
 
1604
- if (!rb_block_given_p())
1605
- return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_id"));
1572
+ RETURN_ENUMERATOR(self, 0, 0);
1606
1573
 
1607
1574
  Data_Get_Struct(self, git_repository, repo);
1608
1575
 
@@ -2605,7 +2572,8 @@ void Init_rugged_repo(void)
2605
2572
  rb_define_method(rb_cRuggedRepo, "path", rb_git_repo_path, 0);
2606
2573
  rb_define_method(rb_cRuggedRepo, "workdir", rb_git_repo_workdir, 0);
2607
2574
  rb_define_method(rb_cRuggedRepo, "workdir=", rb_git_repo_set_workdir, 1);
2608
- rb_define_method(rb_cRuggedRepo, "status", rb_git_repo_status, -1);
2575
+ rb_define_private_method(rb_cRuggedRepo, "file_status", rb_git_repo_file_status, 1);
2576
+ rb_define_private_method(rb_cRuggedRepo, "each_status", rb_git_repo_file_each_status, 0);
2609
2577
 
2610
2578
  rb_define_method(rb_cRuggedRepo, "index", rb_git_repo_get_index, 0);
2611
2579
  rb_define_method(rb_cRuggedRepo, "index=", rb_git_repo_set_index, 1);