rugged 0.27.10 → 0.27.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (420) 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 +54 -98
  5. data/vendor/libgit2/COPYING +0 -28
  6. data/vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake +1 -15
  7. data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +8 -9
  8. data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
  9. data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
  10. data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
  11. data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
  12. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -2
  13. data/vendor/libgit2/deps/http-parser/{COPYING → LICENSE-MIT} +0 -0
  14. data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
  15. data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
  16. data/vendor/libgit2/deps/regex/config.h +7 -0
  17. data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
  18. data/vendor/libgit2/deps/regex/regex.c +92 -0
  19. data/vendor/libgit2/deps/regex/regex.h +582 -0
  20. data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
  21. data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
  22. data/vendor/libgit2/deps/regex/regexec.c +4369 -0
  23. data/vendor/libgit2/deps/zlib/CMakeLists.txt +0 -1
  24. data/vendor/libgit2/deps/zlib/adler32.c +7 -0
  25. data/vendor/libgit2/deps/zlib/crc32.c +7 -0
  26. data/vendor/libgit2/include/git2.h +0 -5
  27. data/vendor/libgit2/include/git2/annotated_commit.h +0 -9
  28. data/vendor/libgit2/include/git2/attr.h +20 -38
  29. data/vendor/libgit2/include/git2/blame.h +25 -42
  30. data/vendor/libgit2/include/git2/blob.h +13 -45
  31. data/vendor/libgit2/include/git2/branch.h +1 -1
  32. data/vendor/libgit2/include/git2/buffer.h +16 -22
  33. data/vendor/libgit2/include/git2/checkout.h +32 -65
  34. data/vendor/libgit2/include/git2/cherrypick.h +7 -9
  35. data/vendor/libgit2/include/git2/clone.h +10 -12
  36. data/vendor/libgit2/include/git2/commit.h +3 -53
  37. data/vendor/libgit2/include/git2/common.h +8 -60
  38. data/vendor/libgit2/include/git2/config.h +19 -30
  39. data/vendor/libgit2/include/git2/describe.h +9 -32
  40. data/vendor/libgit2/include/git2/diff.h +156 -208
  41. data/vendor/libgit2/include/git2/errors.h +46 -54
  42. data/vendor/libgit2/include/git2/filter.h +0 -8
  43. data/vendor/libgit2/include/git2/ignore.h +2 -2
  44. data/vendor/libgit2/include/git2/index.h +52 -74
  45. data/vendor/libgit2/include/git2/indexer.h +6 -76
  46. data/vendor/libgit2/include/git2/inttypes.h +309 -0
  47. data/vendor/libgit2/include/git2/merge.h +18 -35
  48. data/vendor/libgit2/include/git2/net.h +5 -0
  49. data/vendor/libgit2/include/git2/notes.h +1 -1
  50. data/vendor/libgit2/include/git2/object.h +29 -17
  51. data/vendor/libgit2/include/git2/odb.h +11 -12
  52. data/vendor/libgit2/include/git2/odb_backend.h +9 -10
  53. data/vendor/libgit2/include/git2/oid.h +2 -2
  54. data/vendor/libgit2/include/git2/pack.h +3 -14
  55. data/vendor/libgit2/include/git2/proxy.h +8 -14
  56. data/vendor/libgit2/include/git2/rebase.h +6 -53
  57. data/vendor/libgit2/include/git2/refs.h +15 -33
  58. data/vendor/libgit2/include/git2/refspec.h +0 -17
  59. data/vendor/libgit2/include/git2/remote.h +24 -123
  60. data/vendor/libgit2/include/git2/repository.h +39 -76
  61. data/vendor/libgit2/include/git2/revert.h +4 -6
  62. data/vendor/libgit2/include/git2/revwalk.h +7 -7
  63. data/vendor/libgit2/include/git2/signature.h +2 -2
  64. data/vendor/libgit2/include/git2/stash.h +12 -15
  65. data/vendor/libgit2/include/git2/status.h +20 -33
  66. data/vendor/libgit2/include/git2/submodule.h +12 -30
  67. data/vendor/libgit2/include/git2/sys/commit.h +1 -1
  68. data/vendor/libgit2/include/git2/sys/config.h +13 -13
  69. data/vendor/libgit2/include/git2/sys/filter.h +6 -6
  70. data/vendor/libgit2/include/git2/sys/index.h +0 -3
  71. data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
  72. data/vendor/libgit2/include/git2/sys/merge.h +4 -9
  73. data/vendor/libgit2/include/git2/sys/odb_backend.h +22 -66
  74. data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -76
  75. data/vendor/libgit2/include/git2/sys/repository.h +1 -5
  76. data/vendor/libgit2/include/git2/sys/stream.h +12 -92
  77. data/vendor/libgit2/include/git2/sys/time.h +31 -0
  78. data/vendor/libgit2/include/git2/sys/transport.h +83 -129
  79. data/vendor/libgit2/include/git2/tag.h +4 -13
  80. data/vendor/libgit2/include/git2/trace.h +2 -2
  81. data/vendor/libgit2/include/git2/transaction.h +0 -1
  82. data/vendor/libgit2/include/git2/transport.h +311 -11
  83. data/vendor/libgit2/include/git2/tree.h +4 -4
  84. data/vendor/libgit2/include/git2/types.h +111 -33
  85. data/vendor/libgit2/include/git2/version.h +4 -4
  86. data/vendor/libgit2/include/git2/worktree.h +13 -48
  87. data/vendor/libgit2/libgit2.pc.in +13 -0
  88. data/vendor/libgit2/src/CMakeLists.txt +164 -96
  89. data/vendor/libgit2/src/annotated_commit.c +8 -15
  90. data/vendor/libgit2/src/apply.c +31 -537
  91. data/vendor/libgit2/src/apply.h +1 -3
  92. data/vendor/libgit2/src/array.h +2 -2
  93. data/vendor/libgit2/src/attr.c +75 -81
  94. data/vendor/libgit2/src/attr_file.c +121 -207
  95. data/vendor/libgit2/src/attr_file.h +9 -9
  96. data/vendor/libgit2/src/attrcache.c +53 -51
  97. data/vendor/libgit2/src/attrcache.h +1 -2
  98. data/vendor/libgit2/src/blame.c +20 -47
  99. data/vendor/libgit2/src/blame.h +1 -2
  100. data/vendor/libgit2/src/blame_git.c +20 -37
  101. data/vendor/libgit2/src/blob.c +42 -128
  102. data/vendor/libgit2/src/blob.h +2 -19
  103. data/vendor/libgit2/src/branch.c +43 -67
  104. data/vendor/libgit2/src/buf_text.c +6 -7
  105. data/vendor/libgit2/src/buffer.c +57 -69
  106. data/vendor/libgit2/src/buffer.h +1 -1
  107. data/vendor/libgit2/src/cache.c +45 -38
  108. data/vendor/libgit2/src/cache.h +3 -3
  109. data/vendor/libgit2/src/cc-compat.h +3 -20
  110. data/vendor/libgit2/src/checkout.c +90 -109
  111. data/vendor/libgit2/src/cherrypick.c +9 -15
  112. data/vendor/libgit2/src/clone.c +27 -49
  113. data/vendor/libgit2/src/clone.h +0 -4
  114. data/vendor/libgit2/src/commit.c +49 -117
  115. data/vendor/libgit2/src/commit.h +0 -7
  116. data/vendor/libgit2/src/commit_list.c +78 -30
  117. data/vendor/libgit2/src/commit_list.h +2 -2
  118. data/vendor/libgit2/src/common.h +91 -27
  119. data/vendor/libgit2/src/config.c +176 -194
  120. data/vendor/libgit2/src/config.h +20 -8
  121. data/vendor/libgit2/src/config_cache.c +35 -41
  122. data/vendor/libgit2/src/config_file.c +753 -439
  123. data/vendor/libgit2/src/config_file.h +73 -0
  124. data/vendor/libgit2/src/config_parse.c +63 -114
  125. data/vendor/libgit2/src/config_parse.h +16 -17
  126. data/vendor/libgit2/src/crlf.c +190 -219
  127. data/vendor/libgit2/src/delta.c +18 -25
  128. data/vendor/libgit2/src/describe.c +41 -42
  129. data/vendor/libgit2/src/diff.c +68 -53
  130. data/vendor/libgit2/src/diff.h +1 -2
  131. data/vendor/libgit2/src/diff_driver.c +49 -47
  132. data/vendor/libgit2/src/diff_file.c +17 -19
  133. data/vendor/libgit2/src/diff_file.h +1 -1
  134. data/vendor/libgit2/src/diff_generate.c +106 -162
  135. data/vendor/libgit2/src/diff_generate.h +3 -3
  136. data/vendor/libgit2/src/diff_parse.c +4 -4
  137. data/vendor/libgit2/src/diff_print.c +30 -42
  138. data/vendor/libgit2/src/diff_stats.c +7 -22
  139. data/vendor/libgit2/src/diff_tform.c +16 -16
  140. data/vendor/libgit2/src/diff_xdiff.c +3 -15
  141. data/vendor/libgit2/src/errors.c +39 -51
  142. data/vendor/libgit2/src/features.h.in +3 -11
  143. data/vendor/libgit2/src/fetch.c +5 -10
  144. data/vendor/libgit2/src/fetchhead.c +17 -17
  145. data/vendor/libgit2/src/filebuf.c +36 -32
  146. data/vendor/libgit2/src/filebuf.h +2 -2
  147. data/vendor/libgit2/src/{futils.c → fileops.c} +73 -80
  148. data/vendor/libgit2/src/{futils.h → fileops.h} +6 -6
  149. data/vendor/libgit2/src/filter.c +38 -46
  150. data/vendor/libgit2/src/filter.h +10 -0
  151. data/vendor/libgit2/src/fnmatch.c +248 -0
  152. data/vendor/libgit2/src/fnmatch.h +48 -0
  153. data/vendor/libgit2/src/global.c +63 -48
  154. data/vendor/libgit2/src/global.h +2 -0
  155. data/vendor/libgit2/src/hash.c +0 -61
  156. data/vendor/libgit2/src/hash.h +19 -20
  157. data/vendor/libgit2/src/hash/hash_collisiondetect.h +47 -0
  158. data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +17 -17
  159. data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
  160. data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +10 -4
  161. data/vendor/libgit2/src/hash/hash_openssl.h +59 -0
  162. data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +37 -47
  163. data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
  164. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
  165. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
  166. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
  167. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
  168. data/vendor/libgit2/src/hashsig.c +5 -5
  169. data/vendor/libgit2/src/idxmap.c +61 -107
  170. data/vendor/libgit2/src/idxmap.h +31 -153
  171. data/vendor/libgit2/src/ignore.c +47 -43
  172. data/vendor/libgit2/src/index.c +232 -337
  173. data/vendor/libgit2/src/index.h +1 -17
  174. data/vendor/libgit2/src/indexer.c +175 -346
  175. data/vendor/libgit2/src/integer.h +26 -71
  176. data/vendor/libgit2/src/iterator.c +70 -142
  177. data/vendor/libgit2/src/iterator.h +0 -15
  178. data/vendor/libgit2/src/khash.h +1 -3
  179. data/vendor/libgit2/src/map.h +1 -1
  180. data/vendor/libgit2/src/merge.c +100 -144
  181. data/vendor/libgit2/src/merge_driver.c +11 -11
  182. data/vendor/libgit2/src/merge_file.c +2 -2
  183. data/vendor/libgit2/src/mwindow.c +29 -24
  184. data/vendor/libgit2/src/mwindow.h +4 -4
  185. data/vendor/libgit2/src/netops.c +156 -55
  186. data/vendor/libgit2/src/netops.h +23 -3
  187. data/vendor/libgit2/src/notes.c +11 -16
  188. data/vendor/libgit2/src/object.c +69 -120
  189. data/vendor/libgit2/src/object.h +9 -22
  190. data/vendor/libgit2/src/object_api.c +8 -8
  191. data/vendor/libgit2/src/odb.c +93 -116
  192. data/vendor/libgit2/src/odb.h +7 -8
  193. data/vendor/libgit2/src/odb_loose.c +55 -62
  194. data/vendor/libgit2/src/odb_mempack.c +34 -21
  195. data/vendor/libgit2/src/odb_pack.c +14 -18
  196. data/vendor/libgit2/src/offmap.c +35 -53
  197. data/vendor/libgit2/src/offmap.h +21 -108
  198. data/vendor/libgit2/src/oid.c +7 -12
  199. data/vendor/libgit2/src/oidmap.c +47 -49
  200. data/vendor/libgit2/src/oidmap.h +24 -101
  201. data/vendor/libgit2/src/pack-objects.c +87 -88
  202. data/vendor/libgit2/src/pack-objects.h +8 -2
  203. data/vendor/libgit2/src/pack.c +101 -99
  204. data/vendor/libgit2/src/pack.h +19 -17
  205. data/vendor/libgit2/src/parse.c +0 -10
  206. data/vendor/libgit2/src/parse.h +3 -3
  207. data/vendor/libgit2/src/patch.c +4 -4
  208. data/vendor/libgit2/src/patch_generate.c +20 -20
  209. data/vendor/libgit2/src/patch_parse.c +63 -151
  210. data/vendor/libgit2/src/path.c +104 -117
  211. data/vendor/libgit2/src/path.h +71 -3
  212. data/vendor/libgit2/src/pathspec.c +19 -19
  213. data/vendor/libgit2/src/pool.c +22 -26
  214. data/vendor/libgit2/src/pool.h +7 -7
  215. data/vendor/libgit2/src/posix.c +10 -10
  216. data/vendor/libgit2/src/posix.h +1 -12
  217. data/vendor/libgit2/src/proxy.c +3 -8
  218. data/vendor/libgit2/src/push.c +31 -37
  219. data/vendor/libgit2/src/push.h +1 -2
  220. data/vendor/libgit2/src/rebase.c +59 -115
  221. data/vendor/libgit2/src/refdb.c +3 -15
  222. data/vendor/libgit2/src/refdb_fs.c +254 -381
  223. data/vendor/libgit2/src/reflog.c +15 -13
  224. data/vendor/libgit2/src/refs.c +88 -118
  225. data/vendor/libgit2/src/refs.h +3 -5
  226. data/vendor/libgit2/src/refspec.c +37 -56
  227. data/vendor/libgit2/src/refspec.h +1 -1
  228. data/vendor/libgit2/src/remote.c +215 -266
  229. data/vendor/libgit2/src/remote.h +2 -11
  230. data/vendor/libgit2/src/repository.c +225 -280
  231. data/vendor/libgit2/src/repository.h +40 -52
  232. data/vendor/libgit2/src/reset.c +8 -8
  233. data/vendor/libgit2/src/revert.c +9 -14
  234. data/vendor/libgit2/src/revparse.c +48 -47
  235. data/vendor/libgit2/src/revwalk.c +57 -120
  236. data/vendor/libgit2/src/revwalk.h +1 -22
  237. data/vendor/libgit2/src/settings.c +10 -47
  238. data/vendor/libgit2/src/signature.c +11 -11
  239. data/vendor/libgit2/src/sortedcache.c +36 -22
  240. data/vendor/libgit2/src/sortedcache.h +1 -1
  241. data/vendor/libgit2/src/stash.c +99 -125
  242. data/vendor/libgit2/src/status.c +22 -28
  243. data/vendor/libgit2/src/stream.h +2 -17
  244. data/vendor/libgit2/src/streams/curl.c +385 -0
  245. data/vendor/libgit2/src/{allocators/stdalloc.h → streams/curl.h} +5 -5
  246. data/vendor/libgit2/src/streams/openssl.c +114 -224
  247. data/vendor/libgit2/src/streams/openssl.h +108 -4
  248. data/vendor/libgit2/src/streams/socket.c +30 -55
  249. data/vendor/libgit2/src/streams/stransport.c +32 -57
  250. data/vendor/libgit2/src/streams/stransport.h +0 -5
  251. data/vendor/libgit2/src/streams/tls.c +19 -50
  252. data/vendor/libgit2/src/streams/tls.h +4 -12
  253. data/vendor/libgit2/src/strmap.c +74 -47
  254. data/vendor/libgit2/src/strmap.h +33 -108
  255. data/vendor/libgit2/src/submodule.c +216 -272
  256. data/vendor/libgit2/src/submodule.h +1 -1
  257. data/vendor/libgit2/src/sysdir.c +19 -29
  258. data/vendor/libgit2/src/tag.c +28 -41
  259. data/vendor/libgit2/src/tag.h +1 -2
  260. data/vendor/libgit2/src/trace.c +2 -2
  261. data/vendor/libgit2/src/trace.h +3 -3
  262. data/vendor/libgit2/src/trailer.c +38 -52
  263. data/vendor/libgit2/src/transaction.c +29 -30
  264. data/vendor/libgit2/src/transport.c +5 -5
  265. data/vendor/libgit2/src/transports/auth.c +11 -15
  266. data/vendor/libgit2/src/transports/auth.h +3 -10
  267. data/vendor/libgit2/src/transports/auth_negotiate.c +18 -33
  268. data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
  269. data/vendor/libgit2/src/transports/cred.c +24 -24
  270. data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
  271. data/vendor/libgit2/src/transports/git.c +31 -26
  272. data/vendor/libgit2/src/transports/http.c +348 -881
  273. data/vendor/libgit2/src/transports/http.h +0 -2
  274. data/vendor/libgit2/src/transports/local.c +35 -35
  275. data/vendor/libgit2/src/transports/smart.c +47 -70
  276. data/vendor/libgit2/src/transports/smart.h +4 -3
  277. data/vendor/libgit2/src/transports/smart_pkt.c +40 -43
  278. data/vendor/libgit2/src/transports/smart_protocol.c +116 -96
  279. data/vendor/libgit2/src/transports/ssh.c +66 -77
  280. data/vendor/libgit2/src/transports/winhttp.c +314 -318
  281. data/vendor/libgit2/src/tree-cache.c +12 -19
  282. data/vendor/libgit2/src/tree.c +142 -103
  283. data/vendor/libgit2/src/tree.h +12 -1
  284. data/vendor/libgit2/src/unix/map.c +3 -3
  285. data/vendor/libgit2/src/unix/posix.h +11 -1
  286. data/vendor/libgit2/src/userdiff.h +1 -3
  287. data/vendor/libgit2/src/util.c +56 -70
  288. data/vendor/libgit2/src/util.h +156 -28
  289. data/vendor/libgit2/src/vector.c +4 -4
  290. data/vendor/libgit2/src/win32/dir.c +3 -3
  291. data/vendor/libgit2/src/win32/findfile.c +3 -3
  292. data/vendor/libgit2/src/win32/map.c +11 -9
  293. data/vendor/libgit2/src/win32/msvc-compat.h +0 -6
  294. data/vendor/libgit2/src/win32/path_w32.c +9 -113
  295. data/vendor/libgit2/src/win32/path_w32.h +29 -18
  296. data/vendor/libgit2/src/win32/posix.h +4 -1
  297. data/vendor/libgit2/src/win32/posix_w32.c +45 -70
  298. data/vendor/libgit2/src/win32/precompiled.h +2 -0
  299. data/vendor/libgit2/src/win32/thread.c +10 -5
  300. data/vendor/libgit2/src/win32/w32_buffer.c +5 -9
  301. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -3
  302. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +75 -26
  303. data/vendor/libgit2/src/win32/w32_stack.c +11 -6
  304. data/vendor/libgit2/src/win32/w32_stack.h +3 -3
  305. data/vendor/libgit2/src/win32/w32_util.c +64 -27
  306. data/vendor/libgit2/src/win32/w32_util.h +49 -5
  307. data/vendor/libgit2/src/worktree.c +60 -95
  308. data/vendor/libgit2/src/worktree.h +0 -2
  309. data/vendor/libgit2/src/xdiff/xdiffi.c +5 -7
  310. data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
  311. data/vendor/libgit2/src/xdiff/xmerge.c +15 -27
  312. data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
  313. data/vendor/libgit2/src/zstream.c +4 -4
  314. metadata +33 -122
  315. data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
  316. data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
  317. data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
  318. data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +0 -93
  319. data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
  320. data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
  321. data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
  322. data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
  323. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
  324. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
  325. data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
  326. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
  327. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
  328. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
  329. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
  330. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
  331. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
  332. data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
  333. data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
  334. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
  335. data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
  336. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
  337. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
  338. data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
  339. data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
  340. data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
  341. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
  342. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  343. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  344. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  345. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  346. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  347. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  348. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  349. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  350. data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
  351. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
  352. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  353. data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
  354. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  355. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  356. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  357. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  358. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  359. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  360. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  361. data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
  362. data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
  363. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  364. data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
  365. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  366. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  367. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  368. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  369. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  370. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  371. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  372. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
  373. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  374. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
  375. data/vendor/libgit2/deps/winhttp/COPYING.GPL +0 -993
  376. data/vendor/libgit2/deps/winhttp/COPYING.LGPL +0 -502
  377. data/vendor/libgit2/deps/zlib/COPYING +0 -27
  378. data/vendor/libgit2/include/git2/apply.h +0 -149
  379. data/vendor/libgit2/include/git2/cert.h +0 -135
  380. data/vendor/libgit2/include/git2/cred.h +0 -308
  381. data/vendor/libgit2/include/git2/deprecated.h +0 -493
  382. data/vendor/libgit2/include/git2/mailmap.h +0 -115
  383. data/vendor/libgit2/include/git2/sys/alloc.h +0 -101
  384. data/vendor/libgit2/include/git2/sys/cred.h +0 -90
  385. data/vendor/libgit2/include/git2/sys/path.h +0 -64
  386. data/vendor/libgit2/src/alloc.c +0 -43
  387. data/vendor/libgit2/src/alloc.h +0 -40
  388. data/vendor/libgit2/src/allocators/stdalloc.c +0 -119
  389. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  390. data/vendor/libgit2/src/config_backend.h +0 -96
  391. data/vendor/libgit2/src/config_entries.c +0 -229
  392. data/vendor/libgit2/src/config_entries.h +0 -24
  393. data/vendor/libgit2/src/config_mem.c +0 -220
  394. data/vendor/libgit2/src/config_snapshot.c +0 -206
  395. data/vendor/libgit2/src/errors.h +0 -81
  396. data/vendor/libgit2/src/hash/sha1.h +0 -38
  397. data/vendor/libgit2/src/hash/sha1/collisiondetect.c +0 -48
  398. data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
  399. data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
  400. data/vendor/libgit2/src/hash/sha1/mbedtls.c +0 -46
  401. data/vendor/libgit2/src/hash/sha1/mbedtls.h +0 -19
  402. data/vendor/libgit2/src/hash/sha1/openssl.c +0 -59
  403. data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
  404. data/vendor/libgit2/src/mailmap.c +0 -485
  405. data/vendor/libgit2/src/mailmap.h +0 -35
  406. data/vendor/libgit2/src/net.c +0 -184
  407. data/vendor/libgit2/src/net.h +0 -36
  408. data/vendor/libgit2/src/reader.c +0 -265
  409. data/vendor/libgit2/src/reader.h +0 -107
  410. data/vendor/libgit2/src/regexp.c +0 -221
  411. data/vendor/libgit2/src/regexp.h +0 -97
  412. data/vendor/libgit2/src/streams/mbedtls.c +0 -483
  413. data/vendor/libgit2/src/streams/mbedtls.h +0 -23
  414. data/vendor/libgit2/src/streams/registry.c +0 -118
  415. data/vendor/libgit2/src/streams/registry.h +0 -19
  416. data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
  417. data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
  418. data/vendor/libgit2/src/wildmatch.c +0 -320
  419. data/vendor/libgit2/src/wildmatch.h +0 -23
  420. 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,31 @@ 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,
