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
@@ -14,7 +14,7 @@
14
14
  #include "vector.h"
15
15
  #include "pool.h"
16
16
  #include "buffer.h"
17
- #include "futils.h"
17
+ #include "fileops.h"
18
18
 
19
19
  #define GIT_ATTR_FILE ".gitattributes"
20
20
  #define GIT_ATTR_FILE_INREPO "attributes"
@@ -32,17 +32,19 @@
32
32
  #define GIT_ATTR_FNMATCH_MATCH_ALL (1U << 8)
33
33
  #define GIT_ATTR_FNMATCH_ALLOWNEG (1U << 9)
34
34
  #define GIT_ATTR_FNMATCH_ALLOWMACRO (1U << 10)
35
+ #define GIT_ATTR_FNMATCH_LEADINGDIR (1U << 11)
36
+ #define GIT_ATTR_FNMATCH_NOLEADINGDIR (1U << 12)
35
37
 
36
38
  #define GIT_ATTR_FNMATCH__INCOMING \
37
- (GIT_ATTR_FNMATCH_ALLOWSPACE | GIT_ATTR_FNMATCH_ALLOWNEG | GIT_ATTR_FNMATCH_ALLOWMACRO)
39
+ (GIT_ATTR_FNMATCH_ALLOWSPACE | GIT_ATTR_FNMATCH_ALLOWNEG | \
40
+ GIT_ATTR_FNMATCH_ALLOWMACRO | GIT_ATTR_FNMATCH_NOLEADINGDIR)
38
41
 
39
42
  typedef enum {
40
43
  GIT_ATTR_FILE__IN_MEMORY = 0,
41
44
  GIT_ATTR_FILE__FROM_FILE = 1,
42
45
  GIT_ATTR_FILE__FROM_INDEX = 2,
43
- GIT_ATTR_FILE__FROM_HEAD = 3,
44
46
 
45
- GIT_ATTR_FILE_NUM_SOURCES = 4
47
+ GIT_ATTR_FILE_NUM_SOURCES = 3
46
48
  } git_attr_file_source;
47
49
 
48
50
  extern const char *git_attr__true;
@@ -132,8 +134,7 @@ extern int git_attr_get_many_with_session(
132
134
  typedef int (*git_attr_file_parser)(
133
135
  git_repository *repo,
134
136
  git_attr_file *file,
135
- const char *data,
136
- bool allow_macros);
137
+ const char *data);
137
138
 
