rugged 0.28.4 → 0.28.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/AUTHORS +0 -1
  4. data/vendor/libgit2/CMakeLists.txt +16 -36
  5. data/vendor/libgit2/COPYING +0 -28
  6. data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +1 -5
  7. data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
  8. data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
  9. data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
  10. data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
  11. data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
  12. data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
  13. data/vendor/libgit2/deps/regex/COPYING +502 -0
  14. data/vendor/libgit2/deps/regex/config.h +7 -0
  15. data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
  16. data/vendor/libgit2/deps/regex/regex.c +92 -0
  17. data/vendor/libgit2/deps/regex/regex.h +582 -0
  18. data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
  19. data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
  20. data/vendor/libgit2/deps/regex/regexec.c +4369 -0
  21. data/vendor/libgit2/deps/zlib/adler32.c +7 -0
  22. data/vendor/libgit2/deps/zlib/crc32.c +7 -0
  23. data/vendor/libgit2/include/git2.h +0 -2
  24. data/vendor/libgit2/include/git2/apply.h +2 -22
  25. data/vendor/libgit2/include/git2/attr.h +12 -19
  26. data/vendor/libgit2/include/git2/blame.h +2 -2
  27. data/vendor/libgit2/include/git2/blob.h +12 -44
  28. data/vendor/libgit2/include/git2/buffer.h +14 -20
  29. data/vendor/libgit2/include/git2/checkout.h +14 -46
  30. data/vendor/libgit2/include/git2/cherrypick.h +3 -3
  31. data/vendor/libgit2/include/git2/clone.h +2 -2
  32. data/vendor/libgit2/include/git2/commit.h +1 -23
  33. data/vendor/libgit2/include/git2/common.h +5 -7
  34. data/vendor/libgit2/include/git2/config.h +12 -12
  35. data/vendor/libgit2/include/git2/deprecated.h +3 -243
  36. data/vendor/libgit2/include/git2/describe.h +4 -4
  37. data/vendor/libgit2/include/git2/diff.h +14 -16
  38. data/vendor/libgit2/include/git2/filter.h +0 -8
  39. data/vendor/libgit2/include/git2/index.h +1 -2
  40. data/vendor/libgit2/include/git2/indexer.h +4 -48
  41. data/vendor/libgit2/include/git2/inttypes.h +309 -0
  42. data/vendor/libgit2/include/git2/merge.h +10 -6
  43. data/vendor/libgit2/include/git2/net.h +5 -0
  44. data/vendor/libgit2/include/git2/object.h +14 -2
  45. data/vendor/libgit2/include/git2/odb.h +2 -3
  46. data/vendor/libgit2/include/git2/odb_backend.h +4 -5
  47. data/vendor/libgit2/include/git2/oid.h +1 -1
  48. data/vendor/libgit2/include/git2/pack.h +1 -12
  49. data/vendor/libgit2/include/git2/proxy.h +3 -5
  50. data/vendor/libgit2/include/git2/rebase.h +2 -46
  51. data/vendor/libgit2/include/git2/refs.h +0 -19
  52. data/vendor/libgit2/include/git2/remote.h +12 -35
  53. data/vendor/libgit2/include/git2/repository.h +2 -24
  54. data/vendor/libgit2/include/git2/revert.h +1 -1
  55. data/vendor/libgit2/include/git2/stash.h +3 -3
  56. data/vendor/libgit2/include/git2/status.h +16 -25
  57. data/vendor/libgit2/include/git2/submodule.h +3 -20
  58. data/vendor/libgit2/include/git2/sys/alloc.h +9 -9
  59. data/vendor/libgit2/include/git2/sys/odb_backend.h +4 -48
  60. data/vendor/libgit2/include/git2/sys/refdb_backend.h +21 -57
  61. data/vendor/libgit2/include/git2/sys/repository.h +1 -5
  62. data/vendor/libgit2/include/git2/sys/time.h +31 -0
  63. data/vendor/libgit2/include/git2/sys/transport.h +2 -2
  64. data/vendor/libgit2/include/git2/tag.h +2 -11
  65. data/vendor/libgit2/include/git2/trace.h +2 -2
  66. data/vendor/libgit2/include/git2/transport.h +340 -11
  67. data/vendor/libgit2/include/git2/tree.h +1 -1
  68. data/vendor/libgit2/include/git2/types.h +89 -4
  69. data/vendor/libgit2/include/git2/version.h +2 -2
  70. data/vendor/libgit2/include/git2/worktree.h +5 -5
  71. data/vendor/libgit2/libgit2.pc.in +13 -0
  72. data/vendor/libgit2/src/CMakeLists.txt +222 -88
  73. data/vendor/libgit2/src/alloc.c +14 -2
  74. data/vendor/libgit2/src/apply.c +30 -60
  75. data/vendor/libgit2/src/attr.c +64 -70
  76. data/vendor/libgit2/src/attr_file.c +96 -189
  77. data/vendor/libgit2/src/attr_file.h +9 -9
  78. data/vendor/libgit2/src/attrcache.c +46 -44
  79. data/vendor/libgit2/src/attrcache.h +1 -2
  80. data/vendor/libgit2/src/blame.c +5 -17
  81. data/vendor/libgit2/src/blame.h +1 -1
  82. data/vendor/libgit2/src/blame_git.c +7 -21
  83. data/vendor/libgit2/src/blob.c +17 -81
  84. data/vendor/libgit2/src/blob.h +2 -2
  85. data/vendor/libgit2/src/branch.c +5 -29
  86. data/vendor/libgit2/src/buffer.c +7 -14
  87. data/vendor/libgit2/src/cache.c +33 -26
  88. data/vendor/libgit2/src/cache.h +1 -1
  89. data/vendor/libgit2/src/cc-compat.h +0 -5
  90. data/vendor/libgit2/src/checkout.c +16 -26
  91. data/vendor/libgit2/src/cherrypick.c +3 -9
  92. data/vendor/libgit2/src/clone.c +7 -29
  93. data/vendor/libgit2/src/clone.h +0 -4
  94. data/vendor/libgit2/src/commit.c +21 -69
  95. data/vendor/libgit2/src/commit.h +0 -6
  96. data/vendor/libgit2/src/commit_list.c +76 -28
  97. data/vendor/libgit2/src/commit_list.h +2 -2
  98. data/vendor/libgit2/src/common.h +75 -3
  99. data/vendor/libgit2/src/config.c +40 -31
  100. data/vendor/libgit2/src/config.h +6 -7
  101. data/vendor/libgit2/src/config_backend.h +0 -12
  102. data/vendor/libgit2/src/config_cache.c +39 -39
  103. data/vendor/libgit2/src/config_entries.c +99 -69
  104. data/vendor/libgit2/src/config_entries.h +0 -1
  105. data/vendor/libgit2/src/config_file.c +380 -337
  106. data/vendor/libgit2/src/config_mem.c +16 -12
  107. data/vendor/libgit2/src/config_parse.c +29 -49
  108. data/vendor/libgit2/src/config_parse.h +12 -13
  109. data/vendor/libgit2/src/crlf.c +14 -14
  110. data/vendor/libgit2/src/describe.c +20 -21
  111. data/vendor/libgit2/src/diff.c +58 -43
  112. data/vendor/libgit2/src/diff.h +1 -2
  113. data/vendor/libgit2/src/diff_driver.c +38 -37
  114. data/vendor/libgit2/src/diff_file.c +7 -9
  115. data/vendor/libgit2/src/diff_file.h +1 -1
  116. data/vendor/libgit2/src/diff_generate.c +85 -135
  117. data/vendor/libgit2/src/diff_generate.h +2 -2
  118. data/vendor/libgit2/src/diff_parse.c +1 -1
  119. data/vendor/libgit2/src/diff_print.c +13 -25
  120. data/vendor/libgit2/src/diff_stats.c +1 -1
  121. data/vendor/libgit2/src/diff_tform.c +4 -4
  122. data/vendor/libgit2/src/errors.c +22 -12
  123. data/vendor/libgit2/src/features.h.in +2 -9
  124. data/vendor/libgit2/src/fetch.c +2 -7
  125. data/vendor/libgit2/src/fetchhead.c +1 -1
  126. data/vendor/libgit2/src/filebuf.c +10 -6
  127. data/vendor/libgit2/src/filebuf.h +2 -2
  128. data/vendor/libgit2/src/{futils.c → fileops.c} +17 -21
  129. data/vendor/libgit2/src/{futils.h → fileops.h} +5 -5
  130. data/vendor/libgit2/src/filter.c +8 -16
  131. data/vendor/libgit2/src/fnmatch.c +248 -0
  132. data/vendor/libgit2/src/fnmatch.h +48 -0
  133. data/vendor/libgit2/src/global.c +40 -12
  134. data/vendor/libgit2/src/global.h +2 -0
  135. data/vendor/libgit2/src/hash.c +0 -61
  136. data/vendor/libgit2/src/hash.h +21 -19
  137. data/vendor/libgit2/src/hash/{sha1/collisiondetect.c → hash_collisiondetect.h} +17 -14
  138. data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +19 -15
  139. data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
  140. data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +14 -4
  141. data/vendor/libgit2/src/hash/{sha1/mbedtls.c → hash_mbedtls.c} +7 -15
  142. data/vendor/libgit2/src/hash/{sha1/mbedtls.h → hash_mbedtls.h} +11 -6
  143. data/vendor/libgit2/src/hash/{sha1/openssl.c → hash_openssl.h} +18 -14
  144. data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +24 -34
  145. data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
  146. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
  147. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
  148. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
  149. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
  150. data/vendor/libgit2/src/hashsig.c +1 -1
  151. data/vendor/libgit2/src/idxmap.c +65 -91
  152. data/vendor/libgit2/src/idxmap.h +15 -151
  153. data/vendor/libgit2/src/ignore.c +38 -32
  154. data/vendor/libgit2/src/index.c +43 -66
  155. data/vendor/libgit2/src/index.h +1 -1
  156. data/vendor/libgit2/src/indexer.c +70 -69
  157. data/vendor/libgit2/src/integer.h +4 -39
  158. data/vendor/libgit2/src/iterator.c +22 -27
  159. data/vendor/libgit2/src/map.h +1 -1
  160. data/vendor/libgit2/src/merge.c +44 -58
  161. data/vendor/libgit2/src/merge_driver.c +4 -4
  162. data/vendor/libgit2/src/merge_file.c +1 -1
  163. data/vendor/libgit2/src/mwindow.c +23 -18
  164. data/vendor/libgit2/src/mwindow.h +4 -4
  165. data/vendor/libgit2/src/netops.c +165 -55
  166. data/vendor/libgit2/src/netops.h +25 -3
  167. data/vendor/libgit2/src/notes.c +2 -2
  168. data/vendor/libgit2/src/object.c +2 -2
  169. data/vendor/libgit2/src/object.h +0 -2
  170. data/vendor/libgit2/src/odb.c +23 -41
  171. data/vendor/libgit2/src/odb.h +2 -3
  172. data/vendor/libgit2/src/odb_loose.c +10 -17
  173. data/vendor/libgit2/src/odb_mempack.c +23 -10
  174. data/vendor/libgit2/src/odb_pack.c +4 -4
  175. data/vendor/libgit2/src/offmap.c +55 -43
  176. data/vendor/libgit2/src/offmap.h +24 -102
  177. data/vendor/libgit2/src/oid.c +1 -6
  178. data/vendor/libgit2/src/oidmap.c +57 -39
  179. data/vendor/libgit2/src/oidmap.h +19 -99
  180. data/vendor/libgit2/src/pack-objects.c +32 -25
  181. data/vendor/libgit2/src/pack-objects.h +1 -1
  182. data/vendor/libgit2/src/pack.c +47 -45
  183. data/vendor/libgit2/src/pack.h +14 -12
  184. data/vendor/libgit2/src/parse.c +0 -10
  185. data/vendor/libgit2/src/parse.h +3 -3
  186. data/vendor/libgit2/src/patch.c +1 -1
  187. data/vendor/libgit2/src/patch_generate.c +2 -2
  188. data/vendor/libgit2/src/patch_parse.c +31 -124
  189. data/vendor/libgit2/src/path.c +6 -43
  190. data/vendor/libgit2/src/path.h +0 -2
  191. data/vendor/libgit2/src/pathspec.c +13 -13
  192. data/vendor/libgit2/src/pool.c +22 -26
  193. data/vendor/libgit2/src/pool.h +7 -7
  194. data/vendor/libgit2/src/posix.c +7 -7
  195. data/vendor/libgit2/src/posix.h +1 -12
  196. data/vendor/libgit2/src/proxy.c +2 -7
  197. data/vendor/libgit2/src/push.c +5 -10
  198. data/vendor/libgit2/src/reader.c +2 -2
  199. data/vendor/libgit2/src/rebase.c +7 -66
  200. data/vendor/libgit2/src/refdb.c +0 -12
  201. data/vendor/libgit2/src/refdb_fs.c +165 -214
  202. data/vendor/libgit2/src/reflog.c +13 -11
  203. data/vendor/libgit2/src/refs.c +18 -24
  204. data/vendor/libgit2/src/refspec.c +16 -9
  205. data/vendor/libgit2/src/remote.c +52 -50
  206. data/vendor/libgit2/src/remote.h +2 -2
  207. data/vendor/libgit2/src/repository.c +100 -115
  208. data/vendor/libgit2/src/repository.h +40 -49
  209. data/vendor/libgit2/src/revert.c +3 -8
  210. data/vendor/libgit2/src/revparse.c +19 -18
  211. data/vendor/libgit2/src/revwalk.c +30 -63
  212. data/vendor/libgit2/src/revwalk.h +0 -20
  213. data/vendor/libgit2/src/settings.c +0 -5
  214. data/vendor/libgit2/src/sortedcache.c +26 -12
  215. data/vendor/libgit2/src/sortedcache.h +1 -1
  216. data/vendor/libgit2/src/stash.c +65 -45
  217. data/vendor/libgit2/src/status.c +9 -15
  218. data/vendor/libgit2/src/{allocators/stdalloc.c → stdalloc.c} +4 -3
  219. data/vendor/libgit2/src/{allocators/stdalloc.h → stdalloc.h} +4 -4
  220. data/vendor/libgit2/src/streams/openssl.c +0 -20
  221. data/vendor/libgit2/src/streams/socket.c +2 -2
  222. data/vendor/libgit2/src/strmap.c +84 -37
  223. data/vendor/libgit2/src/strmap.h +33 -105
  224. data/vendor/libgit2/src/submodule.c +70 -102
  225. data/vendor/libgit2/src/submodule.h +1 -1
  226. data/vendor/libgit2/src/sysdir.c +1 -11
  227. data/vendor/libgit2/src/tag.c +2 -10
  228. data/vendor/libgit2/src/trace.c +1 -1
  229. data/vendor/libgit2/src/trace.h +2 -2
  230. data/vendor/libgit2/src/trailer.c +32 -46
  231. data/vendor/libgit2/src/transaction.c +9 -10
  232. data/vendor/libgit2/src/transports/auth.c +9 -10
  233. data/vendor/libgit2/src/transports/auth.h +4 -11
  234. data/vendor/libgit2/src/transports/auth_negotiate.c +9 -23
  235. data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
  236. data/vendor/libgit2/src/transports/cred.c +6 -6
  237. data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
  238. data/vendor/libgit2/src/transports/git.c +16 -11
  239. data/vendor/libgit2/src/transports/http.c +276 -419
  240. data/vendor/libgit2/src/transports/http.h +1 -1
  241. data/vendor/libgit2/src/transports/local.c +9 -9
  242. data/vendor/libgit2/src/transports/smart.c +17 -17
  243. data/vendor/libgit2/src/transports/smart.h +2 -2
  244. data/vendor/libgit2/src/transports/smart_protocol.c +60 -36
  245. data/vendor/libgit2/src/transports/ssh.c +36 -46
  246. data/vendor/libgit2/src/transports/winhttp.c +207 -231
  247. data/vendor/libgit2/src/tree-cache.c +7 -14
  248. data/vendor/libgit2/src/tree.c +24 -10
  249. data/vendor/libgit2/src/unix/map.c +1 -1
  250. data/vendor/libgit2/src/unix/posix.h +11 -1
  251. data/vendor/libgit2/src/userdiff.h +1 -3
  252. data/vendor/libgit2/src/util.c +53 -51
  253. data/vendor/libgit2/src/util.h +21 -16
  254. data/vendor/libgit2/src/win32/map.c +5 -3
  255. data/vendor/libgit2/src/win32/path_w32.c +2 -12
  256. data/vendor/libgit2/src/win32/path_w32.h +29 -0
  257. data/vendor/libgit2/src/win32/posix.h +4 -1
  258. data/vendor/libgit2/src/win32/posix_w32.c +5 -40
  259. data/vendor/libgit2/src/win32/precompiled.h +2 -0
  260. data/vendor/libgit2/src/win32/thread.c +10 -5
  261. data/vendor/libgit2/src/win32/w32_buffer.c +3 -7
  262. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +93 -0
  263. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +2 -0
  264. data/vendor/libgit2/src/win32/w32_stack.c +9 -4
  265. data/vendor/libgit2/src/win32/w32_stack.h +3 -3
  266. data/vendor/libgit2/src/win32/w32_util.c +0 -31
  267. data/vendor/libgit2/src/win32/w32_util.h +32 -6
  268. data/vendor/libgit2/src/worktree.c +22 -36
  269. data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
  270. data/vendor/libgit2/src/xdiff/xmerge.c +0 -12
  271. data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
  272. metadata +34 -98
  273. data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
  274. data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
  275. data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
  276. data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
  277. data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
  278. data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
  279. data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
  280. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
  281. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
  282. data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
  283. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
  284. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
  285. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
  286. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
  287. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
  288. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
  289. data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
  290. data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
  291. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
  292. data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
  293. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
  294. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
  295. data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
  296. data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
  297. data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
  298. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
  299. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  300. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  301. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  302. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  303. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  304. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  305. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  306. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  307. data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
  308. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
  309. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  310. data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
  311. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  312. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  313. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  314. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  315. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  316. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  317. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  318. data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
  319. data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
  320. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  321. data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
  322. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  323. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  324. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  325. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  326. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  327. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  328. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  329. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
  330. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  331. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
  332. data/vendor/libgit2/include/git2/cert.h +0 -135
  333. data/vendor/libgit2/include/git2/cred.h +0 -308
  334. data/vendor/libgit2/include/git2/sys/cred.h +0 -90
  335. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  336. data/vendor/libgit2/src/config_snapshot.c +0 -206
  337. data/vendor/libgit2/src/errors.h +0 -81
  338. data/vendor/libgit2/src/hash/sha1.h +0 -38
  339. data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
  340. data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
  341. data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
  342. data/vendor/libgit2/src/net.c +0 -184
  343. data/vendor/libgit2/src/net.h +0 -36
  344. data/vendor/libgit2/src/regexp.c +0 -221
  345. data/vendor/libgit2/src/regexp.h +0 -97
  346. data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
  347. data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
  348. data/vendor/libgit2/src/wildmatch.c +0 -320
  349. data/vendor/libgit2/src/wildmatch.h +0 -23
  350. data/vendor/libgit2/src/win32/w32_common.h +0 -39
