rugged 0.28.4 → 0.28.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/AUTHORS +0 -1
  4. data/vendor/libgit2/CMakeLists.txt +16 -36
  5. data/vendor/libgit2/COPYING +0 -28
  6. data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +1 -5
  7. data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
  8. data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
  9. data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
  10. data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
  11. data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
  12. data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
  13. data/vendor/libgit2/deps/regex/COPYING +502 -0
  14. data/vendor/libgit2/deps/regex/config.h +7 -0
  15. data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
  16. data/vendor/libgit2/deps/regex/regex.c +92 -0
  17. data/vendor/libgit2/deps/regex/regex.h +582 -0
  18. data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
  19. data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
  20. data/vendor/libgit2/deps/regex/regexec.c +4369 -0
  21. data/vendor/libgit2/deps/zlib/adler32.c +7 -0
  22. data/vendor/libgit2/deps/zlib/crc32.c +7 -0
  23. data/vendor/libgit2/include/git2.h +0 -2
  24. data/vendor/libgit2/include/git2/apply.h +2 -22
  25. data/vendor/libgit2/include/git2/attr.h +12 -19
  26. data/vendor/libgit2/include/git2/blame.h +2 -2
  27. data/vendor/libgit2/include/git2/blob.h +12 -44
  28. data/vendor/libgit2/include/git2/buffer.h +14 -20
  29. data/vendor/libgit2/include/git2/checkout.h +14 -46
  30. data/vendor/libgit2/include/git2/cherrypick.h +3 -3
  31. data/vendor/libgit2/include/git2/clone.h +2 -2
  32. data/vendor/libgit2/include/git2/commit.h +1 -23
  33. data/vendor/libgit2/include/git2/common.h +5 -7
  34. data/vendor/libgit2/include/git2/config.h +12 -12
  35. data/vendor/libgit2/include/git2/deprecated.h +3 -243
  36. data/vendor/libgit2/include/git2/describe.h +4 -4
  37. data/vendor/libgit2/include/git2/diff.h +14 -16
  38. data/vendor/libgit2/include/git2/filter.h +0 -8
  39. data/vendor/libgit2/include/git2/index.h +1 -2
  40. data/vendor/libgit2/include/git2/indexer.h +4 -48
  41. data/vendor/libgit2/include/git2/inttypes.h +309 -0
  42. data/vendor/libgit2/include/git2/merge.h +10 -6
  43. data/vendor/libgit2/include/git2/net.h +5 -0
  44. data/vendor/libgit2/include/git2/object.h +14 -2
  45. data/vendor/libgit2/include/git2/odb.h +2 -3
  46. data/vendor/libgit2/include/git2/odb_backend.h +4 -5
  47. data/vendor/libgit2/include/git2/oid.h +1 -1
  48. data/vendor/libgit2/include/git2/pack.h +1 -12
  49. data/vendor/libgit2/include/git2/proxy.h +3 -5
  50. data/vendor/libgit2/include/git2/rebase.h +2 -46
  51. data/vendor/libgit2/include/git2/refs.h +0 -19
  52. data/vendor/libgit2/include/git2/remote.h +12 -35
  53. data/vendor/libgit2/include/git2/repository.h +2 -24
  54. data/vendor/libgit2/include/git2/revert.h +1 -1
  55. data/vendor/libgit2/include/git2/stash.h +3 -3
  56. data/vendor/libgit2/include/git2/status.h +16 -25
  57. data/vendor/libgit2/include/git2/submodule.h +3 -20
  58. data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
  59. data/vendor/libgit2/include/git2/sys/odb_backend.h +4 -48
  60. data/vendor/libgit2/include/git2/sys/refdb_backend.h +21 -57
  61. data/vendor/libgit2/include/git2/sys/repository.h +1 -5
  62. data/vendor/libgit2/include/git2/sys/time.h +31 -0
  63. data/vendor/libgit2/include/git2/sys/transport.h +2 -2
  64. data/vendor/libgit2/include/git2/tag.h +2 -11
  65. data/vendor/libgit2/include/git2/trace.h +2 -2
  66. data/vendor/libgit2/include/git2/transport.h +340 -11
  67. data/vendor/libgit2/include/git2/tree.h +1 -1
  68. data/vendor/libgit2/include/git2/types.h +89 -4
  69. data/vendor/libgit2/include/git2/version.h +2 -2
  70. data/vendor/libgit2/include/git2/worktree.h +5 -5
  71. data/vendor/libgit2/libgit2.pc.in +13 -0
  72. data/vendor/libgit2/src/CMakeLists.txt +222 -88
  73. data/vendor/libgit2/src/alloc.c +14 -2
  74. data/vendor/libgit2/src/apply.c +30 -60
  75. data/vendor/libgit2/src/attr.c +64 -70
  76. data/vendor/libgit2/src/attr_file.c +96 -189
  77. data/vendor/libgit2/src/attr_file.h +9 -9
  78. data/vendor/libgit2/src/attrcache.c +46 -44
  79. data/vendor/libgit2/src/attrcache.h +1 -2
  80. data/vendor/libgit2/src/blame.c +5 -17
  81. data/vendor/libgit2/src/blame.h +1 -1
  82. data/vendor/libgit2/src/blame_git.c +7 -21
  83. data/vendor/libgit2/src/blob.c +17 -81
  84. data/vendor/libgit2/src/blob.h +2 -2
  85. data/vendor/libgit2/src/branch.c +5 -29
  86. data/vendor/libgit2/src/buffer.c +7 -14
  87. data/vendor/libgit2/src/cache.c +33 -26
  88. data/vendor/libgit2/src/cache.h +1 -1
  89. data/vendor/libgit2/src/cc-compat.h +0 -5
  90. data/vendor/libgit2/src/checkout.c +16 -26
  91. data/vendor/libgit2/src/cherrypick.c +3 -9
  92. data/vendor/libgit2/src/clone.c +7 -29
  93. data/vendor/libgit2/src/clone.h +0 -4
  94. data/vendor/libgit2/src/commit.c +21 -69
  95. data/vendor/libgit2/src/commit.h +0 -6
  96. data/vendor/libgit2/src/commit_list.c +76 -28
  97. data/vendor/libgit2/src/commit_list.h +2 -2
  98. data/vendor/libgit2/src/common.h +75 -3
  99. data/vendor/libgit2/src/config.c +40 -31
  100. data/vendor/libgit2/src/config.h +6 -7
  101. data/vendor/libgit2/src/config_backend.h +0 -12
  102. data/vendor/libgit2/src/config_cache.c +39 -39
  103. data/vendor/libgit2/src/config_entries.c +99 -69
  104. data/vendor/libgit2/src/config_entries.h +0 -1
  105. data/vendor/libgit2/src/config_file.c +380 -337
  106. data/vendor/libgit2/src/config_mem.c +16 -12
  107. data/vendor/libgit2/src/config_parse.c +29 -49
  108. data/vendor/libgit2/src/config_parse.h +12 -13
  109. data/vendor/libgit2/src/crlf.c +14 -14
  110. data/vendor/libgit2/src/describe.c +20 -21
  111. data/vendor/libgit2/src/diff.c +58 -43
  112. data/vendor/libgit2/src/diff.h +1 -2
  113. data/vendor/libgit2/src/diff_driver.c +38 -37
  114. data/vendor/libgit2/src/diff_file.c +7 -9
  115. data/vendor/libgit2/src/diff_file.h +1 -1
  116. data/vendor/libgit2/src/diff_generate.c +85 -135
  117. data/vendor/libgit2/src/diff_generate.h +2 -2
  118. data/vendor/libgit2/src/diff_parse.c +1 -1
  119. data/vendor/libgit2/src/diff_print.c +13 -25
  120. data/vendor/libgit2/src/diff_stats.c +1 -1
  121. data/vendor/libgit2/src/diff_tform.c +4 -4
  122. data/vendor/libgit2/src/errors.c +22 -12
  123. data/vendor/libgit2/src/features.h.in +2 -9
  124. data/vendor/libgit2/src/fetch.c +2 -7
  125. data/vendor/libgit2/src/fetchhead.c +1 -1
  126. data/vendor/libgit2/src/filebuf.c +10 -6
  127. data/vendor/libgit2/src/filebuf.h +2 -2
  128. data/vendor/libgit2/src/{futils.c → fileops.c} +17 -21
  129. data/vendor/libgit2/src/{futils.h → fileops.h} +5 -5
  130. data/vendor/libgit2/src/filter.c +8 -16
  131. data/vendor/libgit2/src/fnmatch.c +248 -0
  132. data/vendor/libgit2/src/fnmatch.h +48 -0
  133. data/vendor/libgit2/src/global.c +40 -12
  134. data/vendor/libgit2/src/global.h +2 -0
  135. data/vendor/libgit2/src/hash.c +0 -61
  136. data/vendor/libgit2/src/hash.h +21 -19
  137. data/vendor/libgit2/src/hash/{sha1/collisiondetect.c → hash_collisiondetect.h} +17 -14
  138. data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +19 -15
  139. data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
  140. data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +14 -4
  141. data/vendor/libgit2/src/hash/{sha1/mbedtls.c → hash_mbedtls.c} +7 -15
  142. data/vendor/libgit2/src/hash/{sha1/mbedtls.h → hash_mbedtls.h} +11 -6
  143. data/vendor/libgit2/src/hash/{sha1/openssl.c → hash_openssl.h} +18 -14
  144. data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +24 -34
  145. data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
  146. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
  147. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
  148. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
  149. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
  150. data/vendor/libgit2/src/hashsig.c +1 -1
  151. data/vendor/libgit2/src/idxmap.c +65 -91
  152. data/vendor/libgit2/src/idxmap.h +15 -151
  153. data/vendor/libgit2/src/ignore.c +38 -32
  154. data/vendor/libgit2/src/index.c +43 -66
  155. data/vendor/libgit2/src/index.h +1 -1
  156. data/vendor/libgit2/src/indexer.c +70 -69
  157. data/vendor/libgit2/src/integer.h +4 -39
  158. data/vendor/libgit2/src/iterator.c +22 -27
  159. data/vendor/libgit2/src/map.h +1 -1
  160. data/vendor/libgit2/src/merge.c +44 -58
  161. data/vendor/libgit2/src/merge_driver.c +4 -4
  162. data/vendor/libgit2/src/merge_file.c +1 -1
  163. data/vendor/libgit2/src/mwindow.c +23 -18
  164. data/vendor/libgit2/src/mwindow.h +4 -4
  165. data/vendor/libgit2/src/netops.c +165 -55
  166. data/vendor/libgit2/src/netops.h +25 -3
  167. data/vendor/libgit2/src/notes.c +2 -2
  168. data/vendor/libgit2/src/object.c +2 -2
  169. data/vendor/libgit2/src/object.h +0 -2
  170. data/vendor/libgit2/src/odb.c +23 -41
  171. data/vendor/libgit2/src/odb.h +2 -3
  172. data/vendor/libgit2/src/odb_loose.c +10 -17
  173. data/vendor/libgit2/src/odb_mempack.c +23 -10
  174. data/vendor/libgit2/src/odb_pack.c +4 -4
  175. data/vendor/libgit2/src/offmap.c +55 -43
  176. data/vendor/libgit2/src/offmap.h +24 -102
  177. data/vendor/libgit2/src/oid.c +1 -6
  178. data/vendor/libgit2/src/oidmap.c +57 -39
  179. data/vendor/libgit2/src/oidmap.h +19 -99
  180. data/vendor/libgit2/src/pack-objects.c +32 -25
  181. data/vendor/libgit2/src/pack-objects.h +1 -1
  182. data/vendor/libgit2/src/pack.c +47 -45
  183. data/vendor/libgit2/src/pack.h +14 -12
  184. data/vendor/libgit2/src/parse.c +0 -10
  185. data/vendor/libgit2/src/parse.h +3 -3
  186. data/vendor/libgit2/src/patch.c +1 -1
  187. data/vendor/libgit2/src/patch_generate.c +2 -2
  188. data/vendor/libgit2/src/patch_parse.c +31 -124
  189. data/vendor/libgit2/src/path.c +6 -43
  190. data/vendor/libgit2/src/path.h +0 -2
  191. data/vendor/libgit2/src/pathspec.c +13 -13
  192. data/vendor/libgit2/src/pool.c +22 -26
  193. data/vendor/libgit2/src/pool.h +7 -7
  194. data/vendor/libgit2/src/posix.c +7 -7
  195. data/vendor/libgit2/src/posix.h +1 -12
  196. data/vendor/libgit2/src/proxy.c +2 -7
  197. data/vendor/libgit2/src/push.c +5 -10
  198. data/vendor/libgit2/src/reader.c +2 -2
  199. data/vendor/libgit2/src/rebase.c +7 -66
  200. data/vendor/libgit2/src/refdb.c +0 -12
  201. data/vendor/libgit2/src/refdb_fs.c +165 -214
  202. data/vendor/libgit2/src/reflog.c +13 -11
  203. data/vendor/libgit2/src/refs.c +18 -24
  204. data/vendor/libgit2/src/refspec.c +16 -9
  205. data/vendor/libgit2/src/remote.c +52 -50
  206. data/vendor/libgit2/src/remote.h +2 -2
  207. data/vendor/libgit2/src/repository.c +100 -115
  208. data/vendor/libgit2/src/repository.h +40 -49
  209. data/vendor/libgit2/src/revert.c +3 -8
  210. data/vendor/libgit2/src/revparse.c +19 -18
  211. data/vendor/libgit2/src/revwalk.c +30 -63
  212. data/vendor/libgit2/src/revwalk.h +0 -20
  213. data/vendor/libgit2/src/settings.c +0 -5
  214. data/vendor/libgit2/src/sortedcache.c +26 -12
  215. data/vendor/libgit2/src/sortedcache.h +1 -1
  216. data/vendor/libgit2/src/stash.c +65 -45
  217. data/vendor/libgit2/src/status.c +9 -15
  218. data/vendor/libgit2/src/{allocators/stdalloc.c → stdalloc.c} +4 -3
  219. data/vendor/libgit2/src/{allocators/stdalloc.h → stdalloc.h} +4 -4
  220. data/vendor/libgit2/src/streams/openssl.c +0 -20
  221. data/vendor/libgit2/src/streams/socket.c +2 -2
  222. data/vendor/libgit2/src/strmap.c +84 -37
  223. data/vendor/libgit2/src/strmap.h +33 -105
  224. data/vendor/libgit2/src/submodule.c +70 -102
  225. data/vendor/libgit2/src/submodule.h +1 -1
  226. data/vendor/libgit2/src/sysdir.c +1 -11
  227. data/vendor/libgit2/src/tag.c +2 -10
  228. data/vendor/libgit2/src/trace.c +1 -1
  229. data/vendor/libgit2/src/trace.h +2 -2
  230. data/vendor/libgit2/src/trailer.c +32 -46
  231. data/vendor/libgit2/src/transaction.c +9 -10
  232. data/vendor/libgit2/src/transports/auth.c +9 -10
  233. data/vendor/libgit2/src/transports/auth.h +4 -11
  234. data/vendor/libgit2/src/transports/auth_negotiate.c +9 -23
  235. data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
  236. data/vendor/libgit2/src/transports/cred.c +6 -6
  237. data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
  238. data/vendor/libgit2/src/transports/git.c +16 -11
  239. data/vendor/libgit2/src/transports/http.c +276 -419
  240. data/vendor/libgit2/src/transports/http.h +1 -1
  241. data/vendor/libgit2/src/transports/local.c +9 -9
  242. data/vendor/libgit2/src/transports/smart.c +17 -17
  243. data/vendor/libgit2/src/transports/smart.h +2 -2
  244. data/vendor/libgit2/src/transports/smart_protocol.c +60 -36
  245. data/vendor/libgit2/src/transports/ssh.c +36 -46
  246. data/vendor/libgit2/src/transports/winhttp.c +207 -231
  247. data/vendor/libgit2/src/tree-cache.c +7 -14
  248. data/vendor/libgit2/src/tree.c +24 -10
  249. data/vendor/libgit2/src/unix/map.c +1 -1
  250. data/vendor/libgit2/src/unix/posix.h +11 -1
  251. data/vendor/libgit2/src/userdiff.h +1 -3
  252. data/vendor/libgit2/src/util.c +53 -51
  253. data/vendor/libgit2/src/util.h +21 -16
  254. data/vendor/libgit2/src/win32/map.c +5 -3
  255. data/vendor/libgit2/src/win32/path_w32.c +2 -12
  256. data/vendor/libgit2/src/win32/path_w32.h +29 -0
  257. data/vendor/libgit2/src/win32/posix.h +4 -1
  258. data/vendor/libgit2/src/win32/posix_w32.c +5 -40
  259. data/vendor/libgit2/src/win32/precompiled.h +2 -0
  260. data/vendor/libgit2/src/win32/thread.c +10 -5
  261. data/vendor/libgit2/src/win32/w32_buffer.c +3 -7
  262. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +93 -0
  263. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +2 -0
  264. data/vendor/libgit2/src/win32/w32_stack.c +9 -4
  265. data/vendor/libgit2/src/win32/w32_stack.h +3 -3
  266. data/vendor/libgit2/src/win32/w32_util.c +0 -31
  267. data/vendor/libgit2/src/win32/w32_util.h +32 -6
  268. data/vendor/libgit2/src/worktree.c +22 -36
  269. data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
  270. data/vendor/libgit2/src/xdiff/xmerge.c +0 -12
  271. data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
  272. metadata +34 -98
  273. data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
  274. data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
  275. data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
  276. data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
  277. data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
  278. data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
  279. data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
  280. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
  281. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
  282. data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
  283. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
  284. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
  285. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
  286. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
  287. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
  288. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
  289. data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
  290. data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
  291. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
  292. data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
  293. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
  294. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
  295. data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
  296. data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
  297. data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
  298. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
  299. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  300. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  301. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  302. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  303. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  304. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  305. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  306. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  307. data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
  308. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
  309. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  310. data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
  311. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  312. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  313. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  314. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  315. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  316. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  317. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  318. data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
  319. data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
  320. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  321. data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
  322. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  323. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  324. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  325. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  326. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  327. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  328. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  329. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
  330. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  331. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
  332. data/vendor/libgit2/include/git2/cert.h +0 -135
  333. data/vendor/libgit2/include/git2/cred.h +0 -308
  334. data/vendor/libgit2/include/git2/sys/cred.h +0 -90
  335. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  336. data/vendor/libgit2/src/config_snapshot.c +0 -206
  337. data/vendor/libgit2/src/errors.h +0 -81
  338. data/vendor/libgit2/src/hash/sha1.h +0 -38
  339. data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
  340. data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
  341. data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
  342. data/vendor/libgit2/src/net.c +0 -184
  343. data/vendor/libgit2/src/net.h +0 -36
  344. data/vendor/libgit2/src/regexp.c +0 -221
  345. data/vendor/libgit2/src/regexp.h +0 -97
  346. data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
  347. data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
  348. data/vendor/libgit2/src/wildmatch.c +0 -320
  349. data/vendor/libgit2/src/wildmatch.h +0 -23
  350. data/vendor/libgit2/src/win32/w32_common.h +0 -39
