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
@@ -40,6 +40,7 @@ typedef enum {
40
40
  GIT_PKT_HAVE,
41
41
  GIT_PKT_ACK,
42
42
  GIT_PKT_NAK,
43
+ GIT_PKT_PACK__UNUSED,
43
44
  GIT_PKT_COMMENT,
44
45
  GIT_PKT_ERR,
45
46
  GIT_PKT_DATA,
@@ -49,7 +50,7 @@ typedef enum {
49
50
  GIT_PKT_UNPACK,
50
51
  } git_pkt_type;
51
52
 
52
- /* Used for multi_ack and multi_ack_detailed */
53
+ /* Used for multi_ack and mutli_ack_detailed */
53
54
  enum git_ack_status {
54
55
  GIT_ACK_NONE,
55
56
  GIT_ACK_CONTINUE,
@@ -177,8 +178,8 @@ int git_smart__negotiate_fetch(
177
178
  int git_smart__download_pack(
178
179
  git_transport *transport,
179
180
  git_repository *repo,
180
- git_indexer_progress *stats,
181
- git_indexer_progress_cb progress_cb,
181
+ git_transfer_progress *stats,
182
+ git_transfer_progress_cb progress_cb,
182
183
  void *progress_payload);
183
184
 
184
185
  /* smart.c */
@@ -31,7 +31,7 @@ static int flush_pkt(git_pkt **out)
31
31
  git_pkt *pkt;
32
32
 
33
33
  pkt = git__malloc(sizeof(git_pkt));
34
- GIT_ERROR_CHECK_ALLOC(pkt);
34
+ GITERR_CHECK_ALLOC(pkt);
35
35
 
36
36
  pkt->type = GIT_PKT_FLUSH;
37
37
  *out = pkt;
@@ -45,7 +45,7 @@ static int ack_pkt(git_pkt **out, const char *line, size_t len)
45
45
  git_pkt_ack *pkt;
46
46
 
47
47
  pkt = git__calloc(1, sizeof(git_pkt_ack));
48
- GIT_ERROR_CHECK_ALLOC(pkt);
48
+ GITERR_CHECK_ALLOC(pkt);
49
49
  pkt->type = GIT_PKT_ACK;
50
50
 
51
51
  if (git__prefixncmp(line, len, "ACK "))
@@ -77,7 +77,7 @@ static int ack_pkt(git_pkt **out, const char *line, size_t len)
77
77
  return 0;
78
78
 
79
79
  out_err:
80
- git_error_set(GIT_ERROR_NET, "error parsing ACK pkt-line");
80
+ giterr_set(GITERR_NET, "error parsing ACK pkt-line");
81
81
  git__free(pkt);
82
82
  return -1;
83
83
  }
@@ -87,7 +87,7 @@ static int nak_pkt(git_pkt **out)
87
87
  git_pkt *pkt;
88
88
 
89
89
  pkt = git__malloc(sizeof(git_pkt));
90
- GIT_ERROR_CHECK_ALLOC(pkt);
90
+ GITERR_CHECK_ALLOC(pkt);
91
91
 
92
92
  pkt->type = GIT_PKT_NAK;
93
93
  *out = pkt;
@@ -100,10 +100,10 @@ static int comment_pkt(git_pkt **out, const char *line, size_t len)
100
100
  git_pkt_comment *pkt;
101
101
  size_t alloclen;
102
102
 
103
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_comment), len);
104
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
103
+ GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_comment), len);
104
+ GITERR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
105
105
  pkt = git__malloc(alloclen);
106
- GIT_ERROR_CHECK_ALLOC(pkt);
106
+ GITERR_CHECK_ALLOC(pkt);
107
107
 
108
108
  pkt->type = GIT_PKT_COMMENT;
109
109
  memcpy(pkt->comment, line, len);
@@ -125,10 +125,10 @@ static int err_pkt(git_pkt **out, const char *line, size_t len)
125
125
  line += 4;
126
126
  len -= 4;
127
127
 
128
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
129
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
128
+ GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
129
+ GITERR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
130
130
  pkt = git__malloc(alloclen);
131
- GIT_ERROR_CHECK_ALLOC(pkt);
131
+ GITERR_CHECK_ALLOC(pkt);
132
132
  pkt->type = GIT_PKT_ERR;
133
133
  pkt->len = len;
134
134
 
@@ -140,7 +140,7 @@ static int err_pkt(git_pkt **out, const char *line, size_t len)
140
140
  return 0;
141
141
 
142
142
  out_err:
143
- git_error_set(GIT_ERROR_NET, "error parsing ERR pkt-line");
143
+ giterr_set(GITERR_NET, "error parsing ERR pkt-line");
144
144
  git__free(pkt);
145
145
  return -1;
146
146
  }
@@ -153,9 +153,9 @@ static int data_pkt(git_pkt **out, const char *line, size_t len)
153
153
  line++;
154
154
  len--;
