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
@@ -371,17 +371,17 @@ static int merge_driver_name_for_path(
371
371
  return error;
372
372
 
373
373
  /* set: use the built-in 3-way merge driver ("text") */
374
- if (GIT_ATTR_IS_TRUE(value))
374
+ if (GIT_ATTR_TRUE(value))
375
375
  *out = merge_driver_name__text;
376
376
 
377
377
  /* unset: do not merge ("binary") */
378
- else if (GIT_ATTR_IS_FALSE(value))
378
+ else if (GIT_ATTR_FALSE(value))
379
379
  *out = merge_driver_name__binary;
380
380
 
381
- else if (GIT_ATTR_IS_UNSPECIFIED(value) && default_driver)
381
+ else if (GIT_ATTR_UNSPECIFIED(value) && default_driver)
382
382
  *out = default_driver;
383
383
 
384
- else if (GIT_ATTR_IS_UNSPECIFIED(value))
384
+ else if (GIT_ATTR_UNSPECIFIED(value))
385
385
  *out = merge_driver_name__text;
386
386
 
387
387
  else
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "repository.h"
11
11
  #include "posix.h"
12
- #include "futils.h"
12
+ #include "fileops.h"
13
13
  #include "index.h"
14
14
  #include "diff_xdiff.h"
15
15
  #include "merge.h"
@@ -8,7 +8,7 @@
8
8
  #include "mwindow.h"
9
9
 
10
10
  #include "vector.h"
11
- #include "futils.h"
11
+ #include "fileops.h"
12
12
  #include "map.h"
13
13
  #include "global.h"
14
14
  #include "strmap.h"
@@ -44,14 +44,15 @@ int git_mwindow_global_init(void)
44
44
  assert(!git__pack_cache);
45
45
 
46
46
  git__on_shutdown(git_mwindow_files_free);
47
- return git_strmap_new(&git__pack_cache);
47
+ return git_strmap_alloc(&git__pack_cache);
48
48
  }
49
49
 
50
50
  int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
51
51
  {
52
- struct git_pack_file *pack;
53
- char *packname;
54
52
  int error;
53
+ char *packname;
54
+ size_t pos;
55
+ struct git_pack_file *pack;
55
56
 
56
57
  if ((error = git_packfile__name(&packname, path)) < 0)
57
58
  return error;
@@ -61,11 +62,13 @@ int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
61
62
  return -1;
62
63
  }
63
64
 
64
- pack = git_strmap_get(git__pack_cache, packname);
65
+ pos = git_strmap_lookup_index(git__pack_cache, packname);
65
66
  git__free(packname);
66
67
 