110
108
  GIT_LOGALLREFUPDATES_UNSET = 2,
111
- GIT_LOGALLREFUPDATES_ALWAYS = 3,
112
109
  GIT_LOGALLREFUPDATES_DEFAULT = GIT_LOGALLREFUPDATES_UNSET,
113
110
  /* core.protectHFS */
114
- GIT_PROTECTHFS_DEFAULT = GIT_CONFIGMAP_FALSE,
111
+ GIT_PROTECTHFS_DEFAULT = GIT_CVAR_FALSE,
115
112
  /* core.protectNTFS */
116
- GIT_PROTECTNTFS_DEFAULT = GIT_CONFIGMAP_TRUE,
113
+ GIT_PROTECTNTFS_DEFAULT = GIT_CVAR_TRUE,
117
114
  /* core.fsyncObjectFiles */
118
- GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CONFIGMAP_FALSE,
119
- } git_configmap_value;
115
+ GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CVAR_FALSE,
116
+ } git_cvar_value;
120
117
 
121
118
  /* internal repository init flags */
122
119
  enum {
@@ -154,7 +151,7 @@ struct git_repository {
154
151
 
155
152
  git_atomic attr_session_key;
156
153
 
157
- git_configmap_value configmap_cache[GIT_CONFIGMAP_CACHE_MAX];
154
+ git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX];
158
155
  git_strmap *submodule_cache;
159
156
  };
