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
@@ -11,6 +11,7 @@
11
11
 
12
12
  #include <fcntl.h>
13
13
  #include <time.h>
14
+ #include "fnmatch.h"
14
15
 
15
16
  /* stat: file mode type testing macros */
16
17
  #ifndef S_IFGITLINK
@@ -89,18 +90,6 @@
89
90
  #define EAFNOSUPPORT (INT_MAX-1)
90
91
  #endif
91
92
 
92
- /* Provide a 64-bit size for offsets. */
93
-
94
- #if defined(_MSC_VER)
95
- typedef __int64 off64_t;
96
- #elif defined(__HAIKU__)
97
- typedef __haiku_std_int64 off64_t;
98
- #elif defined(__APPLE__)
99
- typedef __int64_t off64_t;
100
- #else
101
- typedef int64_t off64_t;
102
- #endif
103
-
104
93
  typedef int git_file;
105
94
 
106
95
  /**
@@ -9,29 +9,24 @@
9
9
 
10
10
  #include "git2/proxy.h"
11
11
 
12
- int git_proxy_options_init(git_proxy_options *opts, unsigned int version)
12
+ int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
13
13
  {
14
14
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
15
15
  opts, version, git_proxy_options, GIT_PROXY_OPTIONS_INIT);
16
16
  return 0;
17
17
  }
18
18
 
19
- int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
20
- {
21
- return git_proxy_options_init(opts, version);
22
- }
23
-
24
19
  int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
25
20
  {
26
21
  if (!src) {
27
- git_proxy_options_init(tgt, GIT_PROXY_OPTIONS_VERSION);
22
+ git_proxy_init_options(tgt, GIT_PROXY_OPTIONS_VERSION);
28
23
  return 0;
29
24
  }
30
25
 
31
26
  memcpy(tgt, src, sizeof(git_proxy_options));
32
27
  if (src->url) {
33
28
  tgt->url = git__strdup(src->url);
34
- GIT_ERROR_CHECK_ALLOC(tgt->url);
29
+ GITERR_CHECK_ALLOC(tgt->url);
35
30
  }
36
31
 
37
32
  return 0;
@@ -36,7 +36,7 @@ int git_push_new(git_push **out, git_remote *remote)
36
36
  *out = NULL;
37
37
 
38
38
  p = git__calloc(1, sizeof(*p));
39
- GIT_ERROR_CHECK_ALLOC(p);
39
+ GITERR_CHECK_ALLOC(p);
40
40
 
41
41
  p->repo = remote->repo;
42
42
  p->remote = remote;
@@ -70,11 +70,10 @@ int git_push_set_options(git_push *push, const git_push_options *opts)
70
70
  if (!push || !opts)
71
71
  return -1;
72
72
 
73
- GIT_ERROR_CHECK_VERSION(opts, GIT_PUSH_OPTIONS_VERSION, "git_push_options");
73
+ GITERR_CHECK_VERSION(opts, GIT_PUSH_OPTIONS_VERSION, "git_push_options");
74
74
 
75
75
  push->pb_parallelism = opts->pb_parallelism;
76
- push->connection.custom_headers = &opts->custom_headers;
77
- push->connection.proxy = &opts->proxy_opts;
76
+ push->custom_headers = &opts->custom_headers;
78
77
 
79
78
  return 0;
80
79
  }
@@ -84,14 +83,14 @@ static void free_refspec(push_spec *spec)
84
83
  if (spec == NULL)
85
84
  return;
86
85
 
87
- git_refspec__dispose(&spec->refspec);
86
+ git_refspec__free(&spec->refspec);
88
87
  git__free(spec);
89
88
  }
90
89
 
91
90
  static int check_rref(char *ref)
92
91
  {
93
92
  if (git__prefixcmp(ref, "refs/")) {
94
- git_error_set(GIT_ERROR_INVALID, "not a valid reference '%s'", ref);
93
+ giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref);
95
94
  return -1;
96
95
  }
97
96
 
@@ -109,10 +108,10 @@ static int check_lref(git_push *push, char *ref)
109
108
  return 0;
110
109
 
111
110
  if (error == GIT_ENOTFOUND)
112
- git_error_set(GIT_ERROR_REFERENCE,
111
+ giterr_set(GITERR_REFERENCE,
113
112
  "src refspec '%s' does not match any existing object", ref);
114
113
  else
115
- git_error_set(GIT_ERROR_INVALID, "not a valid reference '%s'", ref);
114
+ giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref);
116
115
  return -1;
117
116
  }
118
117
 
@@ -123,10 +122,10 @@ static int parse_refspec(git_push *push, push_spec **spec, const char *str)
123
122
  *spec = NULL;
124
123
 
125
124
  s = git__calloc(1, sizeof(*s));
126
- GIT_ERROR_CHECK_ALLOC(s);
125
+ GITERR_CHECK_ALLOC(s);
127
126
 
128
127
  if (git_refspec__parse(&s->refspec, str, false) < 0) {
129
- git_error_set(GIT_ERROR_INVALID, "invalid refspec %s", str);
128
+ giterr_set(GITERR_INVALID, "invalid refspec %s", str);
130
129
  goto on_error;
131
130
  }
132
131
 
@@ -196,7 +195,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
196
195
  continue;
197
196
 
198
197
  /* Update the remote ref */