@@ -37,34 +37,34 @@ extern bool git_repository__fsync_gitdir;
37
37
 
38
38
  /** Cvar cache identifiers */
39
39
  typedef enum {
40
- GIT_CONFIGMAP_AUTO_CRLF = 0, /* core.autocrlf */
41
- GIT_CONFIGMAP_EOL, /* core.eol */
42
- GIT_CONFIGMAP_SYMLINKS, /* core.symlinks */
43
- GIT_CONFIGMAP_IGNORECASE, /* core.ignorecase */
44
- GIT_CONFIGMAP_FILEMODE, /* core.filemode */
45
- GIT_CONFIGMAP_IGNORESTAT, /* core.ignorestat */
46
- GIT_CONFIGMAP_TRUSTCTIME, /* core.trustctime */
47
- GIT_CONFIGMAP_ABBREV, /* core.abbrev */
48
- GIT_CONFIGMAP_PRECOMPOSE, /* core.precomposeunicode */
49
- GIT_CONFIGMAP_SAFE_CRLF, /* core.safecrlf */
50
- GIT_CONFIGMAP_LOGALLREFUPDATES, /* core.logallrefupdates */
51
- GIT_CONFIGMAP_PROTECTHFS, /* core.protectHFS */
52
- GIT_CONFIGMAP_PROTECTNTFS, /* core.protectNTFS */
53
- GIT_CONFIGMAP_FSYNCOBJECTFILES, /* core.fsyncObjectFiles */
54
- GIT_CONFIGMAP_CACHE_MAX
55
- } git_configmap_item;
40
+ GIT_CVAR_AUTO_CRLF = 0, /* core.autocrlf */
41
+ GIT_CVAR_EOL, /* core.eol */
42
+ GIT_CVAR_SYMLINKS, /* core.symlinks */
43
+ GIT_CVAR_IGNORECASE, /* core.ignorecase */
44
+ GIT_CVAR_FILEMODE, /* core.filemode */
45
+ GIT_CVAR_IGNORESTAT, /* core.ignorestat */
46
+ GIT_CVAR_TRUSTCTIME, /* core.trustctime */
47
+ GIT_CVAR_ABBREV, /* core.abbrev */
48
+ GIT_CVAR_PRECOMPOSE, /* core.precomposeunicode */
49
+ GIT_CVAR_SAFE_CRLF, /* core.safecrlf */
50
+ GIT_CVAR_LOGALLREFUPDATES, /* core.logallrefupdates */
51
+ GIT_CVAR_PROTECTHFS, /* core.protectHFS */
52
+ GIT_CVAR_PROTECTNTFS, /* core.protectNTFS */
53
+ GIT_CVAR_FSYNCOBJECTFILES, /* core.fsyncObjectFiles */
54
+ GIT_CVAR_CACHE_MAX
55
+ } git_cvar_cached;
56
56
 