160
157
 
@@ -176,13 +173,6 @@ int git_repository_create_head(const char *git_dir, const char *ref_name);
176
173
  */
177
174
  typedef int (*git_repository_foreach_head_cb)(git_repository *repo, const char *path, void *payload);
178
175
 
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
176
  /*
187
177
  * Iterate over repository and all worktree HEADs.
188
178
  *
@@ -191,9 +181,7 @@ enum {
191
181
  * executed with the given payload. The return value equals the
192
182
  * return value of the last executed callback function.
193
183
  */
194
- int git_repository_foreach_head(git_repository *repo,
195
- git_repository_foreach_head_cb cb,
196
- int flags, void *payload);
184
+ int git_repository_foreach_head(git_repository *repo, git_repository_foreach_head_cb cb, void *payload);
197
185
 
198
186
  /*
199
187
  * Weak pointers to repository internals.
@@ -208,13 +196,13 @@ int git_repository_refdb__weakptr(git_refdb **out, git_repository *repo);
208
196
  int git_repository_index__weakptr(git_index **out, git_repository *repo);
209
197
 
210
198
  /*
211
- * Configuration map cache
199
+ * CVAR cache
212
200
  *
213
201
  * Efficient access to the most used config variables of a repository.
214
202
  * The cache is cleared every time the config backend is replaced.
215
203
  */
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);
204
+ int git_repository__cvar(int *out, git_repository *repo, git_cvar_cached cvar);
205
+ void git_repository__cvar_cache_clear(git_repository *repo);
218
206
 