67
- if (pack != NULL) {
68
+ if (git_strmap_valid_index(git__pack_cache, pos)) {
69
+ pack = git_strmap_value_at(git__pack_cache, pos);
68
70
  git_atomic_inc(&pack->refcount);
71
+
69
72
  git_mutex_unlock(&git__mwindow_mutex);
70
73
  *out = pack;
71
74
  return 0;
@@ -79,7 +82,7 @@ int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
79
82
 
80
83
  git_atomic_inc(&pack->refcount);
81
84
 
82
- error = git_strmap_set(git__pack_cache, pack->pack_name, pack);
85
+ git_strmap_insert(git__pack_cache, pack->pack_name, pack, &error);
83
86
  git_mutex_unlock(&git__mwindow_mutex);
84
87
 
85
88
  if (error < 0) {
@@ -94,6 +97,7 @@ int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
94
97
  void git_mwindow_put_pack(struct git_pack_file *pack)
95
98
  {
96
99
  int count;
100
+ size_t pos;
97
101
 
98
102
  if (git_mutex_lock(&git__mwindow_mutex) < 0)
99
103
  return;
@@ -101,12 +105,13 @@ void git_mwindow_put_pack(struct git_pack_file *pack)
101
105
  /* put before get would be a corrupted state */
102
106
  assert(git__pack_cache);
103
107
 
108
+ pos = git_strmap_lookup_index(git__pack_cache, pack->pack_name);
104
109
  /* if we cannot find it, the state is corrupted */
105
- assert(git_strmap_exists(git__pack_cache, pack->pack_name));
110
+ assert(git_strmap_valid_index(git__pack_cache, pos));
106
111
 
107
112
  count = git_atomic_dec(&pack->refcount);
108
113
  if (count == 0) {
109
- git_strmap_delete(git__pack_cache, pack->pack_name);
114
+ git_strmap_delete_at(git__pack_cache, pos);
110
115
  git_packfile_free(pack);
111
116
  }
112
117
 
@@ -167,11 +172,11 @@ void git_mwindow_free_all_locked(git_mwindow_file *mwf)
167
172
  /*
168
173
  * Check if a window 'win' contains the address 'offset'
169
174
  */
170
- int git_mwindow_contains(git_mwindow *win, off64_t offset)
175
+ int git_mwindow_contains(git_mwindow *win, git_off_t offset)
171
176
  {
172
- off64_t win_off = win->offset;
177
+ git_off_t win_off = win->offset;
173
178
  return win_off <= offset
174
- && offset <= (off64_t)(win_off + win->window_map.len);
179
+ && offset <= (git_off_t)(win_off + win->window_map.len);
175
180
  }
176
181
 
177
182
  /*
@@ -246,12 +251,12 @@ static int git_mwindow_close_lru(git_mwindow_file *mwf)
246
251
  static git_mwindow *new_window(
247
252
  git_mwindow_file *mwf,
248
253
  git_file fd,
249
- off64_t size,
250
- off64_t offset)
254
+ git_off_t size,
255
+ git_off_t offset)
251
256
  {
252
257
  git_mwindow_ctl *ctl = &mem_ctl;
253
258
  size_t walign = git_mwindow__window_size / 2;
254
- off64_t len;
259
+ git_off_t len;
255
260
  git_mwindow *w;
256
261
 
257
262
  w = git__malloc(sizeof(*w));
@@ -263,8 +268,8 @@ static git_mwindow *new_window(
263
268
  w->offset = (offset / walign) * walign;
264
269
 
265
270
  len = size - w->offset;
266
- if (len > (off64_t)git_mwindow__window_size)
267
- len = (off64_t)git_mwindow__window_size;
271
+ if (len > (git_off_t)git_mwindow__window_size)
272
+ len = (git_off_t)git_mwindow__window_size;
268
273
 
269
274
  ctl->mapped += (size_t)len;
270
275
 
@@ -311,7 +316,7 @@ static git_mwindow *new_window(
311
316
  unsigned char *git_mwindow_open(
312
317
  git_mwindow_file *mwf,
313
318
  git_mwindow **cursor,
314
- off64_t offset,
319
+ git_off_t offset,
315
320
  size_t extra,
316
321
  unsigned int *left)
317
322
  {
@@ -16,7 +16,7 @@
16
16
  typedef struct git_mwindow {
17
17
  struct git_mwindow *next;
18
18
  git_map window_map;
19
- off64_t offset;
19
+ git_off_t offset;
20
20
  size_t last_used;
21
21
  size_t inuse_cnt;
22
22
  } git_mwindow;
@@ -24,7 +24,7 @@ typedef struct git_mwindow {
24
24
  typedef struct git_mwindow_file {
25
25
  git_mwindow *windows;
26
26
  int fd;
27
- off64_t size;
27
+ git_off_t size;
28
28
  } git_mwindow_file;
29
29
 
30
30
  typedef struct git_mwindow_ctl {
@@ -37,10 +37,10 @@ typedef struct git_mwindow_ctl {
37
37
  git_vector windowfiles;
38
38
  } git_mwindow_ctl;
39
39
 
40
- int git_mwindow_contains(git_mwindow *win, off64_t offset);
40
+ int git_mwindow_contains(git_mwindow *win, git_off_t offset);
41
41
  void git_mwindow_free_all(git_mwindow_file *mwf); /* locks */
42
42
  void git_mwindow_free_all_locked(git_mwindow_file *mwf); /* run under lock */
43
- unsigned char *git_mwindow_open(git_mwindow_file *mwf, git_mwindow **cursor, off64_t offset, size_t extra, unsigned int *left);
43
+ unsigned char *git_mwindow_open(git_mwindow_file *mwf, git_mwindow **cursor, git_off_t offset, size_t extra, unsigned int *left);
44
44
  int git_mwindow_file_register(git_mwindow_file *mwf);
45
45
  void git_mwindow_file_deregister(git_mwindow_file *mwf);
46
46
  void git_mwindow_close(git_mwindow **w_cursor);
@@ -37,17 +37,14 @@ void gitno_buffer_setup_callback(
37
37
  static int recv_stream(gitno_buffer *buf)
38
38
  {
39
39
  git_stream *io = (git_stream *) buf->cb_data;
40
- size_t readlen = buf->len - buf->offset;
41
- ssize_t ret;
40
+ int ret;
42
41
 
43
- readlen = min(readlen, INT_MAX);
44
-
45
- ret = git_stream_read(io, buf->data + buf->offset, (int)readlen);
42
+ ret = git_stream_read(io, buf->data + buf->offset, buf->len - buf->offset);
46
43
  if (ret < 0)
47
44
  return -1;
48
45
 
49
46
  buf->offset += ret;
50
- return (int)ret;
47
+ return ret;
51
48
  }
52
49
 
53
50
  void gitno_buffer_setup_fromstream(git_stream *st, gitno_buffer *buf, char *data, size_t len)
@@ -122,79 +119,192 @@ int gitno__match_host(const char *pattern, const char *host)
122
119
  return -1;
123
120
  }
124
121
 
125
- int gitno_connection_data_handle_redirect(
126
- git_net_url *url,
127
- const char *redirect_str,
122
+ static const char *default_port_http = "80";
123
+ static const char *default_port_https = "443";
124
+
125
+ const char *gitno__default_port(
126
+ gitno_connection_data *data)
127
+ {
128
+ return data->use_ssl ? default_port_https : default_port_http;
129
+ }
130
+
131
+ static const char *prefix_http = "http://";
132
+ static const char *prefix_https = "https://";
133
+
134
+ int gitno_connection_data_from_url(
135
+ gitno_connection_data *data,
136
+ const char *url,
128
137
  const char *service_suffix)
129
138
  {
130
- git_net_url tmp = GIT_NET_URL_INIT;
131
- int error = 0;
139
+ int error = -1;
140
+ const char *default_port = NULL, *path_search_start = NULL;
141
+ char *original_host = NULL;
132
142
 
133
- assert(url && redirect_str);
143
+ /* service_suffix is optional */
144
+ assert(data && url);
134
145
 
135
- if (redirect_str[0] == '/') {
136
- git__free(url->path);
146
+ /* Save these for comparison later */
147
+ original_host = data->host;
148
+ data->host = NULL;
149
+ gitno_connection_data_free_ptrs(data);
137
150
 
138
- if ((url->path = git__strdup(redirect_str)) == NULL) {
139
- error = -1;
140
- goto done;
151
+ if (!git__prefixcmp(url, prefix_http)) {
152
+ path_search_start = url + strlen(prefix_http);
153
+ default_port = default_port_http;
154
+
155
+ if (data->use_ssl) {
156
+ git_error_set(GIT_ERROR_NET, "redirect from HTTPS to HTTP is not allowed");
157
+ goto cleanup;
141
158
  }
142
- } else {
143
- git_net_url *original = url;
159
+ } else if (!git__prefixcmp(url, prefix_https)) {
160
+ path_search_start = url + strlen(prefix_https);
161
+ default_port = default_port_https;
162
+ data->use_ssl = true;
163
+ } else if (url[0] == '/')
164
+ default_port = gitno__default_port(data);
165
+
166
+ if (!default_port) {
167
+ git_error_set(GIT_ERROR_NET, "unrecognized URL prefix");
168
+ goto cleanup;
169
+ }
144
170
 
145
- if ((error = git_net_url_parse(&tmp, redirect_str)) < 0)
146
- goto done;
171
+ error = gitno_extract_url_parts(
172
+ &data->host, &data->port, &data->path, &data->user, &data->pass,
173
+ url, default_port);
147
174
 
148
- /* Validate that this is a legal redirection */
175
+ if (url[0] == '/') {
176
+ /* Relative redirect; reuse original host name and port */
177
+ path_search_start = url;
178
+ git__free(data->host);
179
+ data->host = original_host;
180
+ original_host = NULL;
181
+ }
149
182
 
150
- if (original->scheme &&
151
- strcmp(original->scheme, tmp.scheme) != 0 &&
152
- strcmp(tmp.scheme, "https") != 0) {
153
- git_error_set(GIT_ERROR_NET, "cannot redirect from '%s' to '%s'",
154
- original->scheme, tmp.scheme);
183
+ if (!error) {
184
+ const char *path = strchr(path_search_start, '/');
185
+ size_t pathlen = strlen(path);
186
+ size_t suffixlen = service_suffix ? strlen(service_suffix) : 0;
187
+
188
+ if (suffixlen &&
189
+ !memcmp(path + pathlen - suffixlen, service_suffix, suffixlen)) {
190
+ git__free(data->path);
191
+ data->path = git__strndup(path, pathlen - suffixlen);
192
+ } else {
193
+ git__free(data->path);
194
+ data->path = git__strdup(path);
195
+ }
155
196
 
197
+ /* Check for errors in the resulting data */
198
+ if (original_host && url[0] != '/' && strcmp(original_host, data->host)) {
199
+ git_error_set(GIT_ERROR_NET, "cross host redirect not allowed");
156
200
  error = -1;
157
- goto done;
158
201
  }
202
+ }
203
+
204
+ cleanup:
205
+ if (original_host) git__free(original_host);
206
+ return error;
207
+ }
159
208
 
160
- if (original->host &&
161
- git__strcasecmp(original->host, tmp.host) != 0) {
162
- git_error_set(GIT_ERROR_NET, "cannot redirect from '%s' to '%s'",
163
- original->host, tmp.host);
209
+ void gitno_connection_data_free_ptrs(gitno_connection_data *d)
210
+ {
211
+ git__free(d->host); d->host = NULL;
212
+ git__free(d->port); d->port = NULL;
213
+ git__free(d->path); d->path = NULL;
214
+ git__free(d->user); d->user = NULL;
215
+ git__free(d->pass); d->pass = NULL;
216
+ }
164
217
 
165
- error = -1;
166
- goto done;
167
- }
218
+ int gitno_extract_url_parts(
219
+ char **host_out,
220
+ char **port_out,
221
+ char **path_out,
222
+ char **username_out,
223
+ char **password_out,
224
+ const char *url,
225
+ const char *default_port)
226
+ {
227
+ struct http_parser_url u = {0};
228
+ bool has_host, has_port, has_path, has_userinfo;
229
+ git_buf host = GIT_BUF_INIT,
230
+ port = GIT_BUF_INIT,
231
+ path = GIT_BUF_INIT,
232
+ username = GIT_BUF_INIT,
233
+ password = GIT_BUF_INIT;
234
+ int error = 0;
168
235
 
169
- git_net_url_swap(url, &tmp);
236
+ if (http_parser_parse_url(url, strlen(url), false, &u)) {
237
+ git_error_set(GIT_ERROR_NET, "malformed URL '%s'", url);
238
+ error = GIT_EINVALIDSPEC;
239
+ goto done;
170
240
  }
171
241
 
172
- /* Remove the service suffix if it was given to us */
173
- if (service_suffix) {
174
- const char *service_query = strchr(service_suffix, '?');
175
- size_t suffix_len = service_query ?
176
- (size_t)(service_query - service_suffix) : strlen(service_suffix);
177
- size_t path_len = strlen(url->path);
242
+ has_host = !!(u.field_set & (1 << UF_HOST));
243
+ has_port = !!(u.field_set & (1 << UF_PORT));
244
+ has_path = !!(u.field_set & (1 << UF_PATH));
245
+ has_userinfo = !!(u.field_set & (1 << UF_USERINFO));
178
246
 
179
- if (suffix_len && path_len >= suffix_len) {
180
- size_t suffix_offset = path_len - suffix_len;
247
+ if (has_host) {
248
+ const char *url_host = url + u.field_data[UF_HOST].off;
249
+ size_t url_host_len = u.field_data[UF_HOST].len;
250
+ git_buf_decode_percent(&host, url_host, url_host_len);
251
+ }
181
252
 
182
- if (git__strncmp(url->path + suffix_offset, service_suffix, suffix_len) == 0 &&
183
- (!service_query || git__strcmp(url->query, service_query + 1) == 0)) {
184
- /* Ensure we leave a minimum of '/' as the path */
185
- if (suffix_offset == 0)
186
- suffix_offset++;
253
+ if (has_port) {
254
+ const char *url_port = url + u.field_data[UF_PORT].off;
255
+ size_t url_port_len = u.field_data[UF_PORT].len;
256
+ git_buf_put(&port, url_port, url_port_len);
257
+ } else {
258
+ git_buf_puts(&port, default_port);
259
+ }
187
260
 
188
- url->path[suffix_offset] = '\0';
261
+ if (has_path && path_out) {
262
+ const char *url_path = url + u.field_data[UF_PATH].off;
263
+ size_t url_path_len = u.field_data[UF_PATH].len;
264
+ git_buf_decode_percent(&path, url_path, url_path_len);
265
+ } else if (path_out) {
266
+ git_error_set(GIT_ERROR_NET, "invalid url, missing path");
267
+ error = GIT_EINVALIDSPEC;
268
+ goto done;
269
+ }
189
270
 
190
- git__free(url->query);
191
- url->query = NULL;
192
- }
271
+ if (has_userinfo) {
272
+ const char *url_userinfo = url + u.field_data[UF_USERINFO].off;
273
+ size_t url_userinfo_len = u.field_data[UF_USERINFO].len;
274
+ const char *colon = memchr(url_userinfo, ':', url_userinfo_len);
275
+
276
+ if (colon) {
277
+ const char *url_username = url_userinfo;
278
+ size_t url_username_len = colon - url_userinfo;
279
+ const char *url_password = colon + 1;
280
+ size_t url_password_len = url_userinfo_len - (url_username_len + 1);
281
+
282
+ git_buf_decode_percent(&username, url_username, url_username_len);
283
+ git_buf_decode_percent(&password, url_password, url_password_len);
284
+ } else {
285
+ git_buf_decode_percent(&username, url_userinfo, url_userinfo_len);
193
286
  }
194
287
  }
195
288
 
289
+ if (git_buf_oom(&host) ||
290
+ git_buf_oom(&port) ||
291
+ git_buf_oom(&path) ||
292
+ git_buf_oom(&username) ||
293
+ git_buf_oom(&password))
294
+ return -1;
295
+
296
+ *host_out = git_buf_detach(&host);
297
+ *port_out = git_buf_detach(&port);
298
+ if (path_out)
299
+ *path_out = git_buf_detach(&path);
300
+ *username_out = git_buf_detach(&username);
301
+ *password_out = git_buf_detach(&password);
302
+
196
303
  done:
197
- git_net_url_dispose(&tmp);
304
+ git_buf_dispose(&host);
305
+ git_buf_dispose(&port);
306
+ git_buf_dispose(&path);
307
+ git_buf_dispose(&username);
308
+ git_buf_dispose(&password);
198
309
  return error;
199
310
  }
200
-
@@ -11,7 +11,6 @@
11
11
 
12
12
  #include "posix.h"
13
13
  #include "stream.h"
14
- #include "net.h"
15
14
 
16
15
  #ifdef GIT_OPENSSL
17
16
  # include <openssl/ssl.h>
@@ -65,15 +64,38 @@ int gitno_recv(gitno_buffer *buf);
65
64
  void gitno_consume(gitno_buffer *buf, const char *ptr);
66
65
  void gitno_consume_n(gitno_buffer *buf, size_t cons);
67
66
 
67
+ typedef struct gitno_connection_data {
68
+ char *host;
69
+ char *port;
70
+ char *path;
71
+ char *user;
72
+ char *pass;
73
+ bool use_ssl;
74
+ } gitno_connection_data;
75
+
68
76
  /*
69
77
  * This replaces all the pointers in `data` with freshly-allocated strings,
70
78
  * that the caller is responsible for freeing.
71
79
  * `gitno_connection_data_free_ptrs` is good for this.
72
80
  */
73
81
 
74
- int gitno_connection_data_handle_redirect(
75
- git_net_url *data,
82
+ int gitno_connection_data_from_url(
83
+ gitno_connection_data *data,
76
84
  const char *url,
77
85
  const char *service_suffix);
78
86
 
87
+ /* This frees all the pointers IN the struct, but not the struct itself. */
88
+ void gitno_connection_data_free_ptrs(gitno_connection_data *data);
89
+
90
+ int gitno_extract_url_parts(
91
+ char **host,
92
+ char **port,
93
+ char **path,
94
+ char **username,
95
+ char **password,
96
+ const char *url,
97
+ const char *default_port);
98
+
99
+ const char *gitno__default_port(gitno_connection_data *data);
100
+
79
101
  #endif