138
139
  /*
139
140
  * git_attr_file API
@@ -152,8 +153,7 @@ int git_attr_file__load(
152
153
  git_attr_session *attr_session,
153
154
  git_attr_file_entry *ce,
154
155
  git_attr_file_source source,
155
- git_attr_file_parser parser,
156
- bool allow_macros);
156
+ git_attr_file_parser parser);
157
157
 
158
158
  int git_attr_file__load_standalone(
159
159
  git_attr_file **out, const char *path);
@@ -162,7 +162,7 @@ int git_attr_file__out_of_date(
162
162
  git_repository *repo, git_attr_session *session, git_attr_file *file);
163
163
 
164
164
  int git_attr_file__parse_buffer(
165
- git_repository *repo, git_attr_file *attrs, const char *data, bool allow_macros);
165
+ git_repository *repo, git_attr_file *attrs, const char *data);
166
166
 
167
167
  int git_attr_file__clear_rules(
168
168
  git_attr_file *file, bool need_lock);
@@ -33,7 +33,12 @@ GIT_INLINE(void) attr_cache_unlock(git_attr_cache *cache)
33
33
  GIT_INLINE(git_attr_file_entry *) attr_cache_lookup_entry(
34
34
  git_attr_cache *cache, const char *path)
35
35
  {
36
- return git_strmap_get(cache->files, path);
36
+ size_t pos = git_strmap_lookup_index(cache->files, path);
37
+
38
+ if (git_strmap_valid_index(cache->files, pos))
39
+ return git_strmap_value_at(cache->files, pos);
40
+ else
41
+ return NULL;
37
42
  }
38
43
 
39
44
  int git_attr_cache__alloc_file_entry(
@@ -54,7 +59,7 @@ int git_attr_cache__alloc_file_entry(
54
59
  cachesize++;
55
60
  }
56
61
 
57
- ce = git_pool_mallocz(pool, cachesize);
62
+ ce = git_pool_mallocz(pool, (uint32_t)cachesize);
58
63
  GIT_ERROR_CHECK_ALLOC(ce);
59
64
 
60
65
  if (baselen) {
@@ -75,16 +80,18 @@ int git_attr_cache__alloc_file_entry(
75
80
  static int attr_cache_make_entry(
76
81
  git_attr_file_entry **out, git_repository *repo, const char *path)
77
82
  {
83
+ int error = 0;
78
84
  git_attr_cache *cache = git_repository_attr_cache(repo);
79
85
  git_attr_file_entry *entry = NULL;
80
- int error;
81
86
 
82
- if ((error = git_attr_cache__alloc_file_entry(&entry, git_repository_workdir(repo),
83
- path, &cache->pool)) < 0)
84
- return error;
87
+ error = git_attr_cache__alloc_file_entry(
88
+ &entry, git_repository_workdir(repo), path, &cache->pool);
85
89
 
86
- if ((error = git_strmap_set(cache->files, entry->path, entry)) < 0)
87
- return error;
90
+ if (!error) {
91
+ git_strmap_insert(cache->files, entry->path, entry, &error);
92
+ if (error > 0)
93
+ error = 0;
94
+ }
88
95
 
89
96
  *out = entry;
90
97
  return error;
@@ -208,8 +215,7 @@ int git_attr_cache__get(
208
215
  git_attr_file_source source,
209
216
  const char *base,
210
217
  const char *filename,
211
- git_attr_file_parser parser,
212
- bool allow_macros)
218
+ git_attr_file_parser parser)
213
219
  {
214
220
  int error = 0;
215
221
  git_attr_cache *cache = git_repository_attr_cache(repo);
@@ -222,7 +228,7 @@ int git_attr_cache__get(
222
228
 
223
229
  /* load file if we don't have one or if existing one is out of date */
224
230
  if (!file || (error = git_attr_file__out_of_date(repo, attr_session, file)) > 0)
225
- error = git_attr_file__load(&updated, repo, attr_session, entry, source, parser, allow_macros);
231
+ error = git_attr_file__load(&updated, repo, attr_session, entry, source, parser);
226
232
 
227
233
  /* if we loaded the file, insert into and/or update cache */