57
57
  /**
58
- * Configuration map value enumerations
58
+ * CVAR value enumerations
59
59
  *
60
- * These are the values that are actually stored in the configmap cache,
61
- * instead of their string equivalents. These values are internal and
62
- * symbolic; make sure that none of them is set to `-1`, since that is
63
- * the unique identifier for "not cached"
60
+ * These are the values that are actually stored in the cvar cache, instead
61
+ * of their string equivalents. These values are internal and symbolic;
62
+ * make sure that none of them is set to `-1`, since that is the unique
63
+ * identifier for "not cached"
64
64
  */
65
65
  typedef enum {
66
66
  /* The value hasn't been loaded from the cache yet */
67
- GIT_CONFIGMAP_NOT_CACHED = -1,
67
+ GIT_CVAR_NOT_CACHED = -1,
68
68
 
69
69
  /* core.safecrlf: false, 'fail', 'warn' */
70
70
  GIT_SAFE_CRLF_FALSE = 0,
@@ -89,34 +89,34 @@ typedef enum {
89
89
  GIT_EOL_DEFAULT = GIT_EOL_NATIVE,
90
90
 
91
91
  /* core.symlinks: bool */
92
- GIT_SYMLINKS_DEFAULT = GIT_CONFIGMAP_TRUE,
92
+ GIT_SYMLINKS_DEFAULT = GIT_CVAR_TRUE,
93
93
  /* core.ignorecase */
94
- GIT_IGNORECASE_DEFAULT = GIT_CONFIGMAP_FALSE,
94
+ GIT_IGNORECASE_DEFAULT = GIT_CVAR_FALSE,
95
95
  /* core.filemode */
96
- GIT_FILEMODE_DEFAULT = GIT_CONFIGMAP_TRUE,
96
+ GIT_FILEMODE_DEFAULT = GIT_CVAR_TRUE,
97
97
  /* core.ignorestat */
98
- GIT_IGNORESTAT_DEFAULT = GIT_CONFIGMAP_FALSE,
98
+ GIT_IGNORESTAT_DEFAULT = GIT_CVAR_FALSE,
99
99
  /* core.trustctime */
100
- GIT_TRUSTCTIME_DEFAULT = GIT_CONFIGMAP_TRUE,
100
+ GIT_TRUSTCTIME_DEFAULT = GIT_CVAR_TRUE,
101
101
  /* core.abbrev */
102
102
  GIT_ABBREV_DEFAULT = 7,
103
103
  /* core.precomposeunicode */
104
- GIT_PRECOMPOSE_DEFAULT = GIT_CONFIGMAP_FALSE,
104
+ GIT_PRECOMPOSE_DEFAULT = GIT_CVAR_FALSE,
105
105
  /* core.safecrlf */
106
- GIT_SAFE_CRLF_DEFAULT = GIT_CONFIGMAP_FALSE,
106
+ GIT_SAFE_CRLF_DEFAULT = GIT_CVAR_FALSE,
107
107
  /* core.logallrefupdates */
108
- GIT_LOGALLREFUPDATES_FALSE = GIT_CONFIGMAP_FALSE,
109
- GIT_LOGALLREFUPDATES_TRUE = GIT_CONFIGMAP_TRUE,
108
+ GIT_LOGALLREFUPDATES_FALSE = GIT_CVAR_FALSE,
109
+ GIT_LOGALLREFUPDATES_TRUE = GIT_CVAR_TRUE,
110
110
  GIT_LOGALLREFUPDATES_UNSET = 2,
111
111
  GIT_LOGALLREFUPDATES_ALWAYS = 3,
112
112
  GIT_LOGALLREFUPDATES_DEFAULT = GIT_LOGALLREFUPDATES_UNSET,
113
113
  /* core.protectHFS */
114
- GIT_PROTECTHFS_DEFAULT = GIT_CONFIGMAP_FALSE,
114
+ GIT_PROTECTHFS_DEFAULT = GIT_CVAR_FALSE,
115
115
  /* core.protectNTFS */
116
- GIT_PROTECTNTFS_DEFAULT = GIT_CONFIGMAP_TRUE,
116
+ GIT_PROTECTNTFS_DEFAULT = GIT_CVAR_TRUE,
117
117
  /* core.fsyncObjectFiles */
118
- GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CONFIGMAP_FALSE,
119
- } git_configmap_value;
118
+ GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CVAR_FALSE,
119
+ } git_cvar_value;
120
120
 