155
155
 
156
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
156
+ GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
157
157
  pkt = git__malloc(alloclen);
158
- GIT_ERROR_CHECK_ALLOC(pkt);
158
+ GITERR_CHECK_ALLOC(pkt);
159
159
 
160
160
  pkt->type = GIT_PKT_DATA;
161
161
  pkt->len = len;
@@ -174,9 +174,9 @@ static int sideband_progress_pkt(git_pkt **out, const char *line, size_t len)
174
174
  line++;
175
175
  len--;
176
176
 
177
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
177
+ GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len);
178
178
  pkt = git__malloc(alloclen);
179
- GIT_ERROR_CHECK_ALLOC(pkt);
179
+ GITERR_CHECK_ALLOC(pkt);
180
180
 
181
181
  pkt->type = GIT_PKT_PROGRESS;
182
182
  pkt->len = len;
@@ -195,10 +195,10 @@ static int sideband_error_pkt(git_pkt **out, const char *line, size_t len)
195
195
  line++;
196
196
  len--;
197
197
 
198
- GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, sizeof(git_pkt_err), len);
199
- GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, alloc_len, 1);
198
+ GITERR_CHECK_ALLOC_ADD(&alloc_len, sizeof(git_pkt_err), len);
199
+ GITERR_CHECK_ALLOC_ADD(&alloc_len, alloc_len, 1);
200
200
  pkt = git__malloc(alloc_len);
201
- GIT_ERROR_CHECK_ALLOC(pkt);
201
+ GITERR_CHECK_ALLOC(pkt);
202
202
 
203
203
  pkt->type = GIT_PKT_ERR;
204
204
  pkt->len = (int)len;
@@ -219,7 +219,7 @@ static int ref_pkt(git_pkt **out, const char *line, size_t len)
219
219
  size_t alloclen;
220
220
 
221
221
  pkt = git__calloc(1, sizeof(git_pkt_ref));
222
- GIT_ERROR_CHECK_ALLOC(pkt);
222
+ GITERR_CHECK_ALLOC(pkt);
223
223
  pkt->type = GIT_PKT_REF;
224
224
 
225
225
  if (len < GIT_OID_HEXSZ || git_oid_fromstr(&pkt->head.oid, line) < 0)
@@ -238,9 +238,9 @@ static int ref_pkt(git_pkt **out, const char *line, size_t len)
238
238
  if (line[len - 1] == '\n')
239
239
  --len;
240
240
 
241
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, len, 1);
241
+ GITERR_CHECK_ALLOC_ADD(&alloclen, len, 1);
242
242
  pkt->head.name = git__malloc(alloclen);
243
- GIT_ERROR_CHECK_ALLOC(pkt->head.name);
243
+ GITERR_CHECK_ALLOC(pkt->head.name);
244
244
 
245
245
  memcpy(pkt->head.name, line, len);
246
246
  pkt->head.name[len] = '\0';
@@ -252,7 +252,7 @@ static int ref_pkt(git_pkt **out, const char *line, size_t len)
252
252
  return 0;
253
253
 
254
254
  out_err:
255
- git_error_set(GIT_ERROR_NET, "error parsing REF pkt-line");
255
+ giterr_set(GITERR_NET, "error parsing REF pkt-line");
256
256
  if (pkt)
257
257
  git__free(pkt->head.name);
258
258
  git__free(pkt);
@@ -265,7 +265,7 @@ static int ok_pkt(git_pkt **out, const char *line, size_t len)
265
265
  size_t alloc_len;
266
266
 
267
267
  pkt = git__malloc(sizeof(*pkt));
268
- GIT_ERROR_CHECK_ALLOC(pkt);
268
+ GITERR_CHECK_ALLOC(pkt);
269
269
  pkt->type = GIT_PKT_OK;
270
270
 
271
271
  if (git__prefixncmp(line, len, "ok "))
@@ -276,9 +276,9 @@ static int ok_pkt(git_pkt **out, const char *line, size_t len)
276
276
  if (line[len - 1] == '\n')
277
277
  --len;
278
278
 
279
- GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, len, 1);
279
+ GITERR_CHECK_ALLOC_ADD(&alloc_len, len, 1);
280
280
  pkt->ref = git__malloc(alloc_len);
281
- GIT_ERROR_CHECK_ALLOC(pkt->ref);
281
+ GITERR_CHECK_ALLOC(pkt->ref);
282
282
 
283
283
  memcpy(pkt->ref, line, len);
284
284
  pkt->ref[len] = '\0';
@@ -287,7 +287,7 @@ static int ok_pkt(git_pkt **out, const char *line, size_t len)
287
287
  return 0;
288
288
 
289
289
  out_err:
290
- git_error_set(GIT_ERROR_NET, "error parsing OK pkt-line");
290
+ giterr_set(GITERR_NET, "error parsing OK pkt-line");
291
291
  git__free(pkt);
292
292
  return -1;