228
234
  if (updated) {
@@ -259,15 +265,19 @@ bool git_attr_cache__is_cached(
259
265
  const char *filename)
260
266
  {
261
267
  git_attr_cache *cache = git_repository_attr_cache(repo);
262
- git_attr_file_entry *entry;
263
268
  git_strmap *files;
269
+ size_t pos;
270
+ git_attr_file_entry *entry;
264
271
 
265
272
  if (!cache || !(files = cache->files))
266
273
  return false;
267
274
 
268
- if ((entry = git_strmap_get(files, filename)) == NULL)
275
+ pos = git_strmap_lookup_index(files, filename);
276
+ if (!git_strmap_valid_index(files, pos))
269
277
  return false;
270
278
 
279
+ entry = git_strmap_value_at(files, pos);
280
+
271
281
  return entry && (entry->file[source] != NULL);
272
282
  }
273
283
 
@@ -390,8 +400,8 @@ int git_attr_cache__init(git_repository *repo)
390
400
  /* allocate hashtable for attribute and ignore file contents,
391
401
  * hashtable for attribute macros, and string pool
392
402
  */
393
- if ((ret = git_strmap_new(&cache->files)) < 0 ||
394
- (ret = git_strmap_new(&cache->macros)) < 0)
403
+ if ((ret = git_strmap_alloc(&cache->files)) < 0 ||
404
+ (ret = git_strmap_alloc(&cache->macros)) < 0)
395
405
  goto cancel;
396
406
 
397
407
  git_pool_init(&cache->pool, 1);
@@ -425,43 +435,35 @@ void git_attr_cache_flush(git_repository *repo)
425
435
  int git_attr_cache__insert_macro(git_repository *repo, git_attr_rule *macro)
426
436
  {
427
437
  git_attr_cache *cache = git_repository_attr_cache(repo);
428
- git_attr_rule *preexisting;
429
- bool locked = false;
430
- int error = 0;
431
-
432
- /*
433
- * Callers assume that if we return success, that the
434
- * macro will have been adopted by the attributes cache.
435
- * Thus, we have to free the macro here if it's not being
436
- * added to the cache.
437
- *
438
- * TODO: generate warning log if (macro->assigns.length == 0)
439
- */
440
- if (macro->assigns.length == 0) {
441
- git_attr_rule__free(macro);
442
- goto out;
443
- }
444
-
445
- if ((error = attr_cache_lock(cache)) < 0)
446
- goto out;
447
- locked = true;
438
+ git_strmap *macros = cache->macros;
439
+ int error;
448
440
 
449
- if ((preexisting = git_strmap_get(cache->macros, macro->match.pattern)) != NULL)
450
- git_attr_rule__free(preexisting);
441
+ /* TODO: generate warning log if (macro->assigns.length == 0) */
442
+ if (macro->assigns.length == 0)
443
+ return 0;
451
444
 
452
- if ((error = git_strmap_set(cache->macros, macro->match.pattern, macro)) < 0)
453
- goto out;
445
+ if (attr_cache_lock(cache) < 0) {
446
+ git_error_set(GIT_ERROR_OS, "unable to get attr cache lock");
447
+ error = -1;
448
+ } else {
449
+ git_strmap_insert(macros, macro->match.pattern, macro, &error);
450
+ git_mutex_unlock(&cache->lock);
451
+ }
454
452
 
455
- out:
456
- if (locked)
457
- attr_cache_unlock(cache);
458
- return error;
453
+ return (error < 0) ? -1 : 0;
459
454
  }
460
455
 
461
456
  git_attr_rule *git_attr_cache__lookup_macro(
462
457
  git_repository *repo, const char *name)
463
458
  {
464
459
  git_strmap *macros = git_repository_attr_cache(repo)->macros;
460
+ size_t pos;
465
461
 
466
- return git_strmap_get(macros, name);
462
+ pos = git_strmap_lookup_index(macros, name);
463
+
464
+ if (!git_strmap_valid_index(macros, pos))
465
+ return NULL;
466
+
467
+ return (git_attr_rule *)git_strmap_value_at(macros, pos);
467
468
  }
469
+
@@ -34,8 +34,7 @@ extern int git_attr_cache__get(
34
34
  git_attr_file_source source,
35
35
  const char *base,
36
36
  const char *filename,
37
- git_attr_file_parser parser,
38
- bool allow_macros);
37
+ git_attr_file_parser parser);
39
38
 