199
- if (git_oid_is_zero(&push_spec->loid)) {
198
+ if (git_oid_iszero(&push_spec->loid)) {
200
199
  error = git_reference_lookup(&remote_ref, push->remote->repo, git_buf_cstr(&remote_ref_name));
201
200
 
202
201
  if (error >= 0) {
@@ -213,7 +212,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
213
212
  if (error != GIT_ENOTFOUND)
214
213
  goto on_error;
215
214
 
216
- git_error_clear();
215
+ giterr_clear();
217
216
  fire_callback = 0;
218
217
  }
219
218
 
@@ -229,7 +228,7 @@ int git_push_update_tips(git_push *push, const git_remote_callbacks *callbacks)
229
228
  error = 0;
230
229
 
231
230
  on_error:
232
- git_buf_dispose(&remote_ref_name);
231
+ git_buf_free(&remote_ref_name);
233
232
  return error;
234
233
  }
235
234
 
@@ -242,10 +241,10 @@ static int enqueue_tag(git_object **out, git_push *push, git_oid *id)
242
241
  git_object *obj = NULL, *target = NULL;
243
242
  int error;
244
243
 
245
- if ((error = git_object_lookup(&obj, push->repo, id, GIT_OBJECT_TAG)) < 0)
244
+ if ((error = git_object_lookup(&obj, push->repo, id, GIT_OBJ_TAG)) < 0)
246
245
  return error;
247
246
 
248
- while (git_object_type(obj) == GIT_OBJECT_TAG) {
247
+ while (git_object_type(obj) == GIT_OBJ_TAG) {
249
248
  if ((error = git_packbuilder_insert(push->pb, git_object_id(obj), NULL)) < 0)
250
249
  break;
251
250
 
@@ -278,10 +277,10 @@ static int queue_objects(git_push *push)
278
277
  git_revwalk_sorting(rw, GIT_SORT_TIME);
279
278
 
280
279
  git_vector_foreach(&push->specs, i, spec) {
281
- git_object_t type;
280
+ git_otype type;
282
281
  size_t size;
283
282
 
284
- if (git_oid_is_zero(&spec->loid))
283
+ if (git_oid_iszero(&spec->loid))
285
284
  /*
286
285
  * Delete reference on remote side;
287
286
  * nothing to do here.
@@ -294,13 +293,13 @@ static int queue_objects(git_push *push)
294
293
  if (git_odb_read_header(&size, &type, push->repo->_odb, &spec->loid) < 0)
295
294
  goto on_error;
296
295
 
297
- if (type == GIT_OBJECT_TAG) {
296
+ if (type == GIT_OBJ_TAG) {
298
297
  git_object *target;
299
298
 
300
299
  if ((error = enqueue_tag(&target, push, &spec->loid)) < 0)
301
300
  goto on_error;
302
301
 
303
- if (git_object_type(target) == GIT_OBJECT_COMMIT) {
302
+ if (git_object_type(target) == GIT_OBJ_COMMIT) {
304
303
  if (git_revwalk_push(rw, git_object_id(target)) < 0) {
305
304
  git_object_free(target);
306
305
  goto on_error;
@@ -319,11 +318,11 @@ static int queue_objects(git_push *push)
319
318
  if (!spec->refspec.force) {
320
319
  git_oid base;
321
320
 
322
- if (git_oid_is_zero(&spec->roid))
321
+ if (git_oid_iszero(&spec->roid))
323
322
  continue;
324
323
 
325
324
  if (!git_odb_exists(push->repo->_odb, &spec->roid)) {
326
- git_error_set(GIT_ERROR_REFERENCE,
325
+ giterr_set(GITERR_REFERENCE,
327
326
  "cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.");
328
327
  error = GIT_ENONFASTFORWARD;
329
328
  goto on_error;
@@ -334,7 +333,7 @@ static int queue_objects(git_push *push)
334
333
 
335
334
  if (error == GIT_ENOTFOUND ||
336
335
  (!error && !git_oid_equal(&base, &spec->roid))) {
337
- git_error_set(GIT_ERROR_REFERENCE,
336
+ giterr_set(GITERR_REFERENCE,
338
337
  "cannot push non-fastforwardable reference");
339
338
  error = GIT_ENONFASTFORWARD;
340
339
  goto on_error;
@@ -346,7 +345,7 @@ static int queue_objects(git_push *push)
346
345
  }
347
346
 
348
347
  git_vector_foreach(&push->remote->refs, i, head) {
349
- if (git_oid_is_zero(&head->oid))
348
+ if (git_oid_iszero(&head->oid))
350
349
  continue;
351
350
 
352
351
  /* TODO */
@@ -363,13 +362,13 @@ on_error:
363
362
  static int add_update(git_push *push, push_spec *spec)
364
363
  {
365
364
  git_push_update *u = git__calloc(1, sizeof(git_push_update));
366
- GIT_ERROR_CHECK_ALLOC(u);
365
+ GITERR_CHECK_ALLOC(u);
367
366
 
368
367
  u->src_refname = git__strdup(spec->refspec.src);
369
- GIT_ERROR_CHECK_ALLOC(u->src_refname);
368
+ GITERR_CHECK_ALLOC(u->src_refname);
370
369
 
371
370
  u->dst_refname = git__strdup(spec->refspec.dst);
372
- GIT_ERROR_CHECK_ALLOC(u->dst_refname);
371
+ GITERR_CHECK_ALLOC(u->dst_refname);
373
372
 
374
373
  git_oid_cpy(&u->src, &spec->roid);
375
374
  git_oid_cpy(&u->dst, &spec->loid);
@@ -390,7 +389,7 @@ static int calculate_work(git_push *push)
390
389
  /* This is a create or update. Local ref must exist. */
391
390
  if (git_reference_name_to_id(
392
391
  &spec->loid, push->repo, spec->refspec.src) < 0) {
393
- git_error_set(GIT_ERROR_REFERENCE, "no such reference '%s'", spec->refspec.src);
392
+ giterr_set(GITERR_REFERENCE, "no such reference '%s'", spec->refspec.src);
394
393
  return -1;
395
394
  }
396
395
  }
@@ -416,7 +415,7 @@ static int do_push(git_push *push, const git_remote_callbacks *callbacks)
416
415
  git_transport *transport = push->remote->transport;
417
416
 
418
417
  if (!transport->push) {
419
- git_error_set(GIT_ERROR_NET, "remote transport doesn't support push");
418
+ giterr_set(GITERR_NET, "remote transport doesn't support push");
420
419
  error = -1;
421
420
  goto on_error;
422
421
  }
@@ -476,7 +475,7 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks)
476
475
  int error;
477
476
 
478
477
  if (!git_remote_connected(push->remote) &&
479
- (error = git_remote__connect(push->remote, GIT_DIRECTION_PUSH, callbacks, &push->connection)) < 0)
478
+ (error = git_remote_connect(push->remote, GIT_DIRECTION_PUSH, callbacks, NULL, push->custom_headers)) < 0)
480
479
  return error;
481
480
 
482
481
  if ((error = filter_refs(push->remote)) < 0 ||
@@ -485,7 +484,7 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks)
485
484
 
486
485
  if (!push->unpack_ok) {
487
486
  error = -1;
488
- git_error_set(GIT_ERROR_NET, "unpacking the sent packfile failed on the remote");
487
+ giterr_set(GITERR_NET, "unpacking the sent packfile failed on the remote");
489
488
  }
490
489
 
491
490
  return error;
@@ -501,7 +500,7 @@ int git_push_status_foreach(git_push *push,
501
500
  git_vector_foreach(&push->status, i, status) {
502
501
  int error = cb(status->ref, status->msg, data);
503
502
  if (error)
504
- return git_error_set_after_callback(error);
503
+ return giterr_set_after_callback(error);
505
504
  }
506
505
 
507
506
  return 0;
@@ -547,14 +546,9 @@ void git_push_free(git_push *push)
547
546
  git__free(push);
548
547
  }
549
548
 
550
- int git_push_options_init(git_push_options *opts, unsigned int version)
549
+ int git_push_init_options(git_push_options *opts, unsigned int version)
551
550
  {
552
551
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
553
552
  opts, version, git_push_options, GIT_PUSH_OPTIONS_INIT);
554
553
  return 0;
555
554
  }
556
-
557
- int git_push_init_options(git_push_options *opts, unsigned int version)
558
- {
559
- return git_push_options_init(opts, version);
560
- }
@@ -11,7 +11,6 @@
11
11
 
12
12
  #include "git2.h"
13
13
  #include "refspec.h"
14
- #include "remote.h"
15
14
 
16
15
  typedef struct push_spec {
17
16
  struct git_refspec refspec;
@@ -41,7 +40,7 @@ struct git_push {
41
40
 
42
41
  /* options */
43
42
  unsigned pb_parallelism;
44
- git_remote_connection_opts connection;
43
+ const git_strarray *custom_headers;
45
44
  };
46
45
 
47
46
  /**
@@ -116,7 +116,7 @@ done:
116
116
  if (type != GIT_REBASE_TYPE_NONE && path_out)
117
117
  *path_out = git_buf_detach(&path);
118
118
 
119
- git_buf_dispose(&path);
119
+ git_buf_free(&path);
120
120
 
121
121
  return 0;
122
122
  }
@@ -153,7 +153,7 @@ GIT_INLINE(int) rebase_readint(
153
153
  return error;
154
154
 
155
155
  if (git__strntol32(&num, asc_out->ptr, asc_out->size, &eol, 10) < 0 || num < 0 || *eol) {
156
- git_error_set(GIT_ERROR_REBASE, "the file '%s' contains an invalid numeric value", filename);
156
+ giterr_set(GITERR_REBASE, "the file '%s' contains an invalid numeric value", filename);
157
157
  return -1;
158
158
  }
159
159
 
@@ -171,7 +171,7 @@ GIT_INLINE(int) rebase_readoid(
171
171
  return error;
172
172
 
173
173
  if (str_out->size != GIT_OID_HEXSZ || git_oid_fromstr(out, str_out->ptr) < 0) {
174
- git_error_set(GIT_ERROR_REBASE, "the file '%s' contains an invalid object ID", filename);
174
+ giterr_set(GITERR_REBASE, "the file '%s' contains an invalid object ID", filename);
175
175
  return -1;
176
176
  }
177
177
 
@@ -231,7 +231,7 @@ static int rebase_open_merge(git_rebase *rebase)
231
231
 
232
232
  /* Read cmt.* */
233
233
  git_array_init_to_size(rebase->operations, end);
234
- GIT_ERROR_CHECK_ARRAY(rebase->operations);
234
+ GITERR_CHECK_ARRAY(rebase->operations);
235
235
 
236
236
  for (i = 0; i < end; i++) {
237
237
  git_buf_clear(&cmt);
@@ -241,7 +241,7 @@ static int rebase_open_merge(git_rebase *rebase)
241
241
  goto done;
242
242
 
243
243
  operation = rebase_operation_alloc(rebase, GIT_REBASE_OPERATION_PICK, &id, NULL);
244
- GIT_ERROR_CHECK_ALLOC(operation);
244
+ GITERR_CHECK_ALLOC(operation);
245
245
  }
246
246
 
247
247
  /* Read 'onto_name' */
@@ -251,9 +251,9 @@ static int rebase_open_merge(git_rebase *rebase)
251
251
  rebase->onto_name = git_buf_detach(&buf);
252
252
 
253
253
  done:
254
- git_buf_dispose(&cmt);
255
- git_buf_dispose(&state_path);
256
- git_buf_dispose(&buf);
254
+ git_buf_free(&cmt);
255
+ git_buf_free(&state_path);
256
+ git_buf_free(&buf);
257
257
 
258
258
  return error;
259
259
  }
@@ -261,20 +261,23 @@ done:
261
261
  static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
262
262
  {
263
263
  git_rebase *rebase = git__calloc(1, sizeof(git_rebase));
264
- GIT_ERROR_CHECK_ALLOC(rebase);
264
+ GITERR_CHECK_ALLOC(rebase);
265
265
 
266
266
  *out = NULL;
267
267
 
268
268
  if (rebase_opts)
269
269
  memcpy(&rebase->options, rebase_opts, sizeof(git_rebase_options));
270
270
  else
271
- git_rebase_options_init(&rebase->options, GIT_REBASE_OPTIONS_VERSION);
271
+ git_rebase_init_options(&rebase->options, GIT_REBASE_OPTIONS_VERSION);
272
272
 
273
273
  if (rebase_opts && rebase_opts->rewrite_notes_ref) {
274
274
  rebase->options.rewrite_notes_ref = git__strdup(rebase_opts->rewrite_notes_ref);
275
- GIT_ERROR_CHECK_ALLOC(rebase->options.rewrite_notes_ref);
275
+ GITERR_CHECK_ALLOC(rebase->options.rewrite_notes_ref);
276
276
  }
277
277
 
278
+ if ((rebase->options.checkout_options.checkout_strategy & (GIT_CHECKOUT_SAFE | GIT_CHECKOUT_FORCE)) == 0)
279
+ rebase->options.checkout_options.checkout_strategy = GIT_CHECKOUT_SAFE;
280
+
278
281
  *out = rebase;
279
282
 
280
283
  return 0;
@@ -282,10 +285,10 @@ static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
282
285
 
283
286
  static int rebase_check_versions(const git_rebase_options *given_opts)
284
287
  {
285
- GIT_ERROR_CHECK_VERSION(given_opts, GIT_REBASE_OPTIONS_VERSION, "git_rebase_options");
288
+ GITERR_CHECK_VERSION(given_opts, GIT_REBASE_OPTIONS_VERSION, "git_rebase_options");
286
289
 
287
290
  if (given_opts)
288
- GIT_ERROR_CHECK_VERSION(&given_opts->checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, "git_checkout_options");
291
+ GITERR_CHECK_VERSION(&given_opts->checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, "git_checkout_options");
289
292
 
290
293
  return 0;
291
294
  }
@@ -298,8 +301,7 @@ int git_rebase_open(
298
301
  git_rebase *rebase;
299
302
  git_buf path = GIT_BUF_INIT, orig_head_name = GIT_BUF_INIT,
300
303
  orig_head_id = GIT_BUF_INIT, onto_id = GIT_BUF_INIT;
301
- size_t state_path_len;
302
- int error;
304
+ int state_path_len, error;
303
305
 
304
306
  assert(repo);
305
307
 
@@ -315,7 +317,7 @@ int git_rebase_open(
315
317
  goto done;
316
318
 
317
319
  if (rebase->type == GIT_REBASE_TYPE_NONE) {
318
- git_error_set(GIT_ERROR_REBASE, "there is no rebase in progress");
320
+ giterr_set(GITERR_REBASE, "there is no rebase in progress");
319
321
  error = GIT_ENOTFOUND;
320
322
  goto done;
321
323
  }
@@ -371,14 +373,14 @@ int git_rebase_open(
371
373
 
372
374
  switch (rebase->type) {
373
375
  case GIT_REBASE_TYPE_INTERACTIVE:
374
- git_error_set(GIT_ERROR_REBASE, "interactive rebase is not supported");
376
+ giterr_set(GITERR_REBASE, "interactive rebase is not supported");
375
377
  error = -1;
376
378
  break;
377
379
  case GIT_REBASE_TYPE_MERGE:
378
380
  error = rebase_open_merge(rebase);
379
381
  break;
380
382
  case GIT_REBASE_TYPE_APPLY:
381
- git_error_set(GIT_ERROR_REBASE, "patch application rebase is not supported");
383
+ giterr_set(GITERR_REBASE, "patch application rebase is not supported");
382
384
  error = -1;
383
385
  break;
384
386
  default:
@@ -391,10 +393,10 @@ done:
391
393
  else
392
394
  git_rebase_free(rebase);
393
395
 
394
- git_buf_dispose(&path);
395
- git_buf_dispose(&orig_head_name);
396
- git_buf_dispose(&orig_head_id);
397
- git_buf_dispose(&onto_id);
396
+ git_buf_free(&path);
397
+ git_buf_free(&orig_head_name);
398
+ git_buf_free(&orig_head_id);
399
+ git_buf_free(&onto_id);
398
400
  return error;
399
401
  }
400
402
 
@@ -422,8 +424,8 @@ static int rebase_setupfile(git_rebase *rebase, const char *filename, int flags,
422
424
  if ((error = git_buf_joinpath(&path, rebase->state_path, filename)) == 0)
423
425
  error = git_futils_writebuffer(&contents, path.ptr, flags, REBASE_FILE_MODE);
424
426
 
425
- git_buf_dispose(&path);
426
- git_buf_dispose(&contents);
427
+ git_buf_free(&path);
428
+ git_buf_free(&contents);
427
429
 
428
430
  return error;
429
431
  }
@@ -464,7 +466,7 @@ static int rebase_setupfiles_merge(git_rebase *rebase)
464
466
  }
465
467
 
466
468
  done:
467
- git_buf_dispose(&commit_filename);
469
+ git_buf_free(&commit_filename);
468
470
  return error;
469
471
  }
470
472
 
@@ -477,7 +479,7 @@ static int rebase_setupfiles(git_rebase *rebase)
477
479
  git_oid_fmt(orig_head, &rebase->orig_head_id);
478
480
 
479
481
  if (p_mkdir(rebase->state_path, REBASE_DIR_MODE) < 0) {
480
- git_error_set(GIT_ERROR_OS, "failed to create rebase directory '%s'", rebase->state_path);
482
+ giterr_set(GITERR_OS, "failed to create rebase directory '%s'", rebase->state_path);
481
483
  return -1;
482
484
  }
483
485
 
@@ -494,18 +496,13 @@ static int rebase_setupfiles(git_rebase *rebase)
494
496
  return rebase_setupfiles_merge(rebase);
495
497
  }
496
498
 
497
- int git_rebase_options_init(git_rebase_options *opts, unsigned int version)
499
+ int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
498
500
  {
499
501
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
500
502
  opts, version, git_rebase_options, GIT_REBASE_OPTIONS_INIT);
501
503
  return 0;
502
504
  }
503
505
 
504
- int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
505
- {
506
- return git_rebase_options_init(opts, version);
507
- }
508
-
509
506
  static int rebase_ensure_not_in_progress(git_repository *repo)
510
507
  {
511
508
  int error;
@@ -515,7 +512,7 @@ static int rebase_ensure_not_in_progress(git_repository *repo)
515
512
  return error;
516
513
 
517
514
  if (type != GIT_REBASE_TYPE_NONE) {
518
- git_error_set(GIT_ERROR_REBASE, "there is an existing rebase in progress");
515
+ giterr_set(GITERR_REBASE, "there is an existing rebase in progress");
519
516
  return -1;
520
517
  }
521
518
 
@@ -540,7 +537,7 @@ static int rebase_ensure_not_dirty(
540
537
  goto done;
541
538
 
542
539
  if (git_diff_num_deltas(diff) > 0) {
543
- git_error_set(GIT_ERROR_REBASE, "uncommitted changes exist in index");
540
+ giterr_set(GITERR_REBASE, "uncommitted changes exist in index");
544
541
  error = fail_with;
545
542
  goto done;
546
543
  }
@@ -556,7 +553,7 @@ static int rebase_ensure_not_dirty(
556
553
  goto done;
557
554
 
558
555
  if (git_diff_num_deltas(diff) > 0) {
559
- git_error_set(GIT_ERROR_REBASE, "unstaged changes exist in workdir");
556
+ giterr_set(GITERR_REBASE, "unstaged changes exist in workdir");
560
557
  error = fail_with;
561
558
  goto done;
562
559
  }
@@ -605,7 +602,7 @@ static int rebase_init_operations(
605
602
  continue;
606
603
 
607
604
  operation = rebase_operation_alloc(rebase, GIT_REBASE_OPERATION_PICK, &id, NULL);
608
- GIT_ERROR_CHECK_ALLOC(operation);
605
+ GITERR_CHECK_ALLOC(operation);
609
606
  }
610
607
 
611
608
  error = 0;
@@ -634,17 +631,17 @@ static int rebase_init_merge(
634
631
  goto done;
635
632
 
636
633
  rebase->state_path = git_buf_detach(&state_path);
637
- GIT_ERROR_CHECK_ALLOC(rebase->state_path);
634
+ GITERR_CHECK_ALLOC(rebase->state_path);
638
635
 
639
636
  if (branch->ref_name && strcmp(branch->ref_name, "HEAD")) {
640
637
  rebase->orig_head_name = git__strdup(branch->ref_name);
641
- GIT_ERROR_CHECK_ALLOC(rebase->orig_head_name);
638
+ GITERR_CHECK_ALLOC(rebase->orig_head_name);
642
639
  } else {
643
640
  rebase->head_detached = 1;
644
641
  }
645
642
 
646
643
  rebase->onto_name = git__strdup(rebase_onto_name(onto));
647
- GIT_ERROR_CHECK_ALLOC(rebase->onto_name);
644
+ GITERR_CHECK_ALLOC(rebase->onto_name);
648
645
 
649
646
  rebase->quiet = rebase->options.quiet;
650
647
 
@@ -665,8 +662,8 @@ static int rebase_init_merge(
665
662
  done:
666
663
  git_reference_free(head_ref);
667
664
  git_commit_free(onto_commit);
668
- git_buf_dispose(&reflog);
669
- git_buf_dispose(&state_path);
665
+ git_buf_free(&reflog);
666
+ git_buf_free(&state_path);
670
667
 
671
668
  return error;
672
669
  }
@@ -813,7 +810,7 @@ static int rebase_next_merge(
813
810
  goto done;
814
811
 
815
812
  if ((parent_count = git_commit_parentcount(current_commit)) > 1) {
816
- git_error_set(GIT_ERROR_REBASE, "cannot rebase a merge commit");
813
+ giterr_set(GITERR_REBASE, "cannot rebase a merge commit");
817
814
  error = -1;
818
815
  goto done;
819
816
  } else if (parent_count) {
@@ -845,7 +842,7 @@ done:
845
842
  git_tree_free(parent_tree);
846
843
  git_commit_free(parent_commit);
847
844
  git_commit_free(current_commit);
848
- git_buf_dispose(&path);
845
+ git_buf_free(&path);
849
846
 
850
847
  return error;
851
848
  }
@@ -870,7 +867,7 @@ static int rebase_next_inmemory(
870
867
  goto done;
871
868
 
872
869
  if ((parent_count = git_commit_parentcount(current_commit)) > 1) {
873
- git_error_set(GIT_ERROR_REBASE, "cannot rebase a merge commit");
870
+ giterr_set(GITERR_REBASE, "cannot rebase a merge commit");
874
871
  error = -1;
875
872
  goto done;
876
873
  } else if (parent_count) {
@@ -951,16 +948,12 @@ static int rebase_commit__create(
951
948
  git_commit *current_commit = NULL, *commit = NULL;
952
949
  git_tree *parent_tree = NULL, *tree = NULL;
953
950
  git_oid tree_id, commit_id;
954
- git_buf commit_content = GIT_BUF_INIT, commit_signature = GIT_BUF_INIT,
955
- signature_field = GIT_BUF_INIT;
956
- const char *signature_field_string = NULL,
957
- *commit_signature_string = NULL;
958
951
  int error;
959
952
 
960
953
  operation = git_array_get(rebase->operations, rebase->current);
961
954
 
962
955
  if (git_index_has_conflicts(index)) {
963
- git_error_set(GIT_ERROR_REBASE, "conflicts have not been resolved");
956
+ giterr_set(GITERR_REBASE, "conflicts have not been resolved");
964
957
  error = GIT_EUNMERGED;
965
958
  goto done;
966
959
  }
@@ -972,7 +965,7 @@ static int rebase_commit__create(
972
965
  goto done;
973
966
 
974
967
  if (git_oid_equal(&tree_id, git_tree_id(parent_tree))) {
975
- git_error_set(GIT_ERROR_REBASE, "this patch has already been applied");
968
+ giterr_set(GITERR_REBASE, "this patch has already been applied");
976
969
  error = GIT_EAPPLIED;
977
970
  goto done;
978
971
  }
@@ -985,40 +978,10 @@ static int rebase_commit__create(
985
978
  message = git_commit_message(current_commit);
986
979
  }
987
980
 
988
- if ((error = git_commit_create_buffer(&commit_content, rebase->repo, author, committer,
989
- message_encoding, message, tree, 1, (const git_commit **)&parent_commit)) < 0)
990
- goto done;
991
-
992
- if (rebase->options.signing_cb) {
993
- git_error_clear();
994
- error = git_error_set_after_callback_function(rebase->options.signing_cb(
995
- &commit_signature, &signature_field, git_buf_cstr(&commit_content),
996
- rebase->options.payload), "commit signing_cb failed");
997
- if (error == GIT_PASSTHROUGH) {
998
- git_buf_dispose(&commit_signature);
999
- git_buf_dispose(&signature_field);
1000
- git_error_clear();
1001
- error = GIT_OK;
1002
- } else if (error < 0)
1003
- goto done;
1004
- }
1005
-
1006
- if (git_buf_is_allocated(&commit_signature)) {
1007
- assert(git_buf_contains_nul(&commit_signature));
1008
- commit_signature_string = git_buf_cstr(&commit_signature);
1009
- }
1010
-
1011
- if (git_buf_is_allocated(&signature_field)) {
1012
- assert(git_buf_contains_nul(&signature_field));
1013
- signature_field_string = git_buf_cstr(&signature_field);
1014
- }
1015
-
1016
- if ((error = git_commit_create_with_signature(&commit_id, rebase->repo,
1017
- git_buf_cstr(&commit_content), commit_signature_string,
1018
- signature_field_string)))
1019
- goto done;
1020
-
1021
- if ((error = git_commit_lookup(&commit, rebase->repo, &commit_id)) < 0)
981
+ if ((error = git_commit_create(&commit_id, rebase->repo, NULL, author,
982
+ committer, message_encoding, message, tree, 1,
983
+ (const git_commit **)&parent_commit)) < 0 ||
984
+ (error = git_commit_lookup(&commit, rebase->repo, &commit_id)) < 0)
1022
985
  goto done;
1023
986
 
1024
987
  *out = commit;
@@ -1027,9 +990,6 @@ done:
1027
990
  if (error < 0)
1028
991
  git_commit_free(commit);
1029
992
 
1030
- git_buf_dispose(&commit_signature);
1031
- git_buf_dispose(&signature_field);
1032
- git_buf_dispose(&commit_content);
1033
993
  git_commit_free(current_commit);
1034
994
  git_tree_free(parent_tree);
1035
995
  git_tree_free(tree);
@@ -1057,7 +1017,7 @@ static int rebase_commit_merge(
1057
1017
 
1058
1018
  if ((error = rebase_ensure_not_dirty(rebase->repo, false, true, GIT_EUNMERGED)) < 0 ||
1059
1019
  (error = git_repository_head(&head, rebase->repo)) < 0 ||
1060
- (error = git_reference_peel((git_object **)&head_commit, head, GIT_OBJECT_COMMIT)) < 0 ||
1020
+ (error = git_reference_peel((git_object **)&head_commit, head, GIT_OBJ_COMMIT)) < 0 ||
1061
1021
  (error = git_repository_index(&index, rebase->repo)) < 0 ||
1062
1022
  (error = rebase_commit__create(&commit, rebase, index, head_commit,
1063
1023
  author, committer, message_encoding, message)) < 0 ||
@@ -1191,7 +1151,7 @@ static int notes_ref_lookup(git_buf *out, git_rebase *rebase)
1191
1151
  if (error != GIT_ENOTFOUND)
1192
1152
  goto done;
1193
1153
 
1194
- git_error_clear();
1154
+ giterr_clear();
1195
1155
  do_rewrite = 1;
1196
1156
  }
1197
1157
 
@@ -1218,7 +1178,7 @@ static int rebase_copy_note(
1218
1178
 
1219
1179
  if ((error = git_note_read(&note, rebase->repo, notes_ref, from)) < 0) {
1220
1180
  if (error == GIT_ENOTFOUND) {
1221
- git_error_clear();
1181
+ giterr_clear();
1222
1182
  error = 0;
1223
1183
  }
1224
1184
 
@@ -1231,7 +1191,7 @@ static int rebase_copy_note(
1231
1191
  (error = git_signature_now(&who, "unknown", "unknown")) < 0)
1232
1192
  goto done;
1233
1193
 
1234
- git_error_clear();
1194
+ giterr_clear();
1235
1195
  }
1236
1196
 
1237
1197
  committer = who;
@@ -1259,7 +1219,7 @@ static int rebase_copy_notes(
1259
1219
 
1260
1220
  if ((error = notes_ref_lookup(&notes_ref, rebase)) < 0) {
1261
1221
  if (error == GIT_ENOTFOUND) {
1262
- git_error_clear();
1222
+ giterr_clear();
1263
1223
  error = 0;
1264
1224
  }
1265
1225
 
@@ -1302,13 +1262,13 @@ static int rebase_copy_notes(
1302
1262
  goto done;
1303
1263
 
1304
1264
  on_error:
1305
- git_error_set(GIT_ERROR_REBASE, "invalid rewritten file at line %d", linenum);
1265
+ giterr_set(GITERR_REBASE, "invalid rewritten file at line %d", linenum);
1306
1266
  error = -1;
1307
1267
 
1308
1268
  done:
1309
- git_buf_dispose(&rewritten);
1310
- git_buf_dispose(&path);
1311
- git_buf_dispose(&notes_ref);
1269
+ git_buf_free(&rewritten);
1270
+ git_buf_free(&path);
1271
+ git_buf_free(&notes_ref);
1312
1272
 
1313
1273
  return error;
1314
1274
  }
@@ -1331,7 +1291,7 @@ static int return_to_orig_head(git_rebase *rebase)
1331
1291
  rebase->orig_head_name)) == 0 &&
1332
1292
  (error = git_repository_head(&terminal_ref, rebase->repo)) == 0 &&
1333
1293
  (error = git_reference_peel((git_object **)&terminal_commit,
1334
- terminal_ref, GIT_OBJECT_COMMIT)) == 0 &&
1294
+ terminal_ref, GIT_OBJ_COMMIT)) == 0 &&
1335
1295
  (error = git_reference_create_matching(&branch_ref,
1336
1296
  rebase->repo, rebase->orig_head_name,
1337
1297
  git_commit_id(terminal_commit), 1,
@@ -1340,8 +1300,8 @@ static int return_to_orig_head(git_rebase *rebase)
1340
1300
  rebase->repo, GIT_HEAD_FILE, rebase->orig_head_name, 1,
1341
1301
  head_msg.ptr);
1342
1302
 
1343
- git_buf_dispose(&head_msg);
1344
- git_buf_dispose(&branch_msg);
1303
+ git_buf_free(&head_msg);
1304
+ git_buf_free(&branch_msg);
1345
1305
  git_commit_free(terminal_commit);
1346
1306
  git_reference_free(head_ref);
1347
1307
  git_reference_free(branch_ref);
@@ -1370,22 +1330,6 @@ int git_rebase_finish(
1370
1330
  return error;
1371
1331
  }
1372
1332
 
1373
- const char *git_rebase_orig_head_name(git_rebase *rebase) {
1374
- return rebase->orig_head_name;
1375
- }
1376
-
1377
- const git_oid *git_rebase_orig_head_id(git_rebase *rebase) {
1378
- return &rebase->orig_head_id;
1379
- }
1380
-
1381
- const char *git_rebase_onto_name(git_rebase *rebase) {
1382
- return rebase->onto_name;
1383
- }
1384
-
1385
- const git_oid *git_rebase_onto_id(git_rebase *rebase) {
1386
- return &rebase->onto_id;
1387
- }
1388
-
1389
1333
  size_t git_rebase_operation_entrycount(git_rebase *rebase)
1390
1334
  {
1391
1335
  assert(rebase);