121
121
  /* internal repository init flags */
122
122
  enum {
@@ -154,7 +154,7 @@ struct git_repository {
154
154
 
155
155
  git_atomic attr_session_key;
156
156
 
157
- git_configmap_value configmap_cache[GIT_CONFIGMAP_CACHE_MAX];
157
+ git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX];
158
158
  git_strmap *submodule_cache;
159
159
  };
160
160
 
@@ -176,13 +176,6 @@ int git_repository_create_head(const char *git_dir, const char *ref_name);
176
176
  */
177
177
  typedef int (*git_repository_foreach_head_cb)(git_repository *repo, const char *path, void *payload);
178
178
 
179
- enum {
180
- /* Skip enumeration of the main repository HEAD */
181
- GIT_REPOSITORY_FOREACH_HEAD_SKIP_REPO = (1u << 0),
182
- /* Skip enumeration of worktree HEADs */
183
- GIT_REPOSITORY_FOREACH_HEAD_SKIP_WORKTREES = (1u << 1),
184
- };
185
-
186
179
  /*
187
180
  * Iterate over repository and all worktree HEADs.
188
181
  *
@@ -191,9 +184,7 @@ enum {
191
184
  * executed with the given payload. The return value equals the
192
185
  * return value of the last executed callback function.
193
186
  */