40
39
  extern bool git_attr_cache__is_cached(
41
40
  git_repository *repo,
@@ -204,7 +204,7 @@ static int normalize_options(
204
204
  memcpy(out, in, sizeof(git_blame_options));
205
205
 
206
206
  /* No newest_commit => HEAD */
207
- if (git_oid_is_zero(&out->newest_commit)) {
207
+ if (git_oid_iszero(&out->newest_commit)) {
208
208
  if (git_reference_name_to_id(&out->newest_commit, repo, "HEAD") < 0) {
209
209
  return -1;
210
210
  }
@@ -268,7 +268,7 @@ static git_blame_hunk *split_hunk_in_vector(
268
268
  static int index_blob_lines(git_blame *blame)
269
269
  {
270
270
  const char *buf = blame->final_buf;
271
- size_t len = blame->final_buf_size;
271
+ git_off_t len = blame->final_buf_size;
272
272
  int num = 0, incomplete = 0, bol = 1;
273
273
  size_t *i;
274
274
 
@@ -335,15 +335,8 @@ static int blame_internal(git_blame *blame)
335
335
  if ((error = load_blob(blame)) < 0 ||
336
336
  (error = git_blame__get_origin(&o, blame, blame->final, blame->path)) < 0)
337
337
  goto cleanup;
338
-
339
- if (git_blob_rawsize(blame->final_blob) > SIZE_MAX) {
340
- git_error_set(GIT_ERROR_NOMEMORY, "blob is too large to blame");
341
- error = -1;
342
- goto cleanup;
343
- }
344
-
345
338
  blame->final_buf = git_blob_rawcontent(blame->final_blob);
346
- blame->final_buf_size = (size_t)git_blob_rawsize(blame->final_blob);
339
+ blame->final_buf_size = git_blob_rawsize(blame->final_blob);
347
340
 
348
341
  ent = git__calloc(1, sizeof(git_blame__entry));
349
342
  GIT_ERROR_CHECK_ALLOC(ent);
@@ -415,7 +408,7 @@ on_error:
415
408
 
416
409
  static bool hunk_is_bufferblame(git_blame_hunk *hunk)
417
410
  {
418
- return git_oid_is_zero(&hunk->final_commit_id);
411
+ return git_oid_iszero(&hunk->final_commit_id);
419
412
  }
420
413
 
421
414
  static int buffer_hunk_cb(
@@ -531,14 +524,9 @@ int git_blame_buffer(
531
524
  return 0;
532
525
  }
533
526
 
534
- int git_blame_options_init(git_blame_options *opts, unsigned int version)
527
+ int git_blame_init_options(git_blame_options *opts, unsigned int version)
535
528
  {
536
529
  GIT_INIT_STRUCTURE_FROM_TEMPLATE(
537
530
  opts, version, git_blame_options, GIT_BLAME_OPTIONS_INIT);
538
531
  return 0;
539
532
  }
540
-
541
- int git_blame_init_options(git_blame_options *opts, unsigned int version)
542
- {
543
- return git_blame_options_init(opts, version);
544
- }
@@ -84,7 +84,7 @@ struct git_blame {
84
84
  git_blame__entry *ent;
85
85
  int num_lines;
86
86
  const char *final_buf;
87
- size_t final_buf_size;
87
+ git_off_t final_buf_size;
88
88
  };
89
89
 
90
90
  git_blame *git_blame__alloc(
@@ -219,7 +219,7 @@ static void dup_entry(git_blame__entry *dst, git_blame__entry *src)
219
219
  * split_overlap() divided an existing blame e into up to three parts in split.
220
220
  * Adjust the linked list of blames in the scoreboard to reflect the split.
221
221
  */
222
- static int split_blame(git_blame *blame, git_blame__entry *split, git_blame__entry *e)
222
+ static void split_blame(git_blame *blame, git_blame__entry *split, git_blame__entry *e)
223
223
  {
224
224
  git_blame__entry *new_entry;
225
225
 
@@ -229,13 +229,11 @@ static int split_blame(git_blame *blame, git_blame__entry *split, git_blame__ent
229
229
 
230
230
  /* The last part -- me */
231
231
  new_entry = git__malloc(sizeof(*new_entry));
232
- GIT_ERROR_CHECK_ALLOC(new_entry);
233
232
  memcpy(new_entry, &(split[2]), sizeof(git_blame__entry));
234
233
  add_blame_entry(blame, new_entry);
235
234
 
236
235
  /* ... and the middle part -- parent */
237
236
  new_entry = git__malloc(sizeof(*new_entry));
238
- GIT_ERROR_CHECK_ALLOC(new_entry);
239
237
  memcpy(new_entry, &(split[1]), sizeof(git_blame__entry));
240
238
  add_blame_entry(blame, new_entry);
241
239
  } else if (!split[0].suspect && !split[2].suspect) {
@@ -248,19 +246,15 @@ static int split_blame(git_blame *blame, git_blame__entry *split, git_blame__ent
248
246
  /* me and then parent */
249
247
  dup_entry(e, &split[0]);
250
248
  new_entry = git__malloc(sizeof(*new_entry));
251
- GIT_ERROR_CHECK_ALLOC(new_entry);
252
249
  memcpy(new_entry, &(split[1]), sizeof(git_blame__entry));
253
250
  add_blame_entry(blame, new_entry);
254
251
  } else {
255
252
  /* parent and then me */
256
253
  dup_entry(e, &split[1]);
257
254
  new_entry = git__malloc(sizeof(*new_entry));
258
- GIT_ERROR_CHECK_ALLOC(new_entry);
259
255
  memcpy(new_entry, &(split[2]), sizeof(git_blame__entry));
260
256
  add_blame_entry(blame, new_entry);
261
257
  }
262
-
263
- return 0;
264
258
  }
265
259
 
266
260
  /*
@@ -278,7 +272,7 @@ static void decref_split(git_blame__entry *split)
278
272
  * Helper for blame_chunk(). blame_entry e is known to overlap with the patch
279
273
  * hunk; split it and pass blame to the parent.
280
274
  */
281
- static int blame_overlap(
275
+ static void blame_overlap(
282
276
  git_blame *blame,
283
277
  git_blame__entry *e,
284
278
  size_t tlno,
@@ -290,11 +284,8 @@ static int blame_overlap(
290
284
 
291
285
  split_overlap(split, e, tlno, plno, same, parent);
292
286
  if (split[1].suspect)
293
- if (split_blame(blame, split, e) < 0)
294
- return -1;
287
+ split_blame(blame, split, e);
295
288
  decref_split(split);
296
-
297
- return 0;
298
289
  }
299
290
 
300
291
  /*
@@ -302,7 +293,7 @@ static int blame_overlap(
302
293
  * e and its parent. Find and split the overlap, and pass blame to the
303
294
  * overlapping part to the parent.
304
295
  */
305
- static int blame_chunk(
296
+ static void blame_chunk(
306
297
  git_blame *blame,
307
298
  size_t tlno,
308
299
  size_t plno,
@@ -318,12 +309,9 @@ static int blame_chunk(
318
309
  if (same <= e->s_lno)
319
310
  continue;
320
311
  if (tlno < e->s_lno + e->num_lines) {
321
- if (blame_overlap(blame, e, tlno, plno, same, parent) < 0)
322
- return -1;
312
+ blame_overlap(blame, e, tlno, plno, same, parent);
323
313
  }
324
314
  }
325
-
326
- return 0;
327
315
  }
328
316
 
329
317
  static int my_emit(
@@ -333,8 +321,7 @@ static int my_emit(
333
321
  {
334
322
  blame_chunk_cb_data *d = (blame_chunk_cb_data *)cb_data;
335
323
 
336
- if (blame_chunk(d->blame, d->tlno, d->plno, start_b, d->target, d->parent) < 0)
337
- return -1;
324
+ blame_chunk(d->blame, d->tlno, d->plno, start_b, d->target, d->parent);
338
325
  d->plno = start_a + count_a;
339
326
  d->tlno = start_b + count_b;
340
327
 
@@ -413,8 +400,7 @@ static int pass_blame_to_parent(
413
400
  return -1;
414
401
 
415
402
  /* The reset (i.e. anything after tlno) are the same as the parent */
416
- if (blame_chunk(blame, d.tlno, d.plno, last_in_target, target, parent) < 0)
417
- return -1;
403
+ blame_chunk(blame, d.tlno, d.plno, last_in_target, target, parent);
418
404
 
419
405
  return 0;
420
406
  }
@@ -25,18 +25,18 @@ const void *git_blob_rawcontent(const git_blob *blob)
25
25
  return git_odb_object_data(blob->data.odb);
26
26
  }
27
27
 
28
- git_object_size_t git_blob_rawsize(const git_blob *blob)
28
+ git_off_t git_blob_rawsize(const git_blob *blob)
29
29
  {
30
30
  assert(blob);
31
31
  if (blob->raw)
32
32
  return blob->data.raw.size;
33
33
  else
34
- return (git_object_size_t)git_odb_object_size(blob->data.odb);
34
+ return (git_off_t)git_odb_object_size(blob->data.odb);
35
35
  }
36
36
 
37
37
  int git_blob__getbuf(git_buf *buffer, git_blob *blob)
38
38
  {
39
- git_object_size_t size = git_blob_rawsize(blob);
39
+ git_off_t size = git_blob_rawsize(blob);
40
40
 
41
41
  GIT_ERROR_CHECK_BLOBSIZE(size);
42
42
  return git_buf_set(buffer, git_blob_rawcontent(blob), (size_t)size);
@@ -70,7 +70,7 @@ int git_blob__parse(void *_blob, git_odb_object *odb_obj)
70
70
  return 0;
71
71
  }
72
72
 
73
- int git_blob_create_from_buffer(
73
+ int git_blob_create_frombuffer(
74
74
  git_oid *id, git_repository *repo, const void *buffer, size_t len)
75
75
  {
76
76
  int error;
@@ -91,13 +91,13 @@ int git_blob_create_from_buffer(
91
91
  }
92
92
 
93
93
  static int write_file_stream(
94
- git_oid *id, git_odb *odb, const char *path, git_object_size_t file_size)
94
+ git_oid *id, git_odb *odb, const char *path, git_off_t file_size)
95
95
  {
96
96
  int fd, error;
97
97
  char buffer[FILEIO_BUFSIZE];
98
98
  git_odb_stream *stream = NULL;
99
99
  ssize_t read_len = -1;
100
- git_object_size_t written = 0;
100
+ git_off_t written = 0;
101
101
 
102
102
  if ((error = git_odb_open_wstream(
103
103
  &stream, odb, file_size, GIT_OBJECT_BLOB)) < 0)
@@ -129,7 +129,7 @@ static int write_file_stream(
129
129
 
130
130
  static int write_file_filtered(
131
131
  git_oid *id,
132
- git_object_size_t *size,
132
+ git_off_t *size,
133
133
  git_odb *odb,
134
134
  const char *full_path,
135
135
  git_filter_list *fl)
@@ -184,7 +184,7 @@ int git_blob__create_from_paths(
184
184
  int error;
185
185
  struct stat st;
186
186
  git_odb *odb = NULL;
187
- git_object_size_t size;
187
+ git_off_t size;
188
188
  mode_t mode;
189
189
  git_buf path = GIT_BUF_INIT;
190
190
 
@@ -263,13 +263,13 @@ done:
263
263
  return error;
264
264
  }
265
265
 
266
- int git_blob_create_from_workdir(
266
+ int git_blob_create_fromworkdir(
267
267
  git_oid *id, git_repository *repo, const char *path)
268
268
  {
269
269
  return git_blob__create_from_paths(id, NULL, repo, NULL, path, 0, true);
270
270
  }
271
271
 
272
- int git_blob_create_from_disk(
272
+ int git_blob_create_fromdisk(
273
273
  git_oid *id, git_repository *repo, const char *path)
274
274
  {
275
275
  int error;
@@ -325,7 +325,7 @@ static int blob_writestream_write(git_writestream *_stream, const char *buffer,
325
325
  return git_filebuf_write(&stream->fbuf, buffer, len);
326
326
  }
327
327
 
328
- int git_blob_create_from_stream(git_writestream **out, git_repository *repo, const char *hintpath)
328
+ int git_blob_create_fromstream(git_writestream **out, git_repository *repo, const char *hintpath)
329
329
  {
330
330
  int error;
331
331
  git_buf path = GIT_BUF_INIT;
@@ -364,7 +364,7 @@ cleanup:
364
364
  return error;
365
365
  }
366
366
 
367
- int git_blob_create_from_stream_commit(git_oid *out, git_writestream *_stream)
367
+ int git_blob_create_fromstream_commit(git_oid *out, git_writestream *_stream)
368
368
  {
369
369
  int error;
370
370
  blob_writestream *stream = (blob_writestream *) _stream;
@@ -389,7 +389,7 @@ cleanup:
389
389
  int git_blob_is_binary(const git_blob *blob)
390
390
  {
391
391
  git_buf content = GIT_BUF_INIT;
392
- git_object_size_t size;
392
+ git_off_t size;
393
393
 
394
394
  assert(blob);
395
395
 
@@ -400,40 +400,25 @@ int git_blob_is_binary(const git_blob *blob)
400
400
  return git_buf_text_is_binary(&content);
401
401
  }
402
402
 
403
- int git_blob_filter(
403
+ int git_blob_filtered_content(
404
404
  git_buf *out,
405
405
  git_blob *blob,
406
406
  const char *path,
407
- git_blob_filter_options *given_opts)
407
+ int check_for_binary_data)
408
408
  {
409
409
  int error = 0;
410
410
  git_filter_list *fl = NULL;
411
- git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT;
412
- git_filter_flag_t flags = GIT_FILTER_DEFAULT;
413
411
 
414
412
  assert(blob && path && out);
415
413
 
416
414
  git_buf_sanitize(out);
417
415
 
418
- GIT_ERROR_CHECK_VERSION(
419
- given_opts, GIT_BLOB_FILTER_OPTIONS_VERSION, "git_blob_filter_options");
420
-
421
- if (given_opts != NULL)
422
- memcpy(&opts, given_opts, sizeof(git_blob_filter_options));
423
-
424
- if ((opts.flags & GIT_BLOB_FILTER_CHECK_FOR_BINARY) != 0 &&
425
- git_blob_is_binary(blob))
416
+ if (check_for_binary_data && git_blob_is_binary(blob))
426
417
  return 0;
427
418
 
428
- if ((opts.flags & GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES) != 0)
429
- flags |= GIT_FILTER_NO_SYSTEM_ATTRIBUTES;
430
-
431
- if ((opts.flags & GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD) != 0)
432
- flags |= GIT_FILTER_ATTRIBUTES_FROM_HEAD;
433
-
434
419
  if (!(error = git_filter_list_load(
435
420
  &fl, git_blob_owner(blob), blob, path,
436
- GIT_FILTER_TO_WORKTREE, flags))) {
421
+ GIT_FILTER_TO_WORKTREE, GIT_FILTER_DEFAULT))) {
437
422
 
438
423
  error = git_filter_list_apply_to_blob(out, fl, blob);
439
424
 
@@ -442,52 +427,3 @@ int git_blob_filter(
442
427
 
443
428
  return error;
444
429
  }
445
-
446
- /* Deprecated functions */
447
-
448
- int git_blob_create_frombuffer(
449
- git_oid *id, git_repository *repo, const void *buffer, size_t len)
450
- {
451
- return git_blob_create_from_buffer(id, repo, buffer, len);
452
- }
453
-
454
- int git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path)
455
- {
456
- return git_blob_create_from_workdir(id, repo, relative_path);
457
- }
458
-
459
- int git_blob_create_fromdisk(git_oid *id, git_repository *repo, const char *path)
460
- {
461
- return git_blob_create_from_disk(id, repo, path);
462
- }
463
-
464
- int git_blob_create_fromstream(
465
- git_writestream **out,
466
- git_repository *repo,
467
- const char *hintpath)
468
- {
469
- return git_blob_create_from_stream(out, repo, hintpath);
470
- }
471
-
472
- int git_blob_create_fromstream_commit(
473
- git_oid *out,
474
- git_writestream *stream)
475
- {
476
- return git_blob_create_from_stream_commit(out, stream);
477
- }
478
-
479
- int git_blob_filtered_content(
480
- git_buf *out,
481
- git_blob *blob,
482
- const char *path,
483
- int check_for_binary_data)
484
- {
485
- git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT;
486
-
487
- if (check_for_binary_data)
488
- opts.flags |= GIT_BLOB_FILTER_CHECK_FOR_BINARY;
489
- else
490
- opts.flags &= ~GIT_BLOB_FILTER_CHECK_FOR_BINARY;
491
-
492
- return git_blob_filter(out, blob, path, &opts);
493
- }