293
293
  }
@@ -299,7 +299,7 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
299
299
  size_t alloclen;
300
300
 
301
301
  pkt = git__malloc(sizeof(*pkt));
302
- GIT_ERROR_CHECK_ALLOC(pkt);
302
+ GITERR_CHECK_ALLOC(pkt);
303
303
 
304
304
  pkt->ref = NULL;
305
305
  pkt->type = GIT_PKT_NG;
@@ -314,9 +314,9 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
314
314
  goto out_err;
315
315
  len = ptr - line;
316
316
 
317
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, len, 1);
317
+ GITERR_CHECK_ALLOC_ADD(&alloclen, len, 1);
318
318
  pkt->ref = git__malloc(alloclen);
319
- GIT_ERROR_CHECK_ALLOC(pkt->ref);
319
+ GITERR_CHECK_ALLOC(pkt->ref);
320
320
 
321
321
  memcpy(pkt->ref, line, len);
322
322
  pkt->ref[len] = '\0';
@@ -329,9 +329,9 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
329
329
  goto out_err;
330
330
  len = ptr - line;
331
331
 
332
- GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, len, 1);
332
+ GITERR_CHECK_ALLOC_ADD(&alloclen, len, 1);
333
333
  pkt->msg = git__malloc(alloclen);
334
- GIT_ERROR_CHECK_ALLOC(pkt->msg);
334
+ GITERR_CHECK_ALLOC(pkt->msg);
335
335
 
336
336
  memcpy(pkt->msg, line, len);
337
337
  pkt->msg[len] = '\0';
@@ -340,7 +340,7 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
340
340
  return 0;
341
341
 
342
342
  out_err:
343
- git_error_set(GIT_ERROR_NET, "invalid packet line");
343
+ giterr_set(GITERR_NET, "invalid packet line");
344
344
  git__free(pkt->ref);
345
345
  git__free(pkt);
346
346
  return -1;
@@ -351,7 +351,7 @@ static int unpack_pkt(git_pkt **out, const char *line, size_t len)
351
351
  git_pkt_unpack *pkt;
352
352
 
353
353
  pkt = git__malloc(sizeof(*pkt));
354
- GIT_ERROR_CHECK_ALLOC(pkt);
354
+ GITERR_CHECK_ALLOC(pkt);
355
355
  pkt->type = GIT_PKT_UNPACK;
356
356
 
357
357
  if (!git__prefixncmp(line, len, "unpack ok"))
@@ -386,7 +386,7 @@ static int parse_len(size_t *out, const char *line, size_t linelen)
386
386
  }
387
387
  }
388
388
 
389
- git_error_set(GIT_ERROR_NET, "invalid hex digit in length: '%s'", num);
389
+ giterr_set(GITERR_NET, "invalid hex digit in length: '%s'", num);
390
390
  return -1;
391
391
  }
392
392
  }
@@ -430,9 +430,9 @@ int git_pkt_parse_line(
430
430
  if (error == GIT_EBUFS)
431
431
  ;
432
432
  else if (!git__prefixncmp(line, linelen, "PACK"))
433
- git_error_set(GIT_ERROR_NET, "unexpected pack file");
433
+ giterr_set(GITERR_NET, "unexpected pack file");
434
434
  else
435
- git_error_set(GIT_ERROR_NET, "bad packet length");
435
+ giterr_set(GITERR_NET, "bad packet length");
436
436
  return error;
437
437
  }
438
438
 