194
- int git_repository_foreach_head(git_repository *repo,
195
- git_repository_foreach_head_cb cb,
196
- int flags, void *payload);
187
+ int git_repository_foreach_head(git_repository *repo, git_repository_foreach_head_cb cb, void *payload);
197
188
 
198
189
  /*
199
190
  * Weak pointers to repository internals.
@@ -208,13 +199,13 @@ int git_repository_refdb__weakptr(git_refdb **out, git_repository *repo);
208
199
  int git_repository_index__weakptr(git_index **out, git_repository *repo);
209
200
 
210
201
  /*
211
- * Configuration map cache
202
+ * CVAR cache
212
203
  *
213
204
  * Efficient access to the most used config variables of a repository.
214
205
  * The cache is cleared every time the config backend is replaced.
215
206
  */
216
- int git_repository__configmap_lookup(int *out, git_repository *repo, git_configmap_item item);
217
- void git_repository__configmap_lookup_cache_clear(git_repository *repo);
207
+ int git_repository__cvar(int *out, git_repository *repo, git_cvar_cached cvar);
208
+ void git_repository__cvar_cache_clear(git_repository *repo);
218
209
 
219
210
  GIT_INLINE(int) git_repository__ensure_not_bare(
220
211
  git_repository *repo,
@@ -29,7 +29,7 @@ static int write_revert_head(
29
29
  int error = 0;
30
30
 
31
31
  if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_REVERT_HEAD_FILE)) >= 0 &&