@@ -29,18 +29,18 @@
29
29
 
30
30
  #define INSERT_IN_MAP_EX(idx, map, e, err) do { \
31
31
  if ((idx)->ignore_case) \
32
- (err) = git_idxmap_icase_set((git_idxmap_icase *) (map), (e), (e)); \
32
+ git_idxmap_icase_insert((git_idxmap_icase *) (map), (e), (e), (err)); \
33
33
  else \
34
- (err) = git_idxmap_set((map), (e), (e)); \
34
+ git_idxmap_insert((map), (e), (e), (err)); \
35
35
  } while (0)
36
36
 
37
37
  #define INSERT_IN_MAP(idx, e, err) INSERT_IN_MAP_EX(idx, (idx)->entries_map, e, err)
38
38
 
39
- #define LOOKUP_IN_MAP(v, idx, k) do { \
39
+ #define LOOKUP_IN_MAP(p, idx, k) do { \
40
40
  if ((idx)->ignore_case) \
41
- (v) = git_idxmap_icase_get((git_idxmap_icase *) index->entries_map, (k)); \
41
+ (p) = git_idxmap_icase_lookup_index((git_idxmap_icase *) index->entries_map, (k)); \
42
42
  else \
43
- (v) = git_idxmap_get(index->entries_map, (k)); \
43
+ (p) = git_idxmap_lookup_index(index->entries_map, (k)); \
44
44
  } while (0)