@@ -458,7 +458,7 @@ int git_pkt_parse_line(
458
458
  * line, we should return an error upon hitting one.
459
459
  */
460
460
  if (len == PKT_LEN_SIZE) {
461
- git_error_set_str(GIT_ERROR_NET, "Invalid empty packet");
461
+ giterr_set_str(GITERR_NET, "Invalid empty packet");
462
462
  return GIT_ERROR;
463
463
  }
464
464
 
@@ -499,9 +499,6 @@ int git_pkt_parse_line(
499
499
 
500
500
  void git_pkt_free(git_pkt *pkt)
501
501
  {
502
- if (pkt == NULL) {
503
- return;
504
- }
505
502
  if (pkt->type == GIT_PKT_REF) {
506
503
  git_pkt_ref *p = (git_pkt_ref *) pkt;
507
504
  git__free(p->head.name);
@@ -561,7 +558,7 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
561
558
  git_buf_len(&str) + 1 /* LF */;
562
559
 
563
560
  if (len > 0xffff) {
564
- git_error_set(GIT_ERROR_NET,
561
+ giterr_set(GITERR_NET,
565
562
  "tried to produce packet with invalid length %" PRIuZ, len);
566
563
  return -1;
567
564
  }
@@ -570,9 +567,9 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
570
567
  git_oid_fmt(oid, &head->oid);
571
568
  git_buf_printf(buf,
572
569
  "%04xwant %s %s\n", (unsigned int)len, oid, git_buf_cstr(&str));
573
- git_buf_dispose(&str);
570
+ git_buf_free(&str);
574
571
 
575
- GIT_ERROR_CHECK_ALLOC_BUF(buf);
572
+ GITERR_CHECK_ALLOC_BUF(buf);
576
573
 
577
574
  return 0;
578
575
  }
@@ -17,7 +17,6 @@
17
17
  #include "pack-objects.h"
18
18
  #include "remote.h"
19
19
  #include "util.h"
20
- #include "revwalk.h"
21
20
 
22
21
  #define NETWORK_XFER_THRESHOLD (100*1024)
23
22
  /* The minimal interval between progress updates (in seconds). */
@@ -57,7 +56,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
57
56
  return recvd;
58
57
 
59
58
  if (recvd == 0) {
60
- git_error_set(GIT_ERROR_NET, "early EOF");
59
+ giterr_set(GITERR_NET, "early EOF");
61
60
  return GIT_EEOF;
62
61
  }
63
62
 
@@ -66,7 +65,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
66
65
 
67
66
  gitno_consume(buf, line_end);
68
67
  if (pkt->type == GIT_PKT_ERR) {
69
- git_error_set(GIT_ERROR_NET, "remote error: %s", ((git_pkt_err *)pkt)->error);
68
+ giterr_set(GITERR_NET, "remote error: %s", ((git_pkt_err *)pkt)->error);
70
69
  git__free(pkt);
71
70
  return -1;
72
71
  }
@@ -104,14 +103,14 @@ static int append_symref(const char **out, git_vector *symrefs, const char *ptr)
104
103
 
105
104
  /* symref mapping has refspec format */
106
105
  mapping = git__calloc(1, sizeof(git_refspec));
107
- GIT_ERROR_CHECK_ALLOC(mapping);
106
+ GITERR_CHECK_ALLOC(mapping);
108
107
 
109
108
  error = git_refspec__parse(mapping, git_buf_cstr(&buf), true);
110
- git_buf_dispose(&buf);
109
+ git_buf_free(&buf);
111
110
 
112
111
  /* if the error isn't OOM, then it's a parse error; let's use a nicer message */
113
112
  if (error < 0) {
114
- if (git_error_last()->klass != GIT_ERROR_NOMEMORY)
113
+ if (giterr_last()->klass != GITERR_NOMEMORY)
115
114
  goto on_invalid;
116
115
 
117
116
  git__free(mapping);
@@ -125,8 +124,8 @@ static int append_symref(const char **out, git_vector *symrefs, const char *ptr)
125
124
  return 0;
126
125
 
127
126
  on_invalid:
128
- git_error_set(GIT_ERROR_NET, "remote sent invalid symref");
129
- git_refspec__dispose(mapping);
127
+ giterr_set(GITERR_NET, "remote sent invalid symref");
128
+ git_refspec__free(mapping);
130
129
  git__free(mapping);
131
130
  return -1;
132
131
  }
@@ -137,7 +136,7 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
137
136
 
138
137
  /* No refs or capabilites, odd but not a problem */
139
138
  if (pkt == NULL || pkt->capabilities == NULL)
140
- return GIT_ENOTFOUND;
139
+ return 0;
141
140
 
142
141
  ptr = pkt->capabilities;
143
142
  while (ptr != NULL && *ptr != '\0') {
@@ -210,7 +209,7 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
210
209
  return 0;
211
210
  }
212
211
 
213
- static int recv_pkt(git_pkt **out_pkt, git_pkt_type *out_type, gitno_buffer *buf)
212
+ static int recv_pkt(git_pkt **out, git_pkt_type *pkt_type, gitno_buffer *buf)
214
213
  {
215
214
  const char *ptr = buf->data, *line_end = ptr;
216
215
  git_pkt *pkt = NULL;
@@ -231,16 +230,16 @@ static int recv_pkt(git_pkt **out_pkt, git_pkt_type *out_type, gitno_buffer *buf
231
230
  if ((ret = gitno_recv(buf)) < 0) {
232
231
  return ret;
233
232
  } else if (ret == 0) {
234
- git_error_set(GIT_ERROR_NET, "early EOF");
233
+ giterr_set(GITERR_NET, "early EOF");
235
234
  return GIT_EEOF;
236
235
  }
237
236
  } while (error);
238
237
 
239
238
  gitno_consume(buf, line_end);
240
- if (out_type != NULL)
241
- *out_type = pkt->type;
242
- if (out_pkt != NULL)
243
- *out_pkt = pkt;
239
+ if (pkt_type)
240
+ *pkt_type = pkt->type;
241
+ if (out != NULL)
242
+ *out = pkt;
244
243
  else
245
244
  git__free(pkt);
246
245
 
@@ -257,54 +256,93 @@ static int store_common(transport_smart *t)
257
256
  if ((error = recv_pkt(&pkt, NULL, buf)) < 0)
258
257
  return error;
259
258
 
260
- if (pkt->type != GIT_PKT_ACK) {
259
+ if (pkt->type == GIT_PKT_ACK) {
260
+ if (git_vector_insert(&t->common, pkt) < 0)
261
+ return -1;
262
+ } else {
261
263
  git__free(pkt);
262
264
  return 0;
263
265
  }
264
266
 
265
- if (git_vector_insert(&t->common, pkt) < 0) {
266
- git__free(pkt);
267
- return -1;
268
- }
269
267
  } while (1);
270
268
 
271
269
  return 0;
272
270
  }
273
271
 
272
+ static int fetch_setup_walk(git_revwalk **out, git_repository *repo)
273
+ {
274
+ git_revwalk *walk = NULL;
275
+ git_strarray refs;
276
+ unsigned int i;
277
+ git_reference *ref = NULL;
278
+ int error;
279
+
280
+ if ((error = git_reference_list(&refs, repo)) < 0)
281
+ return error;
282
+
283
+ if ((error = git_revwalk_new(&walk, repo)) < 0)
284
+ return error;
285
+
286
+ git_revwalk_sorting(walk, GIT_SORT_TIME);
287
+
288
+ for (i = 0; i < refs.count; ++i) {
289
+ git_reference_free(ref);
290
+ ref = NULL;
291
+
292
+ /* No tags */
293
+ if (!git__prefixcmp(refs.strings[i], GIT_REFS_TAGS_DIR))
294
+ continue;
295
+
296
+ if ((error = git_reference_lookup(&ref, repo, refs.strings[i])) < 0)
297
+ goto on_error;
298
+
299
+ if (git_reference_type(ref) == GIT_REF_SYMBOLIC)
300
+ continue;
301
+
302
+ if ((error = git_revwalk_push(walk, git_reference_target(ref))) < 0)
303
+ goto on_error;
304
+ }
305
+
306
+ *out = walk;
307
+
308
+ on_error:
309
+ if (error)
310
+ git_revwalk_free(walk);
311
+ git_reference_free(ref);
312
+ git_strarray_free(&refs);
313
+ return error;
314
+ }
315
+
274
316
  static int wait_while_ack(gitno_buffer *buf)
275
317
  {
276
318
  int error;
277
- git_pkt *pkt = NULL;
278
- git_pkt_ack *ack = NULL;
319
+ git_pkt_ack *pkt = NULL;
279
320
 
280
321
  while (1) {
281
- git_pkt_free(pkt);
322
+ git__free(pkt);
282
323
 
283
- if ((error = recv_pkt(&pkt, NULL, buf)) < 0)
324
+ if ((error = recv_pkt((git_pkt **)&pkt, NULL, buf)) < 0)
284
325
  return error;
285
326
 
286
327
  if (pkt->type == GIT_PKT_NAK)
287
328
  break;
288
- if (pkt->type != GIT_PKT_ACK)
289
- continue;
290
-
291
- ack = (git_pkt_ack*)pkt;
292
329
 
293
- if (ack->status != GIT_ACK_CONTINUE &&
294
- ack->status != GIT_ACK_COMMON &&
295
- ack->status != GIT_ACK_READY) {
296
- break;
330
+ if (pkt->type == GIT_PKT_ACK &&
331
+ (pkt->status != GIT_ACK_CONTINUE &&
332
+ pkt->status != GIT_ACK_COMMON &&
333
+ pkt->status != GIT_ACK_READY)) {
334
+ git__free(pkt);
335
+ return 0;
297
336
  }
298
337
  }
299
338
 
300
- git_pkt_free(pkt);
339
+ git__free(pkt);
301
340
  return 0;
302
341
  }
303
342
 
304
343
  int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, const git_remote_head * const *wants, size_t count)
305
344
  {
306
345
  transport_smart *t = (transport_smart *)transport;
307
- git_revwalk__push_options opts = GIT_REVWALK__PUSH_OPTIONS_INIT;
308
346
  gitno_buffer *buf = &t->buffer;
309
347
  git_buf data = GIT_BUF_INIT;
310
348
  git_revwalk *walk = NULL;
@@ -316,11 +354,7 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
316
354
  if ((error = git_pkt_buffer_wants(wants, count, &t->caps, &data)) < 0)
317
355
  return error;
318
356
 
319
- if ((error = git_revwalk_new(&walk, repo)) < 0)
320
- goto on_error;
321
-
322
- opts.insert_by_date = 1;
323
- if ((error = git_revwalk__push_glob(walk, "refs/*", &opts)) < 0)
357
+ if ((error = fetch_setup_walk(&walk, repo)) < 0)
324
358
  goto on_error;
325
359
 
326
360
  /*
@@ -344,7 +378,7 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
344
378
  i++;
345
379
  if (i % 20 == 0) {
346
380
  if (t->cancelled.val) {
347
- git_error_set(GIT_ERROR_NET, "The fetch was cancelled by the user");
381
+ giterr_set(GITERR_NET, "The fetch was cancelled by the user");
348
382
  error = GIT_EUSER;
349
383
  goto on_error;
350
384
  }
@@ -363,15 +397,15 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
363
397
  if ((error = store_common(t)) < 0)
364
398
  goto on_error;
365
399
  } else {
366
- if ((error = recv_pkt(NULL, &pkt_type, buf)) < 0)
400
+ error = recv_pkt(NULL, &pkt_type, buf);
401
+ if (error < 0) {
367
402
  goto on_error;
368
-
369
- if (pkt_type == GIT_PKT_ACK) {
403
+ } else if (pkt_type == GIT_PKT_ACK) {
370
404
  break;
371
405
  } else if (pkt_type == GIT_PKT_NAK) {
372
406
  continue;
373
407
  } else {
374
- git_error_set(GIT_ERROR_NET, "Unexpected pkt type");
408
+ giterr_set(GITERR_NET, "Unexpected pkt type");
375
409
  error = -1;
376
410
  goto on_error;
377
411
  }
@@ -423,23 +457,24 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
423
457
  goto on_error;
424
458
 
425
459
  if (t->cancelled.val) {
426
- git_error_set(GIT_ERROR_NET, "The fetch was cancelled by the user");
460
+ giterr_set(GITERR_NET, "The fetch was cancelled by the user");
427
461
  error = GIT_EUSER;
428
462
  goto on_error;
429
463
  }
430
464
  if ((error = git_smart__negotiation_step(&t->parent, data.ptr, data.size)) < 0)
431
465
  goto on_error;
432
466
 
433
- git_buf_dispose(&data);
467
+ git_buf_free(&data);
434
468
  git_revwalk_free(walk);
435
469
 
436
470
  /* Now let's eat up whatever the server gives us */
437
471
  if (!t->caps.multi_ack && !t->caps.multi_ack_detailed) {
438
- if ((error = recv_pkt(NULL, &pkt_type, buf)) < 0)
439
- return error;
472
+ error = recv_pkt(NULL, &pkt_type, buf);
440
473
 
441
- if (pkt_type != GIT_PKT_ACK && pkt_type != GIT_PKT_NAK) {
442
- git_error_set(GIT_ERROR_NET, "Unexpected pkt type");
474
+ if (error < 0) {
475
+ return error;
476
+ } else if (pkt_type != GIT_PKT_ACK && pkt_type != GIT_PKT_NAK) {
477
+ giterr_set(GITERR_NET, "Unexpected pkt type");
443
478
  return -1;
444
479
  }
445
480
  } else {
@@ -450,17 +485,17 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
450
485
 
451
486
  on_error:
452
487
  git_revwalk_free(walk);
453
- git_buf_dispose(&data);
488
+ git_buf_free(&data);
454
489
  return error;
455
490
  }
456
491
 
457
- static int no_sideband(transport_smart *t, struct git_odb_writepack *writepack, gitno_buffer *buf, git_indexer_progress *stats)
492
+ static int no_sideband(transport_smart *t, struct git_odb_writepack *writepack, gitno_buffer *buf, git_transfer_progress *stats)
458
493
  {
459
494
  int recvd;
460
495
 
461
496
  do {
462
497
  if (t->cancelled.val) {
463
- git_error_set(GIT_ERROR_NET, "The fetch was cancelled by the user");
498
+ giterr_set(GITERR_NET, "The fetch was cancelled by the user");
464
499
  return GIT_EUSER;
465
500
  }
466
501
 
@@ -481,9 +516,9 @@ static int no_sideband(transport_smart *t, struct git_odb_writepack *writepack,
481
516
 
482
517
  struct network_packetsize_payload
483
518
  {
484
- git_indexer_progress_cb callback;
519
+ git_transfer_progress_cb callback;
485
520
  void *payload;
486
- git_indexer_progress *stats;
521
+ git_transfer_progress *stats;
487
522
  size_t last_fired_bytes;
488
523
  };
489
524
 
@@ -508,8 +543,8 @@ static int network_packetsize(size_t received, void *payload)
508
543
  int git_smart__download_pack(
509
544
  git_transport *transport,
510
545
  git_repository *repo,
511
- git_indexer_progress *stats,
512
- git_indexer_progress_cb progress_cb,
546
+ git_transfer_progress *stats,
547
+ git_transfer_progress_cb transfer_progress_cb,
513
548
  void *progress_payload)
514
549
  {
515
550
  transport_smart *t = (transport_smart *)transport;
@@ -519,10 +554,10 @@ int git_smart__download_pack(
519
554
  int error = 0;
520
555
  struct network_packetsize_payload npp = {0};
521
556
 
522
- memset(stats, 0, sizeof(git_indexer_progress));
557
+ memset(stats, 0, sizeof(git_transfer_progress));
523
558
 
524
- if (progress_cb) {
525
- npp.callback = progress_cb;
559
+ if (transfer_progress_cb) {
560
+ npp.callback = transfer_progress_cb;
526
561
  npp.payload = progress_payload;
527
562
  npp.stats = stats;
528
563
  t->packetsize_cb = &network_packetsize;
@@ -535,7 +570,7 @@ int git_smart__download_pack(
535
570
  }
536
571
 
537
572
  if ((error = git_repository_odb__weakptr(&odb, repo)) < 0 ||
538
- ((error = git_odb_write_pack(&writepack, odb, progress_cb, progress_payload)) != 0))
573
+ ((error = git_odb_write_pack(&writepack, odb, transfer_progress_cb, progress_payload)) != 0))
539
574
  goto done;
540
575
 
541
576
  /*
@@ -553,7 +588,7 @@ int git_smart__download_pack(
553
588
 
554
589
  /* Check cancellation before network call */
555
590
  if (t->cancelled.val) {
556
- git_error_clear();
591
+ giterr_clear();
557
592
  error = GIT_EUSER;
558
593
  goto done;
559
594
  }
@@ -561,19 +596,12 @@ int git_smart__download_pack(
561
596
  if ((error = recv_pkt(&pkt, NULL, buf)) >= 0) {
562
597
  /* Check cancellation after network call */
563
598
  if (t->cancelled.val) {
564
- git_error_clear();
599
+ giterr_clear();
565
600
  error = GIT_EUSER;
566
601
  } else if (pkt->type == GIT_PKT_PROGRESS) {
567
602
  if (t->progress_cb) {
568
603
  git_pkt_progress *p = (git_pkt_progress *) pkt;
569
-
570
- if (p->len > INT_MAX) {
571
- git_error_set(GIT_ERROR_NET, "oversized progress message");
572
- error = GIT_ERROR;
573
- goto done;
574
- }
575
-
576
- error = t->progress_cb(p->data, (int)p->len, t->message_cb_payload);
604
+ error = t->progress_cb(p->data, p->len, t->message_cb_payload);
577
605
  }
578
606
  } else if (pkt->type == GIT_PKT_DATA) {
579
607
  git_pkt_data *p = (git_pkt_data *) pkt;
@@ -587,15 +615,14 @@ int git_smart__download_pack(
587
615
  }
588
616
  }
589
617
 
590
- git_pkt_free(pkt);
591
-
618
+ git__free(pkt);
592
619
  if (error < 0)
593
620
  goto done;
594
621
 
595
622
  } while (1);
596
623
 
597
624
  /*
598
- * Trailing execution of progress_cb, if necessary...
625
+ * Trailing execution of transfer_progress_cb, if necessary...
599
626
  * Only the callback through the npp datastructure currently
600
627
  * updates the last_fired_bytes value. It is possible that
601
628
  * progress has already been reported with the correct
@@ -614,7 +641,7 @@ int git_smart__download_pack(
614
641
  done:
615
642
  if (writepack)
616
643
  writepack->free(writepack);
617
- if (progress_cb) {
644
+ if (transfer_progress_cb) {
618
645
  t->packetsize_cb = NULL;
619
646
  t->packetsize_payload = NULL;
620
647
  }
@@ -670,7 +697,7 @@ static int add_push_report_pkt(git_push *push, git_pkt *pkt)
670
697
  switch (pkt->type) {
671
698
  case GIT_PKT_OK:
672
699
  status = git__calloc(1, sizeof(push_status));
673
- GIT_ERROR_CHECK_ALLOC(status);
700
+ GITERR_CHECK_ALLOC(status);
674
701
  status->msg = NULL;
675
702
  status->ref = git__strdup(((git_pkt_ok *)pkt)->ref);
676
703
  if (!status->ref ||
@@ -681,7 +708,7 @@ static int add_push_report_pkt(git_push *push, git_pkt *pkt)
681
708
  break;
682
709
  case GIT_PKT_NG:
683
710
  status = git__calloc(1, sizeof(push_status));
684
- GIT_ERROR_CHECK_ALLOC(status);
711
+ GITERR_CHECK_ALLOC(status);
685
712
  status->ref = git__strdup(((git_pkt_ng *)pkt)->ref);
686
713
  status->msg = git__strdup(((git_pkt_ng *)pkt)->msg);
687
714
  if (!status->ref || !status->msg ||
@@ -696,7 +723,7 @@ static int add_push_report_pkt(git_push *push, git_pkt *pkt)
696
723
  case GIT_PKT_FLUSH:
697
724
  return GIT_ITEROVER;
698
725
  default:
699
- git_error_set(GIT_ERROR_NET, "report-status: protocol error");
726
+ giterr_set(GITERR_NET, "report-status: protocol error");
700
727
  return -1;
701
728
  }
702
729
 
@@ -784,7 +811,7 @@ static int parse_report(transport_smart *transport, git_push *push)
784
811
  }
785
812
 
786
813
  if (recvd == 0) {
787
- git_error_set(GIT_ERROR_NET, "early EOF");
814
+ giterr_set(GITERR_NET, "early EOF");
788
815
  error = GIT_EEOF;
789
816
  goto done;
790
817
  }
@@ -801,21 +828,14 @@ static int parse_report(transport_smart *transport, git_push *push)
801
828
  error = add_push_report_sideband_pkt(push, (git_pkt_data *)pkt, &data_pkt_buf);
802
829
  break;
803
830
  case GIT_PKT_ERR:
804
- git_error_set(GIT_ERROR_NET, "report-status: Error reported: %s",
831
+ giterr_set(GITERR_NET, "report-status: Error reported: %s",
805
832
  ((git_pkt_err *)pkt)->error);
806
833
  error = -1;
807
834
  break;
808
835
  case GIT_PKT_PROGRESS:
809
836
  if (transport->progress_cb) {
810
837
  git_pkt_progress *p = (git_pkt_progress *) pkt;
811
-
812
- if (p->len > INT_MAX) {
813
- git_error_set(GIT_ERROR_NET, "oversized progress message");
814
- error = GIT_ERROR;
815
- goto done;
816
- }
817
-
818
- error = transport->progress_cb(p->data, (int)p->len, transport->message_cb_payload);
838
+ error = transport->progress_cb(p->data, p->len, transport->message_cb_payload);
819
839
  }
820
840
  break;
821
841
  default:
@@ -831,7 +851,7 @@ static int parse_report(transport_smart *transport, git_push *push)
831
851
  if (data_pkt_buf.size > 0) {
832
852
  /* If there was data remaining in the pack data buffer,
833
853
  * then the server sent a partial pkt-line */
834
- git_error_set(GIT_ERROR_NET, "Incomplete pack data pkt-line");
854
+ giterr_set(GITERR_NET, "Incomplete pack data pkt-line");
835
855
  error = GIT_ERROR;
836
856
  }
837
857
  goto done;
@@ -842,14 +862,14 @@ static int parse_report(transport_smart *transport, git_push *push)
842
862
  }
843
863
  }
844
864
  done:
845
- git_buf_dispose(&data_pkt_buf);
865
+ git_buf_free(&data_pkt_buf);
846
866
  return error;
847
867
  }
848
868
 
849
869
  static int add_ref_from_push_spec(git_vector *refs, push_spec *push_spec)
850
870
  {
851
871
  git_pkt_ref *added = git__calloc(1, sizeof(git_pkt_ref));
852
- GIT_ERROR_CHECK_ALLOC(added);
872
+ GITERR_CHECK_ALLOC(added);
853
873
 
854
874
  added->type = GIT_PKT_REF;
855
875
  git_oid_cpy(&added->head.oid, &push_spec->loid);
@@ -878,7 +898,7 @@ static int update_refs_from_report(
878
898
  /* For each push spec we sent to the server, we should have
879
899
  * gotten back a status packet in the push report */
880
900
  if (push_specs->length != push_report->length) {
881
- git_error_set(GIT_ERROR_NET, "report-status: protocol error");
901
+ giterr_set(GITERR_NET, "report-status: protocol error");
882
902
  return -1;
883
903
  }
884
904
 
@@ -893,7 +913,7 @@ static int update_refs_from_report(
893
913
  /* For each push spec we sent to the server, we should have
894
914
  * gotten back a status packet in the push report which matches */
895
915
  if (strcmp(push_spec->refspec.dst, push_status->ref)) {
896
- git_error_set(GIT_ERROR_NET, "report-status: protocol error");
916
+ giterr_set(GITERR_NET, "report-status: protocol error");
897
917
  return -1;
898
918
  }
899
919
  }
@@ -939,7 +959,7 @@ static int update_refs_from_report(
939
959
 
940
960
  /* Remove any refs which we updated to have a zero OID. */
941
961
  git_vector_rforeach(refs, i, ref) {
942
- if (git_oid_is_zero(&ref->head.oid)) {
962
+ if (git_oid_iszero(&ref->head.oid)) {
943
963
  git_vector_remove(refs, i);
944
964
  git_pkt_free((git_pkt *)ref);
945
965
  }
@@ -954,7 +974,7 @@ struct push_packbuilder_payload
954
974
  {
955
975
  git_smart_subtransport_stream *stream;
956
976
  git_packbuilder *pb;
957
- git_push_transfer_progress_cb cb;
977
+ git_push_transfer_progress cb;
958
978
  void *cb_payload;
959
979
  size_t last_bytes;
960
980
  double last_progress_report_time;
@@ -1065,6 +1085,6 @@ int git_smart__push(git_transport *transport, git_push *push, const git_remote_c
1065
1085
  }
1066
1086
 
1067
1087
  done:
1068
- git_buf_dispose(&pktline);
1088
+ git_buf_free(&pktline);
1069
1089
  return error;
1070
1090
  }