32
- (error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_REVERT_FILE_MODE)) >= 0 &&
32
+ (error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_REVERT_FILE_MODE)) >= 0 &&
33
33
  (error = git_filebuf_printf(&file, "%s\n", commit_oidstr)) >= 0)
34
34
  error = git_filebuf_commit(&file);
35
35
 
@@ -51,7 +51,7 @@ static int write_merge_msg(
51
51
  int error = 0;
52
52
 
53
53
  if ((error = git_buf_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 ||
54
- (error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_REVERT_FILE_MODE)) < 0 ||
54
+ (error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_FORCE, GIT_REVERT_FILE_MODE)) < 0 ||
55
55
  (error = git_filebuf_printf(&file, "Revert \"%s\"\n\nThis reverts commit %s.\n",
56
56
  commit_msgline, commit_oidstr)) < 0)
57
57
  goto cleanup;
@@ -224,14 +224,9 @@ done:
224
224
  return error;
225
225
  }
226
226
 
227
- int git_revert_options_init(git_revert_options *opts, unsigned int version)
227
+ int git_revert_init_options(git_revert_options *opts, unsigned int version)
228
228
  {
229
229
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
230
230
  opts, version, git_revert_options, GIT_REVERT_OPTIONS_INIT);
231
231
  return 0;
232
232
  }
233
-
234
- int git_revert_init_options(git_revert_options *opts, unsigned int version)
235
- {
236
- return git_revert_options_init(opts, version);
237
- }
@@ -7,10 +7,11 @@
7
7
 
8
8
  #include "common.h"
9
9
 
10
+ #include <assert.h>
11
+
10
12
  #include "buffer.h"
11
13
  #include "tree.h"
12
14
  #include "refdb.h"
13
- #include "regexp.h"
14
15
 
15
16
  #include "git2.h"
16
17
 
@@ -41,7 +42,7 @@ static int maybe_abbrev(git_object** out, git_repository *repo, const char *spec
41
42
  return maybe_sha_or_abbrev(out, repo, spec, speclen);
42
43
  }
43
44
 
44
- static int build_regex(git_regexp *regex, const char *pattern)
45
+ static int build_regex(regex_t *regex, const char *pattern)
45
46
  {
46
47
  int error;
47
48
 
@@ -50,11 +51,13 @@ static int build_regex(git_regexp *regex, const char *pattern)
50
51
  return GIT_EINVALIDSPEC;
51
52
  }
52
53
 
53
- error = git_regexp_compile(regex, pattern, 0);
54
+ error = p_regcomp(regex, pattern, REG_EXTENDED);
54
55
  if (!error)
55
56
  return 0;
56
57
 
57
- git_regexp_dispose(regex);
58
+ error = git_error_set_regex(regex, error);
59
+
60
+ regfree(regex);
58
61
 
59
62
  return error;
60
63
  }