45
45
 
46
46
  #define DELETE_IN_MAP(idx, e) do { \
@@ -423,10 +423,10 @@ int git_index_open(git_index **index_out, const char *index_path)
423
423
  }
424
424
 
425
425
  if (git_vector_init(&index->entries, 32, git_index_entry_cmp) < 0 ||
426
- git_idxmap_new(&index->entries_map) < 0 ||
427
- git_vector_init(&index->names, 8, conflict_name_cmp) < 0 ||
428
- git_vector_init(&index->reuc, 8, reuc_cmp) < 0 ||
429
- git_vector_init(&index->deleted, 8, git_index_entry_cmp) < 0)
426
+ git_idxmap_alloc(&index->entries_map) < 0 ||
427
+ git_vector_init(&index->names, 8, conflict_name_cmp) < 0 ||
428
+ git_vector_init(&index->reuc, 8, reuc_cmp) < 0 ||
429
+ git_vector_init(&index->deleted, 8, git_index_entry_cmp) < 0)
430
430
  goto fail;
431
431
 
432
432
  index->entries_cmp_path = git__strcmp_cb;
@@ -570,11 +570,11 @@ int git_index_set_caps(git_index *index, int caps)
570
570
  return create_index_error(
571
571
  -1, "cannot access repository to set index caps");