219
207
  GIT_INLINE(int) git_repository__ensure_not_bare(
220
208
  git_repository *repo,
@@ -223,8 +211,8 @@ GIT_INLINE(int) git_repository__ensure_not_bare(
223
211
  if (!git_repository_is_bare(repo))
224
212
  return 0;
225
213
 
226
- git_error_set(
227
- GIT_ERROR_REPOSITORY,
214
+ giterr_set(
215
+ GITERR_REPOSITORY,
228
216
  "cannot %s. This operation is not allowed against bare repositories.",
229
217
  operation_name);
230
218
 
@@ -42,12 +42,12 @@ int git_reset_default(
42
42
 
43
43
  if (target) {
44
44
  if (git_object_owner(target) != repo) {
45
- git_error_set(GIT_ERROR_OBJECT,
45
+ giterr_set(GITERR_OBJECT,
46
46
  "%s_default - The given target does not belong to this repository.", ERROR_MSG);
47
47
  return -1;
48
48
  }
49
49
 
50
- if ((error = git_object_peel(&commit, target, GIT_OBJECT_COMMIT)) < 0 ||
50
+ if ((error = git_object_peel(&commit, target, GIT_OBJ_COMMIT)) < 0 ||
51
51
  (error = git_commit_tree(&tree, (git_commit *)commit)) < 0)
52
52
  goto cleanup;
53
53
  }
@@ -70,7 +70,7 @@ int git_reset_default(
70
70
  error = git_index_conflict_remove(index, delta->old_file.path);
71
71
  if (error < 0) {
72
72
  if (delta->status == GIT_DELTA_ADDED && error == GIT_ENOTFOUND)
73
- git_error_clear();
73
+ giterr_clear();
74
74
  else
75
75
  goto cleanup;
76
76
  }
@@ -119,7 +119,7 @@ static int reset(
119
119
  opts = *checkout_opts;
120
120
 
121
121
  if (git_object_owner(target) != repo) {
122
- git_error_set(GIT_ERROR_OBJECT,
122
+ giterr_set(GITERR_OBJECT,
123
123
  "%s - The given target does not belong to this repository.", ERROR_MSG);
124
124
  return -1;
125
125
  }
@@ -129,7 +129,7 @@ static int reset(
129
129
  reset_type == GIT_RESET_MIXED ? "reset mixed" : "reset hard")) < 0)
130
130
  return error;
131
131
 
132
- if ((error = git_object_peel(&commit, target, GIT_OBJECT_COMMIT)) < 0 ||
132
+ if ((error = git_object_peel(&commit, target, GIT_OBJ_COMMIT)) < 0 ||
133
133
  (error = git_repository_index(&index, repo)) < 0 ||
134
134
  (error = git_commit_tree(&tree, (git_commit *)commit)) < 0)
135
135
  goto cleanup;
@@ -138,7 +138,7 @@ static int reset(
138
138
  (git_repository_state(repo) == GIT_REPOSITORY_STATE_MERGE ||
139
139
  git_index_has_conflicts(index)))
140
140
  {
141
- git_error_set(GIT_ERROR_OBJECT, "%s (soft) in the middle of a merge", ERROR_MSG);
141
+ giterr_set(GITERR_OBJECT, "%s (soft) in the middle of a merge", ERROR_MSG);
142
142
  error = GIT_EUNMERGED;
143
143
  goto cleanup;
144
144
  }
@@ -167,7 +167,7 @@ static int reset(
167
167
  goto cleanup;
168
168
 
169
169
  if ((error = git_repository_state_cleanup(repo)) < 0) {
170
- git_error_set(GIT_ERROR_INDEX, "%s - failed to clean up merge data", ERROR_MSG);
170
+ giterr_set(GITERR_INDEX, "%s - failed to clean up merge data", ERROR_MSG);
171
171
  goto cleanup;
172
172
  }
173
173
  }
@@ -176,7 +176,7 @@ cleanup:
176
176
  git_object_free(commit);
177
177
  git_index_free(index);
178
178
  git_tree_free(tree);
179
- git_buf_dispose(&log_message);
179
+ git_buf_free(&log_message);
180
180
 
181
181
  return error;
182
182
  }
@@ -29,14 +29,14 @@ 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
 
36
36
  if (error < 0)
37
37
  git_filebuf_cleanup(&file);
38
38
 
39
- git_buf_dispose(&file_path);
39
+ git_buf_free(&file_path);
40
40
 
41
41
  return error;
42
42
  }
@@ -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;
@@ -62,7 +62,7 @@ cleanup:
62
62
  if (error < 0)
63
63
  git_filebuf_cleanup(&file);
64
64
 
65
- git_buf_dispose(&file_path);
65
+ git_buf_free(&file_path);
66
66
 
67
67
  return error;
68
68
  }
@@ -112,7 +112,7 @@ static int revert_seterr(git_commit *commit, const char *fmt)
112
112
  git_oid_fmt(commit_oidstr, git_commit_id(commit));
113
113
  commit_oidstr[GIT_OID_HEXSZ] = '\0';
114
114
 
115
- git_error_set(GIT_ERROR_REVERT, fmt, commit_oidstr);
115
+ giterr_set(GITERR_REVERT, fmt, commit_oidstr);
116
116
 
117
117
  return -1;
118
118
  }
@@ -182,7 +182,7 @@ int git_revert(
182
182
 
183
183
  assert(repo && commit);
184
184
 
185
- GIT_ERROR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options");
185
+ GITERR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options");
186
186
 
187
187
  if ((error = git_repository__ensure_not_bare(repo, "revert")) < 0)
188
188
  return error;
@@ -201,7 +201,7 @@ int git_revert(
201
201
  (error = write_revert_head(repo, commit_oidstr)) < 0 ||
202
202
  (error = write_merge_msg(repo, commit_oidstr, commit_msg)) < 0 ||
203
203
  (error = git_repository_head(&our_ref, repo)) < 0 ||
204
- (error = git_reference_peel((git_object **)&our_commit, our_ref, GIT_OBJECT_COMMIT)) < 0 ||
204
+ (error = git_reference_peel((git_object **)&our_commit, our_ref, GIT_OBJ_COMMIT)) < 0 ||
205
205
  (error = git_revert_commit(&index, repo, commit, our_commit, opts.mainline, &opts.merge_opts)) < 0 ||
206
206
  (error = git_merge__check_result(repo, index)) < 0 ||
207
207
  (error = git_merge__append_conflicts_to_merge_msg(repo, index)) < 0 ||
@@ -219,19 +219,14 @@ done:
219
219
  git_index_free(index);
220
220
  git_commit_free(our_commit);
221
221
  git_reference_free(our_ref);
222
- git_buf_dispose(&their_label);
222
+ git_buf_free(&their_label);
223
223
 
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
 
@@ -21,7 +22,7 @@ static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const cha
21
22
  if (git_oid_fromstrn(&oid, spec, speclen) < 0)
22
23
  return GIT_ENOTFOUND;
23
24
 
24
- return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJECT_ANY);
25
+ return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJ_ANY);
25
26
  }
26
27
 
27
28
  static int maybe_sha(git_object** out, git_repository *repo, const char *spec)
@@ -41,20 +42,22 @@ 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
 
48
49
  if (*pattern == '\0') {
49
- git_error_set(GIT_ERROR_REGEX, "empty pattern");
50
+ giterr_set(GITERR_REGEX, "empty 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 = giterr_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;
@@ -98,7 +101,7 @@ static int revparse_lookup_object(
98
101
  if (!error) {
99
102
 
100
103
  error = git_object_lookup(
101
- object_out, repo, git_reference_target(ref), GIT_OBJECT_ANY);
104
+ object_out, repo, git_reference_target(ref), GIT_OBJ_ANY);
102
105
 
103
106
  if (!error)
104
107
  *reference_out = ref;
@@ -116,7 +119,7 @@ static int revparse_lookup_object(
116
119
  if ((error = maybe_describe(object_out, repo, spec)) != GIT_ENOTFOUND)
117
120
  return error;
118
121
 
119
- git_error_set(GIT_ERROR_REFERENCE, "revspec '%s' not found", spec);
122
+ giterr_set(GITERR_REFERENCE, "revspec '%s' not found", spec);
120
123
  return GIT_ENOTFOUND;
121
124
  }
122
125
 
@@ -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;
@@ -197,8 +198,8 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
197
198
 
198
199
  cleanup:
199
200
  git_reference_free(ref);
200
- git_buf_dispose(&buf);
201
- git_regexp_dispose(&preg);
201
+ git_buf_free(&buf);
202
+ regfree(&preg);
202
203
  git_reflog_free(reflog);
203
204
  return error;
204
205
  }
@@ -244,8 +245,8 @@ static int retrieve_oid_from_reflog(git_oid *oid, git_reference *ref, size_t ide
244
245
  return 0;
245
246
 
246
247
  notfound:
247
- git_error_set(
248
- GIT_ERROR_REFERENCE,
248
+ giterr_set(
249
+ GITERR_REFERENCE,
249
250
  "reflog for '%s' has only %"PRIuZ" entries, asked for %"PRIuZ,
250
251
  git_reference_name(ref), numentries, identifier);
251
252
 
@@ -268,14 +269,14 @@ static int retrieve_revobject_from_reflog(git_object **out, git_reference **base
268
269
  }
269
270
 
270
271
  if (position == 0) {
271
- error = git_object_lookup(out, repo, git_reference_target(ref), GIT_OBJECT_ANY);
272
+ error = git_object_lookup(out, repo, git_reference_target(ref), GIT_OBJ_ANY);
272
273
  goto cleanup;
273
274
  }
274
275
 
275
276
  if ((error = retrieve_oid_from_reflog(&oid, ref, position)) < 0)
276
277
  goto cleanup;
277
278
 
278
- error = git_object_lookup(out, repo, &oid, GIT_OBJECT_ANY);
279
+ error = git_object_lookup(out, repo, &oid, GIT_OBJ_ANY);
279
280
 
280
281
  cleanup:
281
282
  git_reference_free(ref);
@@ -350,30 +351,30 @@ static int handle_at_syntax(git_object **out, git_reference **ref, const char *s
350
351
  error = retrieve_revobject_from_reflog(out, ref, repo, git_buf_cstr(&identifier), (size_t)timestamp);
351
352
 
352
353
  cleanup:
353
- git_buf_dispose(&identifier);
354
+ git_buf_free(&identifier);
354
355
  return error;
355
356
  }
356
357
 
357
- static git_object_t parse_obj_type(const char *str)
358
+ static git_otype parse_obj_type(const char *str)
358
359
  {
359
360
  if (!strcmp(str, "commit"))
360
- return GIT_OBJECT_COMMIT;
361
+ return GIT_OBJ_COMMIT;
361
362
 
362
363
  if (!strcmp(str, "tree"))
363
- return GIT_OBJECT_TREE;
364
+ return GIT_OBJ_TREE;
364
365
 
365
366
  if (!strcmp(str, "blob"))
366
- return GIT_OBJECT_BLOB;
367
+ return GIT_OBJ_BLOB;
367
368
 
368
369
  if (!strcmp(str, "tag"))
369
- return GIT_OBJECT_TAG;
370
+ return GIT_OBJ_TAG;
370
371
 
371
- return GIT_OBJECT_INVALID;
372
+ return GIT_OBJ_BAD;
372
373
  }
373
374
 
374
375
  static int dereference_to_non_tag(git_object **out, git_object *obj)
375
376
  {
376
- if (git_object_type(obj) == GIT_OBJECT_TAG)
377
+ if (git_object_type(obj) == GIT_OBJ_TAG)
377
378
  return git_tag_peel(out, (git_tag *)obj);
378
379
 
379
380
  return git_object_dup(out, obj);
@@ -384,7 +385,7 @@ static int handle_caret_parent_syntax(git_object **out, git_object *obj, int n)
384
385
  git_object *temp_commit = NULL;
385
386
  int error;
386
387
 
387
- if ((error = git_object_peel(&temp_commit, obj, GIT_OBJECT_COMMIT)) < 0)
388
+ if ((error = git_object_peel(&temp_commit, obj, GIT_OBJ_COMMIT)) < 0)
388
389
  return (error == GIT_EAMBIGUOUS || error == GIT_ENOTFOUND) ?
389
390
  GIT_EINVALIDSPEC : error;
390
391
 
@@ -404,7 +405,7 @@ static int handle_linear_syntax(git_object **out, git_object *obj, int n)
404
405
  git_object *temp_commit = NULL;
405
406
  int error;
406
407
 
407
- if ((error = git_object_peel(&temp_commit, obj, GIT_OBJECT_COMMIT)) < 0)
408
+ if ((error = git_object_peel(&temp_commit, obj, GIT_OBJ_COMMIT)) < 0)
408
409
  return (error == GIT_EAMBIGUOUS || error == GIT_ENOTFOUND) ?
409
410
  GIT_EINVALIDSPEC : error;
410
411
 
@@ -423,7 +424,7 @@ static int handle_colon_syntax(
423
424
  int error = -1;
424
425
  git_tree_entry *entry = NULL;
425
426
 
426
- if ((error = git_object_peel(&tree, obj, GIT_OBJECT_TREE)) < 0)
427
+ if ((error = git_object_peel(&tree, obj, GIT_OBJ_TREE)) < 0)
427
428
  return error == GIT_ENOTFOUND ? GIT_EINVALIDSPEC : error;
428
429
 
429
430
  if (*path == '\0') {
@@ -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;
@@ -455,11 +456,11 @@ static int walk_and_search(git_object **out, git_revwalk *walk, git_regexp *rege
455
456
 
456
457
  while (!(error = git_revwalk_next(&oid, walk))) {
457
458
 
458
- error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid, GIT_OBJECT_COMMIT);
459
+ error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid, GIT_OBJ_COMMIT);
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;
@@ -504,7 +505,7 @@ cleanup:
504
505
 
505
506
  static int handle_caret_curly_syntax(git_object **out, git_object *obj, const char *curly_braces_content)
506
507
  {
507
- git_object_t expected_type;
508
+ git_otype expected_type;
508
509
 
509
510
  if (*curly_braces_content == '\0')
510
511
  return dereference_to_non_tag(out, obj);
@@ -514,7 +515,7 @@ static int handle_caret_curly_syntax(git_object **out, git_object *obj, const ch
514
515
 
515
516
  expected_type = parse_obj_type(curly_braces_content);
516
517
 
517
- if (expected_type == GIT_OBJECT_INVALID)
518
+ if (expected_type == GIT_OBJ_BAD)
518
519
  return GIT_EINVALIDSPEC;
519
520
 
520
521
  return git_object_peel(out, obj, expected_type);
@@ -600,7 +601,7 @@ static int object_from_reference(git_object **object, git_reference *reference)
600
601
  if (git_reference_resolve(&resolved, reference) < 0)
601
602
  return -1;
602
603
 
603
- error = git_object_lookup(object, reference->db->repo, git_reference_target(resolved), GIT_OBJECT_ANY);
604
+ error = git_object_lookup(object, reference->db->repo, git_reference_target(resolved), GIT_OBJ_ANY);
604
605
  git_reference_free(resolved);
605
606
 
606
607
  return error;
@@ -624,7 +625,7 @@ static int ensure_base_rev_loaded(git_object **object, git_reference **reference
624
625
  return -1;
625
626
 
626
627
  error = revparse_lookup_object(object, reference, repo, git_buf_cstr(&identifier));
627
- git_buf_dispose(&identifier);
628
+ git_buf_free(&identifier);
628
629
 
629
630
  return error;
630
631
  }
@@ -758,7 +759,7 @@ int revparse__ext(
758
759
  * TODO: support merge-stage path lookup (":2:Makefile")
759
760
  * and plain index blob lookup (:i-am/a/blob)
760
761
  */
761
- git_error_set(GIT_ERROR_INVALID, "unimplemented");
762
+ giterr_set(GITERR_INVALID, "unimplemented");
762
763
  error = GIT_ERROR;
763
764
  goto cleanup;
764
765
  }
@@ -813,14 +814,14 @@ int revparse__ext(
813
814
  cleanup:
814
815
  if (error) {
815
816
  if (error == GIT_EINVALIDSPEC)
816
- git_error_set(GIT_ERROR_INVALID,
817
+ giterr_set(GITERR_INVALID,
817
818
  "failed to parse revision specifier - Invalid pattern '%s'", spec);
818
819
 
819
820
  git_object_free(base_rev);
820
821
  git_reference_free(reference);
821
822
  }
822
823
 
823
- git_buf_dispose(&buf);
824
+ git_buf_free(&buf);
824
825
  return error;
825
826
  }
826
827
 
@@ -897,7 +898,7 @@ int git_revparse(
897
898
  * allowed.
898
899
  */
899
900
  if (!git__strcmp(spec, "..")) {
900
- git_error_set(GIT_ERROR_INVALID, "Invalid pattern '..'");
901
+ giterr_set(GITERR_INVALID, "Invalid pattern '..'");
901
902
  return GIT_EINVALIDSPEC;
902
903
  }
903
904