@@ -63,7 +66,7 @@ static int maybe_describe(git_object**out, git_repository *repo, const char *spe
63
66
  {
64
67
  const char *substr;
65
68
  int error;
66
- git_regexp regex;
69
+ regex_t regex;
67
70
 
68
71
  substr = strstr(spec, "-g");
69
72
 
@@ -73,8 +76,8 @@ static int maybe_describe(git_object**out, git_repository *repo, const char *spe
73
76
  if (build_regex(&regex, ".+-[0-9]+-g[0-9a-fA-F]+") < 0)
74
77
  return -1;
75
78
 
76
- error = git_regexp_match(&regex, spec);
77
- git_regexp_dispose(&regex);
79
+ error = regexec(&regex, spec, 0, NULL, 0);
80
+ regfree(&regex);
78
81
 
79
82
  if (error)
80
83
  return GIT_ENOTFOUND;
@@ -140,11 +143,12 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
140
143
  {
141
144
  git_reference *ref = NULL;
142
145
  git_reflog *reflog = NULL;
143
- git_regexp preg;
146
+ regex_t preg;
144
147
  int error = -1;
145
148
  size_t i, numentries, cur;
146
149
  const git_reflog_entry *entry;
147
150
  const char *msg;
151
+ regmatch_t regexmatches[2];
148
152
  git_buf buf = GIT_BUF_INIT;
149
153
 
150
154
  cur = position;
@@ -164,14 +168,12 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
164
168
  numentries = git_reflog_entrycount(reflog);
165
169
 
166
170
  for (i = 0; i < numentries; i++) {
167
- git_regmatch regexmatches[2];
168
-
169
171
  entry = git_reflog_entry_byindex(reflog, i);
170
172
  msg = git_reflog_entry_message(entry);
171
173
  if (!msg)
172
174
  continue;
173
175
 
174
- if (git_regexp_search(&preg, msg, 2, regexmatches) < 0)
176
+ if (regexec(&preg, msg, 2, regexmatches, 0))
175
177
  continue;
176
178
 
177
179
  cur--;
@@ -179,8 +181,7 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
179
181
  if (cur > 0)
180
182
  continue;
181
183
 
182
- if ((git_buf_put(&buf, msg+regexmatches[1].start, regexmatches[1].end - regexmatches[1].start)) < 0)
183
- goto cleanup;
184
+ git_buf_put(&buf, msg+regexmatches[1].rm_so, regexmatches[1].rm_eo - regexmatches[1].rm_so);
184
185
 
185
186
  if ((error = git_reference_dwim(base_ref, repo, git_buf_cstr(&buf))) == 0)
186
187
  goto cleanup;
@@ -198,7 +199,7 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
198
199
  cleanup:
199
200
  git_reference_free(ref);
200
201
  git_buf_dispose(&buf);
201
- git_regexp_dispose(&preg);
202
+ regfree(&preg);
202
203
  git_reflog_free(reflog);
203
204
  return error;
204
205
  }
@@ -447,7 +448,7 @@ cleanup:
447
448
  return error;
448
449
  }
449
450
 
450
- static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *regex)
451
+ static int walk_and_search(git_object **out, git_revwalk *walk, regex_t *regex)
451
452
  {
452
453
  int error;
453
454
  git_oid oid;
@@ -459,7 +460,7 @@ static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *rege
459
460
  if ((error < 0) && (error != GIT_ENOTFOUND))
460
461
  return -1;
461
462
 
462
- if (!git_regexp_match(regex, git_commit_message((git_commit*)obj))) {
463
+ if (!regexec(regex, git_commit_message((git_commit*)obj), 0, NULL, 0)) {
463
464
  *out = obj;
464
465
  return 0;
465
466
  }
@@ -475,7 +476,7 @@ static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *rege
475
476
 
476
477
  static int handle_grep_syntax(git_object **out, git_repository *repo, const git_oid *spec_oid, const char *pattern)
477
478
  {
478
- git_regexp preg;
479
+ regex_t preg;
479
480
  git_revwalk *walk = NULL;
480
481
  int error;
481
482
 
@@ -496,7 +497,7 @@ static int handle_grep_syntax(git_object **out, git_repository *repo, const git_
496
497
  error = walk_and_search(out, walk, &preg);
497
498
 
498
499
  cleanup:
499
- git_regexp_dispose(&preg);
500
+ regfree(&preg);
500
501
  git_revwalk_free(walk);
501
502
 
502
503
  return error;
@@ -21,10 +21,13 @@ git_commit_list_node *git_revwalk__commit_lookup(
21
21
  git_revwalk *walk, const git_oid *oid)
22
22
  {
23
23
  git_commit_list_node *commit;
24
+ size_t pos;
25
+ int ret;
24
26
 
25
27
  /* lookup and reserve space if not already present */
26
- if ((commit = git_oidmap_get(walk->commits, oid)) != NULL)
27
- return commit;
28
+ pos = git_oidmap_lookup_index(walk->commits, oid);
29
+ if (git_oidmap_valid_index(walk->commits, pos))
30
+ return git_oidmap_value_at(walk->commits, pos);
28
31
 
29
32
  commit = git_commit_list_alloc_node(walk);
30
33
  if (commit == NULL)
@@ -32,13 +35,14 @@ git_commit_list_node *git_revwalk__commit_lookup(
32
35
 
33
36
  git_oid_cpy(&commit->oid, oid);
34
37
 
35
- if ((git_oidmap_set(walk->commits, &commit->oid, commit)) < 0)
36
- return NULL;
38
+ pos = git_oidmap_put(walk->commits, &commit->oid, &ret);
39
+ assert(ret != 0);
40
+ git_oidmap_set_value_at(walk->commits, pos, commit);
37
41
 
38
42
  return commit;
39
43
  }
40
44
 
41
- int git_revwalk__push_commit(git_revwalk *walk, const git_oid *oid, const git_revwalk__push_options *opts)
45
+ static int push_commit(git_revwalk *walk, const git_oid *oid, int uninteresting, int from_glob)
42
46
  {
43
47
  git_oid commit_id;
44
48
  int error;
@@ -54,7 +58,7 @@ int git_revwalk__push_commit(git_revwalk *walk, const git_oid *oid, const git_re
54
58
 
55
59
  if (error == GIT_ENOTFOUND || error == GIT_EINVALIDSPEC || error == GIT_EPEEL) {
56
60
  /* If this comes from e.g. push_glob("tags"), ignore this */
57
- if (opts->from_glob)
61
+ if (from_glob)
58
62
  return 0;
59
63
 
60
64
  git_error_set(GIT_ERROR_INVALID, "object is not a committish");
@@ -74,18 +78,16 @@ int git_revwalk__push_commit(git_revwalk *walk, const git_oid *oid, const git_re
74
78
  if (commit->uninteresting)
75
79
  return 0;
76
80
 
77
- if (opts->uninteresting) {
81
+ if (uninteresting) {
78
82
  walk->limited = 1;
79
83
  walk->did_hide = 1;
80
84
  } else {
81
85
  walk->did_push = 1;
82
86
  }
83
87
 
84
- commit->uninteresting = opts->uninteresting;
88
+ commit->uninteresting = uninteresting;
85
89
  list = walk->user_input;
86
- if ((opts->insert_by_date &&
87
- git_commit_list_insert_by_date(commit, &list) == NULL) ||
88
- git_commit_list_insert(commit, &list) == NULL) {
90
+ if (git_commit_list_insert(commit, &list) == NULL) {
89
91
  git_error_set_oom();
90
92
  return -1;
91
93
  }
@@ -97,36 +99,29 @@ int git_revwalk__push_commit(git_revwalk *walk, const git_oid *oid, const git_re
97
99
 
98
100
  int git_revwalk_push(git_revwalk *walk, const git_oid *oid)
99
101
  {
100
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
101
-
102
102
  assert(walk && oid);
103
-
104
- return git_revwalk__push_commit(walk, oid, &opts);
103
+ return push_commit(walk, oid, 0, false);
105
104
  }
106
105
 
107
106
 
108
107
  int git_revwalk_hide(git_revwalk *walk, const git_oid *oid)
109
108
  {
110
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
111
109
  assert(walk && oid);
112
-
113
- opts.uninteresting = 1;
114
- return git_revwalk__push_commit(walk, oid, &opts);
110
+ return push_commit(walk, oid, 1, false);
115
111
  }
116
112
 
117
- int git_revwalk__push_ref(git_revwalk *walk, const char *refname, const git_revwalk__push_options *opts)
113
+ static int push_ref(git_revwalk *walk, const char *refname, int hide, int from_glob)
118
114
  {
119
115
  git_oid oid;
120
116
 
121
117
  if (git_reference_name_to_id(&oid, walk->repo, refname) < 0)
122
118
  return -1;
123
119
 
124
- return git_revwalk__push_commit(walk, &oid, opts);
120
+ return push_commit(walk, &oid, hide, from_glob);
125
121
  }
126
122
 
127
- int git_revwalk__push_glob(git_revwalk *walk, const char *glob, const git_revwalk__push_options *given_opts)
123
+ static int push_glob(git_revwalk *walk, const char *glob, int hide)
128
124
  {
129
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
130
125
  int error = 0;
131
126
  git_buf buf = GIT_BUF_INIT;
132
127
  git_reference *ref;
@@ -135,9 +130,6 @@ int git_revwalk__push_glob(git_revwalk *walk, const char *glob, const git_revwal
135
130
 
136
131
  assert(walk && glob);
137
132
 
138
- if (given_opts)
139
- memcpy(&opts, given_opts, sizeof(opts));
140
-
141
133
  /* refs/ is implied if not given in the glob */
142
134
  if (git__prefixcmp(glob, GIT_REFS_DIR) != 0)
143
135
  git_buf_joinpath(&buf, GIT_REFS_DIR, glob);
@@ -153,9 +145,8 @@ int git_revwalk__push_glob(git_revwalk *walk, const char *glob, const git_revwal
153
145
  if ((error = git_reference_iterator_glob_new(&iter, walk->repo, buf.ptr)) < 0)
154
146
  goto out;
155
147
 
156
- opts.from_glob = true;
157
148
  while ((error = git_reference_next(&ref, iter)) == 0) {
158
- error = git_revwalk__push_ref(walk, git_reference_name(ref), &opts);
149
+ error = push_ref(walk, git_reference_name(ref), hide, true);
159
150
  git_reference_free(ref);
160
151
  if (error < 0)
161
152
  break;
@@ -171,74 +162,52 @@ out:
171
162
 
172
163
  int git_revwalk_push_glob(git_revwalk *walk, const char *glob)
173
164
  {
174
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
175
165
  assert(walk && glob);
176
-
177
- return git_revwalk__push_glob(walk, glob, &opts);
166
+ return push_glob(walk, glob, 0);
178
167
  }
179
168
 
180
169
  int git_revwalk_hide_glob(git_revwalk *walk, const char *glob)
181
170
  {
182
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
183
171
  assert(walk && glob);
184
-
185
- opts.uninteresting = 1;
186
- return git_revwalk__push_glob(walk, glob, &opts);
172
+ return push_glob(walk, glob, 1);
187
173
  }
188
174
 
189
175
  int git_revwalk_push_head(git_revwalk *walk)
190
176
  {
191
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
192
177
  assert(walk);
193
-
194
- return git_revwalk__push_ref(walk, GIT_HEAD_FILE, &opts);
178
+ return push_ref(walk, GIT_HEAD_FILE, 0, false);
195
179
  }
196
180
 
197
181
  int git_revwalk_hide_head(git_revwalk *walk)
198
182
  {
199
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
200
183
  assert(walk);
201
-
202
- opts.uninteresting = 1;
203
- return git_revwalk__push_ref(walk, GIT_HEAD_FILE, &opts);
184
+ return push_ref(walk, GIT_HEAD_FILE, 1, false);
204
185
  }
205
186
 
206
187
  int git_revwalk_push_ref(git_revwalk *walk, const char *refname)
207
188
  {
208
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
209
189
  assert(walk && refname);
210
-
211
- return git_revwalk__push_ref(walk, refname, &opts);
190
+ return push_ref(walk, refname, 0, false);
212
191
  }
213
192
 
214
193
  int git_revwalk_push_range(git_revwalk *walk, const char *range)
215
194
  {
216
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
217
195
  git_revspec revspec;
218
196
  int error = 0;
219
197
 
220
198
  if ((error = git_revparse(&revspec, walk->repo, range)))
221
199
  return error;
222
200
 
223
- if (!revspec.to) {
224
- git_error_set(GIT_ERROR_INVALID, "invalid revspec: range not provided");
225
- error = GIT_EINVALIDSPEC;
226
- goto out;
227
- }
228
-
229
201
  if (revspec.flags & GIT_REVPARSE_MERGE_BASE) {
230
202
  /* TODO: support "<commit>...<commit>" */
231
203
  git_error_set(GIT_ERROR_INVALID, "symmetric differences not implemented in revwalk");
232
- error = GIT_EINVALIDSPEC;
233
- goto out;
204
+ return GIT_EINVALIDSPEC;
234
205
  }
235
206
 
236
- opts.uninteresting = 1;
237
- if ((error = git_revwalk__push_commit(walk, git_object_id(revspec.from), &opts)))
207
+ if ((error = push_commit(walk, git_object_id(revspec.from), 1, false)))
238
208
  goto out;
239
209
 
240
- opts.uninteresting = 0;
241
- error = git_revwalk__push_commit(walk, git_object_id(revspec.to), &opts);
210
+ error = push_commit(walk, git_object_id(revspec.to), 0, false);
242
211
 
243
212
  out:
244
213
  git_object_free(revspec.from);
@@ -248,10 +217,8 @@ out:
248
217
 
249
218
  int git_revwalk_hide_ref(git_revwalk *walk, const char *refname)
250
219
  {
251
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
252
220
  assert(walk && refname);
253
- opts.uninteresting = 1;
254
- return git_revwalk__push_ref(walk, refname, &opts);
221
+ return push_ref(walk, refname, 1, false);
255
222
  }
256
223
 
257
224
  static int revwalk_enqueue_timesort(git_revwalk *walk, git_commit_list_node *commit)
@@ -659,8 +626,8 @@ int git_revwalk_new(git_revwalk **revwalk_out, git_repository *repo)
659
626
  git_revwalk *walk = git__calloc(1, sizeof(git_revwalk));
660
627
  GIT_ERROR_CHECK_ALLOC(walk);
661
628
 
662
- if (git_oidmap_new(&walk->commits) < 0)
663
- return -1;
629
+ walk->commits = git_oidmap_alloc();
630
+ GIT_ERROR_CHECK_ALLOC(walk->commits);
664
631
 
665
632
  if (git_pqueue_init(&walk->iterator_time, 0, 8, git_commit_list_time_cmp) < 0)
666
633
  return -1;