572
572
 
573
- if (!git_repository__configmap_lookup(&val, repo, GIT_CONFIGMAP_IGNORECASE))
573
+ if (!git_repository__cvar(&val, repo, GIT_CVAR_IGNORECASE))
574
574
  index->ignore_case = (val != 0);
575
- if (!git_repository__configmap_lookup(&val, repo, GIT_CONFIGMAP_FILEMODE))
575
+ if (!git_repository__cvar(&val, repo, GIT_CVAR_FILEMODE))
576
576
  index->distrust_filemode = (val == 0);
577
- if (!git_repository__configmap_lookup(&val, repo, GIT_CONFIGMAP_SYMLINKS))
577
+ if (!git_repository__cvar(&val, repo, GIT_CVAR_SYMLINKS))
578
578
  index->no_symlinks = (val == 0);
579
579
  }
580
580
  else {
@@ -852,21 +852,20 @@ const git_index_entry *git_index_get_bypath(
852
852
  git_index *index, const char *path, int stage)
853
853
  {
854
854
  git_index_entry key = {{ 0 }};
855
- git_index_entry *value;
855
+ size_t pos;
856
856
 
857
857
  assert(index);
858
858
 
859
859
  key.path = path;
860
860
  GIT_INDEX_ENTRY_STAGE_SET(&key, stage);
861
861
 
862
- LOOKUP_IN_MAP(value, index, &key);
862
+ LOOKUP_IN_MAP(pos, index, &key);
863
863
 
864
- if (!value) {
865
- git_error_set(GIT_ERROR_INDEX, "index does not contain '%s'", path);
866
- return NULL;
867
- }
864
+ if (git_idxmap_valid_index(index->entries_map, pos))
865
+ return git_idxmap_value_at(index->entries_map, pos);
868
866
 
869
- return value;
867
+ git_error_set(GIT_ERROR_INDEX, "index does not contain '%s'", path);
868
+ return NULL;
870
869
  }
871
870
 
872
871
  void git_index_entry__init_from_stat(
@@ -1402,7 +1401,7 @@ static int index_insert(
1402
1401
  if ((error = git_vector_insert_sorted(&index->entries, entry, index_no_dups)) < 0)
1403
1402
  goto out;
1404
1403
 
1405
- INSERT_IN_MAP(index, entry, error);
1404
+ INSERT_IN_MAP(index, entry, &error);
1406
1405
  }
1407
1406
 
1408
1407
  index->dirty = 1;
@@ -1454,7 +1453,7 @@ GIT_INLINE(bool) valid_filemode(const int filemode)
1454
1453
  return (is_file_or_link(filemode) || filemode == GIT_FILEMODE_COMMIT);
1455
1454
  }
1456
1455
 
1457
- int git_index_add_from_buffer(
1456
+ int git_index_add_frombuffer(
1458
1457
  git_index *index, const git_index_entry *source_entry,
1459
1458
  const void *buffer, size_t len)
1460
1459
  {
@@ -1474,22 +1473,17 @@ int git_index_add_from_buffer(
1474
1473
  return -1;
1475
1474
  }
1476
1475
 
1477
- if (len > UINT32_MAX) {
1478
- git_error_set(GIT_ERROR_INDEX, "buffer is too large");
1479
- return -1;
1480
- }
1481
-
1482
1476
  if (index_entry_dup(&entry, index, source_entry) < 0)
1483
1477
  return -1;
1484
1478
 
1485
- error = git_blob_create_from_buffer(&id, INDEX_OWNER(index), buffer, len);
1479
+ error = git_blob_create_frombuffer(&id, INDEX_OWNER(index), buffer, len);
1486
1480
  if (error < 0) {
1487
1481
  index_entry_free(entry);
1488
1482
  return error;
1489
1483
  }
1490
1484
 
1491
1485
  git_oid_cpy(&entry->id, &id);
1492
- entry->file_size = (uint32_t)len;
1486
+ entry->file_size = len;
1493
1487
 
1494
1488
  if ((error = index_insert(index, &entry, 1, true, true, true)) < 0)
1495
1489
  return error;
@@ -1624,9 +1618,8 @@ int git_index__fill(git_index *index, const git_vector *source_entries)
1624
1618
  if (!source_entries->length)
1625
1619
  return 0;
1626
1620
 
1627
- if (git_vector_size_hint(&index->entries, source_entries->length) < 0 ||
1628
- git_idxmap_resize(index->entries_map, (size_t)(source_entries->length * 1.3)) < 0)
1629
- return -1;
1621
+ git_vector_size_hint(&index->entries, source_entries->length);
1622
+ git_idxmap_resize(index->entries_map, (size_t)(source_entries->length * 1.3));
1630
1623
 
1631
1624
  git_vector_foreach(source_entries, i, source_entry) {
1632
1625
  git_index_entry *entry = NULL;
@@ -1641,7 +1634,7 @@ int git_index__fill(git_index *index, const git_vector *source_entries)
1641
1634
  if ((ret = git_vector_insert(&index->entries, entry)) < 0)
1642
1635
  break;
1643
1636
 
1644
- INSERT_IN_MAP(index, entry, ret);
1637
+ INSERT_IN_MAP(index, entry, &ret);
1645
1638
  if (ret < 0)
1646
1639
  break;
1647
1640
 
@@ -2614,12 +2607,10 @@ static int parse_index(git_index *index, const char *buffer, size_t buffer_size)
2614
2607
 
2615
2608
  assert(!index->entries.length);
2616
2609
 
2617
- if (index->ignore_case &&
2618
- (error = git_idxmap_icase_resize((git_idxmap_icase *) index->entries_map,
2619
- header.entry_count)) < 0)
2620
- return error;
2621
- else if ((error = git_idxmap_resize(index->entries_map, header.entry_count)) < 0)
2622
- return error;
2610
+ if (index->ignore_case)
2611
+ git_idxmap_icase_resize((git_idxmap_icase *) index->entries_map, header.entry_count);
2612
+ else
2613
+ git_idxmap_resize(index->entries_map, header.entry_count);
2623
2614
 
2624
2615
  /* Parse all the entries */
2625
2616
  for (i = 0; i < header.entry_count && buffer_size > INDEX_FOOTER_SIZE; ++i) {
@@ -2636,7 +2627,7 @@ static int parse_index(git_index *index, const char *buffer, size_t buffer_size)
2636
2627
  goto done;
2637
2628
  }
2638
2629
 
2639
- INSERT_IN_MAP(index, entry, error);
2630
+ INSERT_IN_MAP(index, entry, &error);
2640
2631
 
2641
2632
  if (error < 0) {
2642
2633
  index_entry_free(entry);
@@ -3115,7 +3106,7 @@ int git_index_read_tree(git_index *index, const git_tree *tree)
3115
3106
  size_t i;
3116
3107
  git_index_entry *e;
3117
3108
 
3118
- if (git_idxmap_new(&entries_map) < 0)
3109
+ if (git_idxmap_alloc(&entries_map) < 0)
3119
3110
  return -1;
3120
3111
 
3121
3112
  git_vector_set_cmp(&entries, index->entries._cmp); /* match sort */
@@ -3133,15 +3124,13 @@ int git_index_read_tree(git_index *index, const git_tree *tree)
3133
3124
  if ((error = git_tree_walk(tree, GIT_TREEWALK_POST, read_tree_cb, &data)) < 0)
3134
3125
  goto cleanup;
3135
3126
 
3136
- if (index->ignore_case &&
3137
- (error = git_idxmap_icase_resize((git_idxmap_icase *) entries_map,
3138
- entries.length)) < 0)
3139
- goto cleanup;
3140
- else if ((error = git_idxmap_resize(entries_map, entries.length)) < 0)
3141
- goto cleanup;
3127
+ if (index->ignore_case)
3128
+ git_idxmap_icase_resize((git_idxmap_icase *) entries_map, entries.length);
3129
+ else
3130
+ git_idxmap_resize(entries_map, entries.length);
3142
3131
 
3143
3132
  git_vector_foreach(&entries, i, e) {
3144
- INSERT_IN_MAP_EX(index, entries_map, e, error);
3133
+ INSERT_IN_MAP_EX(index, entries_map, e, &error);
3145
3134
 
3146
3135
  if (error < 0) {
3147
3136
  git_error_set(GIT_ERROR_INDEX, "failed to insert entry into map");
@@ -3191,17 +3180,14 @@ static int git_index_read_iterator(
3191
3180
  assert((new_iterator->flags & GIT_ITERATOR_DONT_IGNORE_CASE));
3192
3181
 
3193
3182
  if ((error = git_vector_init(&new_entries, new_length_hint, index->entries._cmp)) < 0 ||
3194
- (error = git_vector_init(&remove_entries, index->entries.length, NULL)) < 0 ||
3195
- (error = git_idxmap_new(&new_entries_map)) < 0)
3183
+ (error = git_vector_init(&remove_entries, index->entries.length, NULL)) < 0 ||
3184
+ (error = git_idxmap_alloc(&new_entries_map)) < 0)
3196
3185
  goto done;
3197
3186
 
3198
- if (index->ignore_case && new_length_hint &&
3199
- (error = git_idxmap_icase_resize((git_idxmap_icase *) new_entries_map,
3200
- new_length_hint)) < 0)
3201
- goto done;
3202
- else if (new_length_hint &&
3203
- (error = git_idxmap_resize(new_entries_map, new_length_hint)) < 0)
3204
- goto done;
3187
+ if (index->ignore_case && new_length_hint)
3188
+ git_idxmap_icase_resize((git_idxmap_icase *) new_entries_map, new_length_hint);
3189
+ else if (new_length_hint)
3190
+ git_idxmap_resize(new_entries_map, new_length_hint);
3205
3191
 
3206
3192
  opts.flags = GIT_ITERATOR_DONT_IGNORE_CASE |
3207
3193
  GIT_ITERATOR_INCLUDE_CONFLICTS;
@@ -3265,7 +3251,7 @@ static int git_index_read_iterator(
3265
3251
 
3266
3252
  if (add_entry) {
3267
3253
  if ((error = git_vector_insert(&new_entries, add_entry)) == 0)
3268
- INSERT_IN_MAP_EX(index, new_entries_map, add_entry, error);
3254
+ INSERT_IN_MAP_EX(index, new_entries_map, add_entry, &error);
3269
3255
  }
3270
3256
 
3271
3257
  if (remove_entry && error >= 0)
@@ -3714,12 +3700,3 @@ void git_indexwriter_cleanup(git_indexwriter *writer)
3714
3700
  git_index_free(writer->index);
3715
3701
  writer->index = NULL;
3716
3702
  }
3717
-
3718
- /* Deprecated functions */
3719
-
3720
- int git_index_add_frombuffer(
3721
- git_index *index, const git_index_entry *source_entry,
3722
- const void *buffer, size_t len)
3723
- {
3724
- return git_index_add_from_buffer(index, source_entry, buffer, len);
3725
- }
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "common.h"
11
11
 
12
- #include "futils.h"
12
+ #include "fileops.h"
13
13
  #include "filebuf.h"
14
14
  #include "vector.h"
15
15
  #include "idxmap.h"
@@ -19,7 +19,6 @@
19
19
  #include "pack.h"
20
20
  #include "filebuf.h"
21
21
  #include "oid.h"
22
- #include "oidarray.h"
23
22
  #include "oidmap.h"
24
23
  #include "zstream.h"
25
24
  #include "object.h"
@@ -47,8 +46,8 @@ struct git_indexer {
47
46
  struct git_pack_header hdr;
48
47
  struct git_pack_file *pack;
49
48
  unsigned int mode;
50
- off64_t off;
51
- off64_t entry_start;
49
+ git_off_t off;
50
+ git_off_t entry_start;
52
51
  git_object_t entry_type;
53
52
  git_buf entry_data;
54
53
  git_packfile_stream stream;
@@ -58,7 +57,7 @@ struct git_indexer {
58
57
  unsigned int fanout[256];
59
58
  git_hash_ctx hash_ctx;
60
59
  git_oid hash;
61
- git_indexer_progress_cb progress_cb;
60
+ git_transfer_progress_cb progress_cb;
62
61
  void *progress_payload;
63
62
  char objbuf[8*1024];
64
63
 
@@ -75,7 +74,7 @@ struct git_indexer {
75
74
  };
76
75
 
77
76
  struct delta_info {
78
- off64_t delta_off;
77
+ git_off_t delta_off;
79
78
  };
80
79
 
81
80
  const git_oid *git_indexer_hash(const git_indexer *idx)
@@ -116,18 +115,13 @@ static int objects_cmp(const void *a, const void *b)
116
115
  return git_oid__cmp(&entrya->oid, &entryb->oid);
117
116
  }
118
117
 
119
- int git_indexer_options_init(git_indexer_options *opts, unsigned int version)
118
+ int git_indexer_init_options(git_indexer_options *opts, unsigned int version)
120
119
  {
121
120
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
122
121
  opts, version, git_indexer_options, GIT_INDEXER_OPTIONS_INIT);
123
122
  return 0;
124
123
  }
125
124
 
126
- int git_indexer_init_options(git_indexer_options *opts, unsigned int version)
127
- {
128
- return git_indexer_options_init(opts, version);
129
- }
130
-
131
125
  int git_indexer_new(
132
126
  git_indexer **out,
133
127
  const char *prefix,
@@ -153,9 +147,8 @@ int git_indexer_new(
153
147
  git_hash_ctx_init(&idx->hash_ctx);
154
148
  git_hash_ctx_init(&idx->trailer);
155
149
  git_buf_init(&idx->entry_data, 0);
156
-
157
- if ((error = git_oidmap_new(&idx->expected_oids)) < 0)
158
- goto cleanup;
150
+ idx->expected_oids = git_oidmap_alloc();
151
+ GIT_ERROR_CHECK_ALLOC(idx->expected_oids);
159
152
 
160
153
  idx->do_verify = opts.verify;
161
154
 
@@ -220,7 +213,7 @@ static int store_delta(git_indexer *idx)
220
213
  return 0;
221
214
  }
222
215
 
223
- static int hash_header(git_hash_ctx *ctx, off64_t len, git_object_t type)
216
+ static int hash_header(git_hash_ctx *ctx, git_off_t len, git_object_t type)
224
217
  {
225
218
  char buffer[64];
226
219
  size_t hdrlen;
@@ -265,7 +258,7 @@ static int advance_delta_offset(git_indexer *idx, git_object_t type)
265
258
  if (type == GIT_OBJECT_REF_DELTA) {
266
259
  idx->off += GIT_OID_RAWSZ;
267
260
  } else {
268
- off64_t base_off = get_delta_base(idx->pack, &w, &idx->off, type, idx->entry_start);
261
+ git_off_t base_off = get_delta_base(idx->pack, &w, &idx->off, type, idx->entry_start);
269
262
  git_mwindow_close(&w);
270
263
  if (base_off < 0)
271
264
  return (int)base_off;
@@ -291,7 +284,7 @@ static int read_object_stream(git_indexer *idx, git_packfile_stream *stream)
291
284
  return 0;
292
285
  }
293
286
 
294
- static int crc_object(uint32_t *crc_out, git_mwindow_file *mwf, off64_t start, off64_t size)
287
+ static int crc_object(uint32_t *crc_out, git_mwindow_file *mwf, git_off_t start, git_off_t size)
295
288
  {
296
289
  void *ptr;
297
290
  uint32_t crc;
@@ -315,8 +308,10 @@ static int crc_object(uint32_t *crc_out, git_mwindow_file *mwf, off64_t start, o
315
308
  return 0;
316
309
  }
317
310
 
318
- static int add_expected_oid(git_indexer *idx, const git_oid *oid)
311
+ static void add_expected_oid(git_indexer *idx, const git_oid *oid)
319
312
  {
313
+ int ret;
314
+
320
315
  /*
321
316
  * If we know about that object because it is stored in our ODB or
322
317
  * because we have already processed it as part of our pack file, we do
@@ -326,18 +321,15 @@ static int add_expected_oid(git_indexer *idx, const git_oid *oid)
326
321
  !git_oidmap_exists(idx->pack->idx_cache, oid) &&
327
322
  !git_oidmap_exists(idx->expected_oids, oid)) {
328
323
  git_oid *dup = git__malloc(sizeof(*oid));
329
- GIT_ERROR_CHECK_ALLOC(dup);
330
324
  git_oid_cpy(dup, oid);
331
- return git_oidmap_set(idx->expected_oids, dup, dup);
325
+ git_oidmap_put(idx->expected_oids, dup, &ret);
332
326
  }
333
-
334
- return 0;
335
327
  }
336
328
 
337
329
  static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
338
330
  {
339
331
  git_object *object;
340
- git_oid *expected;
332
+ size_t keyidx;
341
333
  int error;
342
334
 
343
335
  if (obj->type != GIT_OBJECT_BLOB &&
@@ -349,9 +341,11 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
349
341
  if ((error = git_object__from_raw(&object, obj->data, obj->len, obj->type)) < 0)
350
342
  goto out;
351
343
 
352
- if ((expected = git_oidmap_get(idx->expected_oids, &object->cached.oid)) != NULL) {
353
- git_oidmap_delete(idx->expected_oids, &object->cached.oid);
354
- git__free(expected);
344
+ keyidx = git_oidmap_lookup_index(idx->expected_oids, &object->cached.oid);
345
+ if (git_oidmap_valid_index(idx->expected_oids, keyidx)) {
346
+ const git_oid *key = git_oidmap_key(idx->expected_oids, keyidx);
347
+ git__free((git_oid *) key);
348
+ git_oidmap_delete_at(idx->expected_oids, keyidx);
355
349
  }
356
350
 
357
351
  /*
@@ -369,8 +363,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
369
363
  size_t i;
370
364
 
371
365
  git_array_foreach(tree->entries, i, entry)
372
- if (add_expected_oid(idx, entry->oid) < 0)
373
- goto out;
366
+ add_expected_oid(idx, entry->oid);
374
367
 
375
368
  break;
376
369
  }
@@ -381,11 +374,9 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
381
374
  size_t i;
382
375
 
383
376
  git_array_foreach(commit->parent_ids, i, parent_oid)
384
- if (add_expected_oid(idx, parent_oid) < 0)
385
- goto out;
377
+ add_expected_oid(idx, parent_oid);
386
378
 
387
- if (add_expected_oid(idx, &commit->tree_id) < 0)
388
- goto out;
379
+ add_expected_oid(idx, &commit->tree_id);
389
380
 
390
381
  break;
391
382
  }
@@ -393,8 +384,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
393
384
  {
394
385
  git_tag *tag = (git_tag *) object;
395
386
 
396
- if (add_expected_oid(idx, &tag->target) < 0)
397
- goto out;
387
+ add_expected_oid(idx, &tag->target);
398
388
 
399
389
  break;
400
390
  }
@@ -412,11 +402,12 @@ out:
412
402
  static int store_object(git_indexer *idx)
413
403
  {
414
404
  int i, error;
405
+ size_t k;
415
406
  git_oid oid;
416
407
  struct entry *entry;
417
- off64_t entry_size;
408
+ git_off_t entry_size;
418
409
  struct git_pack_entry *pentry;
419
- off64_t entry_start = idx->entry_start;
410
+ git_off_t entry_start = idx->entry_start;
420
411
 
421
412
  entry = git__calloc(1, sizeof(*entry));
422
413
  GIT_ERROR_CHECK_ALLOC(entry);
@@ -447,18 +438,22 @@ static int store_object(git_indexer *idx)
447
438
  git_oid_cpy(&pentry->sha1, &oid);
448
439
  pentry->offset = entry_start;
449
440
 
450
- if (git_oidmap_exists(idx->pack->idx_cache, &pentry->sha1)) {
451
- git_error_set(GIT_ERROR_INDEXER, "duplicate object %s found in pack", git_oid_tostr_s(&pentry->sha1));
441
+ k = git_oidmap_put(idx->pack->idx_cache, &pentry->sha1, &error);
442
+ if (error == -1) {
452
443
  git__free(pentry);
444
+ git_error_set_oom();
453
445
  goto on_error;
454
446
  }
455
447
 
456
- if ((error = git_oidmap_set(idx->pack->idx_cache, &pentry->sha1, pentry)) < 0) {
448
+ if (error == 0) {
449
+ git_error_set(GIT_ERROR_INDEXER, "duplicate object %s found in pack", git_oid_tostr_s(&pentry->sha1));
457
450
  git__free(pentry);
458
- git_error_set_oom();
459
451
  goto on_error;
460
452
  }
461
453
 
454
+
455
+ git_oidmap_set_value_at(idx->pack->idx_cache, k, pentry);
456
+
462
457
  git_oid_cpy(&entry->oid, &oid);
463
458
 
464
459
  if (crc_object(&entry->crc, &idx->pack->mwf, entry_start, entry_size) < 0)
@@ -485,9 +480,10 @@ GIT_INLINE(bool) has_entry(git_indexer *idx, git_oid *id)
485
480
  return git_oidmap_exists(idx->pack->idx_cache, id);
486
481
  }
487
482
 
488
- static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_entry *pentry, off64_t entry_start)
483
+ static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_entry *pentry, git_off_t entry_start)
489
484
  {
490
- int i;
485
+ int i, error;
486
+ size_t k;
491
487
 
492
488
  if (entry_start > UINT31_MAX) {
493
489
  entry->offset = UINT32_MAX;
@@ -497,13 +493,15 @@ static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_ent
497
493
  }
498
494
 
499
495
  pentry->offset = entry_start;
496
+ k = git_oidmap_put(idx->pack->idx_cache, &pentry->sha1, &error);
500
497
 
501
- if (git_oidmap_exists(idx->pack->idx_cache, &pentry->sha1) ||
502
- git_oidmap_set(idx->pack->idx_cache, &pentry->sha1, pentry) < 0) {
498
+ if (error <= 0) {
503
499
  git_error_set(GIT_ERROR_INDEXER, "cannot insert object into pack");
504
500
  return -1;
505
501
  }
506
502
 
503
+ git_oidmap_set_value_at(idx->pack->idx_cache, k, pentry);
504
+
507
505
  /* Add the object to the list */
508
506
  if (git_vector_insert(&idx->objects, entry) < 0)
509
507
  return -1;
@@ -515,7 +513,7 @@ static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_ent
515
513
  return 0;
516
514
  }
517
515
 
518
- static int hash_and_save(git_indexer *idx, git_rawobj *obj, off64_t entry_start)
516
+ static int hash_and_save(git_indexer *idx, git_rawobj *obj, git_off_t entry_start)
519
517
  {
520
518
  git_oid oid;
521
519
  size_t entry_size;
@@ -550,7 +548,7 @@ on_error:
550
548
  return -1;
551
549
  }
552
550
 
553
- static int do_progress_callback(git_indexer *idx, git_indexer_progress *stats)
551
+ static int do_progress_callback(git_indexer *idx, git_transfer_progress *stats)
554
552
  {
555
553
  if (idx->progress_cb)
556
554
  return git_error_set_after_callback_function(
@@ -596,12 +594,12 @@ static void hash_partially(git_indexer *idx, const uint8_t *data, size_t size)
596
594
  idx->inbuf_len += size - to_expell;
597
595
  }
598
596
 
599
- static int write_at(git_indexer *idx, const void *data, off64_t offset, size_t size)
597
+ static int write_at(git_indexer *idx, const void *data, git_off_t offset, size_t size)
600
598
  {
601
599
  git_file fd = idx->pack->mwf.fd;
602
600
  size_t mmap_alignment;
603
601
  size_t page_offset;
604
- off64_t page_start;
602
+ git_off_t page_start;
605
603
  unsigned char *map_data;
606
604
  git_map map;
607
605
  int error;
@@ -627,11 +625,11 @@ static int write_at(git_indexer *idx, const void *data, off64_t offset, size_t s
627
625
 
628
626
  static int append_to_pack(git_indexer *idx, const void *data, size_t size)
629
627
  {
630
- off64_t new_size;
628
+ git_off_t new_size;
631
629
  size_t mmap_alignment;
632
630
  size_t page_offset;
633
- off64_t page_start;
634
- off64_t current_size = idx->pack->mwf.size;
631
+ git_off_t page_start;
632
+ git_off_t current_size = idx->pack->mwf.size;
635
633
  int fd = idx->pack->mwf.fd;
636
634
  int error;
637
635
 
@@ -658,10 +656,10 @@ static int append_to_pack(git_indexer *idx, const void *data, size_t size)
658
656
  return write_at(idx, data, idx->pack->mwf.size, size);
659
657
  }
660
658
 
661
- static int read_stream_object(git_indexer *idx, git_indexer_progress *stats)
659
+ static int read_stream_object(git_indexer *idx, git_transfer_progress *stats)
662
660
  {
663
661
  git_packfile_stream *stream = &idx->stream;
664
- off64_t entry_start = idx->off;
662
+ git_off_t entry_start = idx->off;
665
663
  size_t entry_size;
666
664
  git_object_t type;
667
665
  git_mwindow *w = NULL;
@@ -747,7 +745,7 @@ static int read_stream_object(git_indexer *idx, git_indexer_progress *stats)
747
745
  return 0;
748
746
  }
749
747
 
750
- int git_indexer_append(git_indexer *idx, const void *data, size_t size, git_indexer_progress *stats)
748
+ int git_indexer_append(git_indexer *idx, const void *data, size_t size, git_transfer_progress *stats)
751
749
  {
752
750
  int error = -1;
753
751
  struct git_pack_header *hdr = &idx->hdr;
@@ -783,8 +781,8 @@ int git_indexer_append(git_indexer *idx, const void *data, size_t size, git_inde
783
781
  return -1;
784
782
  }
785
783
 
786
- if (git_oidmap_new(&idx->pack->idx_cache) < 0)
787
- return -1;
784
+ idx->pack->idx_cache = git_oidmap_alloc();
785
+ GIT_ERROR_CHECK_ALLOC(idx->pack->idx_cache);
788
786
 
789
787
  idx->pack->has_cache = 1;
790
788
  if (git_vector_init(&idx->objects, total_objects, objects_cmp) < 0)
@@ -865,7 +863,7 @@ static int inject_object(git_indexer *idx, git_oid *id)
865
863
  git_oid foo = {{0}};
866
864
  unsigned char hdr[64];
867
865
  git_buf buf = GIT_BUF_INIT;
868
- off64_t entry_start;
866
+ git_off_t entry_start;
869
867
  const void *data;
870
868
  size_t len, hdr_len;
871
869
  int error;
@@ -931,7 +929,7 @@ cleanup:
931
929
  return error;
932
930
  }
933
931
 
934
- static int fix_thin_pack(git_indexer *idx, git_indexer_progress *stats)
932
+ static int fix_thin_pack(git_indexer *idx, git_transfer_progress *stats)
935
933
  {
936
934
  int error, found_ref_delta = 0;
937
935
  unsigned int i;
@@ -939,7 +937,7 @@ static int fix_thin_pack(git_indexer *idx, git_indexer_progress *stats)
939
937
  size_t size;
940
938
  git_object_t type;
941
939
  git_mwindow *w = NULL;
942
- off64_t curpos = 0;
940
+ git_off_t curpos = 0;
943
941
  unsigned char *base_info;
944
942
  unsigned int left = 0;
945
943
  git_oid base;
@@ -993,7 +991,7 @@ static int fix_thin_pack(git_indexer *idx, git_indexer_progress *stats)
993
991
  return 0;
994
992
  }
995
993
 
996
- static int resolve_deltas(git_indexer *idx, git_indexer_progress *stats)
994
+ static int resolve_deltas(git_indexer *idx, git_transfer_progress *stats)
997
995
  {
998
996
  unsigned int i;
999
997
  int error;
@@ -1050,11 +1048,11 @@ static int resolve_deltas(git_indexer *idx, git_indexer_progress *stats)
1050
1048
  return 0;
1051
1049
  }
1052
1050
 
1053
- static int update_header_and_rehash(git_indexer *idx, git_indexer_progress *stats)
1051
+ static int update_header_and_rehash(git_indexer *idx, git_transfer_progress *stats)
1054
1052
  {
1055
1053
  void *ptr;
1056
1054
  size_t chunk = 1024*1024;
1057
- off64_t hashed = 0;
1055
+ git_off_t hashed = 0;
1058
1056
  git_mwindow *w = NULL;
1059
1057
  git_mwindow_file *mwf;
1060
1058
  unsigned int left;
@@ -1091,7 +1089,7 @@ static int update_header_and_rehash(git_indexer *idx, git_indexer_progress *stat
1091
1089
  return 0;
1092
1090
  }
1093
1091
 
1094
- int git_indexer_commit(git_indexer *idx, git_indexer_progress *stats)
1092
+ int git_indexer_commit(git_indexer *idx, git_transfer_progress *stats)
1095
1093
  {
1096
1094
  git_mwindow *w = NULL;
1097
1095
  unsigned int i, long_offsets = 0, left;
@@ -1294,9 +1292,7 @@ on_error:
1294
1292
 
1295
1293
  void git_indexer_free(git_indexer *idx)
1296
1294
  {
1297
- const git_oid *key;
1298
- git_oid *value;
1299
- size_t iter;
1295
+ size_t pos;
1300
1296
 
1301
1297
  if (idx == NULL)
1302
1298
  return;
@@ -1325,9 +1321,14 @@ void git_indexer_free(git_indexer *idx)
1325
1321
  git_mutex_unlock(&git__mwindow_mutex);
1326
1322
  }
1327
1323
 
1328
- iter = 0;
1329
- while (git_oidmap_iterate((void **) &value, idx->expected_oids, &iter, &key) == 0)
1330
- git__free(value);
1324
+ for (pos = git_oidmap_begin(idx->expected_oids);
1325
+ pos != git_oidmap_end(idx->expected_oids); pos++)
1326
+ {
1327
+ if (git_oidmap_has_data(idx->expected_oids, pos)) {
1328
+ git__free((git_oid *) git_oidmap_key(idx->expected_oids, pos));
1329
+ git_oidmap_delete_at(idx->expected_oids, pos);
1330
+ }
1331
+ }
1331
1332
 
1332
1333
  git_hash_ctx_cleanup(&idx->trailer);
1333
1334
  git_hash_ctx_cleanup(&idx->hash_ctx);