rugged 1.0.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (349) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -0
  3. data/README.md +1 -1
  4. data/ext/rugged/rugged.c +7 -4
  5. data/ext/rugged/rugged_commit.c +1 -1
  6. data/ext/rugged/rugged_object.c +1 -1
  7. data/ext/rugged/rugged_repo.c +3 -3
  8. data/lib/rugged/commit.rb +16 -2
  9. data/lib/rugged/repository.rb +2 -2
  10. data/lib/rugged/version.rb +1 -1
  11. data/vendor/libgit2/CMakeLists.txt +41 -74
  12. data/vendor/libgit2/COPYING +109 -1
  13. data/vendor/libgit2/cmake/{Modules/AddCFlagIfSupported.cmake → AddCFlagIfSupported.cmake} +0 -0
  14. data/vendor/libgit2/cmake/{Modules/EnableWarnings.cmake → EnableWarnings.cmake} +0 -0
  15. data/vendor/libgit2/cmake/{Modules/FindCoreFoundation.cmake → FindCoreFoundation.cmake} +0 -0
  16. data/vendor/libgit2/cmake/{Modules/FindGSSAPI.cmake → FindGSSAPI.cmake} +0 -0
  17. data/vendor/libgit2/cmake/{Modules/FindGSSFramework.cmake → FindGSSFramework.cmake} +0 -0
  18. data/vendor/libgit2/cmake/{Modules/FindHTTP_Parser.cmake → FindHTTP_Parser.cmake} +0 -0
  19. data/vendor/libgit2/cmake/{Modules/FindIconv.cmake → FindIconv.cmake} +0 -0
  20. data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
  21. data/vendor/libgit2/cmake/{Modules/FindPCRE.cmake → FindPCRE.cmake} +0 -0
  22. data/vendor/libgit2/cmake/{Modules/FindPCRE2.cmake → FindPCRE2.cmake} +0 -0
  23. data/vendor/libgit2/cmake/{Modules/FindPkgLibraries.cmake → FindPkgLibraries.cmake} +0 -0
  24. data/vendor/libgit2/cmake/{Modules/FindSecurity.cmake → FindSecurity.cmake} +0 -0
  25. data/vendor/libgit2/cmake/{Modules/FindStatNsec.cmake → FindStatNsec.cmake} +0 -0
  26. data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
  27. data/vendor/libgit2/cmake/{Modules/FindmbedTLS.cmake → FindmbedTLS.cmake} +0 -0
  28. data/vendor/libgit2/cmake/{Modules/IdeSplitSources.cmake → IdeSplitSources.cmake} +0 -0
  29. data/vendor/libgit2/cmake/{Modules/PkgBuildConfig.cmake → PkgBuildConfig.cmake} +0 -0
  30. data/vendor/libgit2/cmake/{Modules/SanitizeBool.cmake → SanitizeBool.cmake} +0 -0
  31. data/vendor/libgit2/cmake/{Modules/SelectGSSAPI.cmake → SelectGSSAPI.cmake} +18 -26
  32. data/vendor/libgit2/cmake/{Modules/SelectHTTPSBackend.cmake → SelectHTTPSBackend.cmake} +29 -32
  33. data/vendor/libgit2/cmake/{Modules/SelectHashes.cmake → SelectHashes.cmake} +21 -28
  34. data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
  35. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +4 -3
  36. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +24 -10
  37. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -27
  38. data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
  39. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
  40. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
  41. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
  42. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
  43. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
  44. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
  45. data/vendor/libgit2/deps/ntlmclient/ntlm.c +164 -135
  46. data/vendor/libgit2/deps/ntlmclient/ntlm.h +13 -9
  47. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +16 -3
  48. data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
  49. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
  50. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
  51. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
  52. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
  53. data/vendor/libgit2/deps/ntlmclient/util.c +15 -1
  54. data/vendor/libgit2/deps/ntlmclient/util.h +2 -1
  55. data/vendor/libgit2/deps/pcre/LICENCE +93 -0
  56. data/vendor/libgit2/deps/pcre/pcre.h +2 -2
  57. data/vendor/libgit2/deps/pcre/pcre_compile.c +29 -17
  58. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +4 -4
  59. data/vendor/libgit2/deps/pcre/pcreposix.c +2 -3
  60. data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -5
  61. data/vendor/libgit2/deps/zlib/deflate.c +1 -0
  62. data/vendor/libgit2/include/git2/annotated_commit.h +1 -1
  63. data/vendor/libgit2/include/git2/apply.h +2 -0
  64. data/vendor/libgit2/include/git2/attr.h +95 -0
  65. data/vendor/libgit2/include/git2/blame.h +95 -42
  66. data/vendor/libgit2/include/git2/blob.h +37 -3
  67. data/vendor/libgit2/include/git2/branch.h +25 -0
  68. data/vendor/libgit2/include/git2/cert.h +42 -5
  69. data/vendor/libgit2/include/git2/checkout.h +28 -12
  70. data/vendor/libgit2/include/git2/clone.h +1 -1
  71. data/vendor/libgit2/include/git2/commit.h +35 -19
  72. data/vendor/libgit2/include/git2/common.h +51 -6
  73. data/vendor/libgit2/include/git2/config.h +1 -1
  74. data/vendor/libgit2/include/git2/deprecated.h +368 -8
  75. data/vendor/libgit2/include/git2/diff.h +34 -113
  76. data/vendor/libgit2/include/git2/email.h +127 -0
  77. data/vendor/libgit2/include/git2/errors.h +8 -7
  78. data/vendor/libgit2/include/git2/filter.h +63 -17
  79. data/vendor/libgit2/include/git2/graph.h +20 -2
  80. data/vendor/libgit2/include/git2/index.h +4 -5
  81. data/vendor/libgit2/include/git2/indexer.h +2 -1
  82. data/vendor/libgit2/include/git2/notes.h +2 -2
  83. data/vendor/libgit2/include/git2/odb.h +44 -20
  84. data/vendor/libgit2/include/git2/oidarray.h +5 -8
  85. data/vendor/libgit2/include/git2/pack.h +1 -1
  86. data/vendor/libgit2/include/git2/patch.h +8 -0
  87. data/vendor/libgit2/include/git2/rebase.h +25 -1
  88. data/vendor/libgit2/include/git2/refs.h +9 -5
  89. data/vendor/libgit2/include/git2/remote.h +62 -9
  90. data/vendor/libgit2/include/git2/repository.h +107 -62
  91. data/vendor/libgit2/include/git2/revparse.h +5 -5
  92. data/vendor/libgit2/include/git2/stash.h +1 -1
  93. data/vendor/libgit2/include/git2/status.h +115 -59
  94. data/vendor/libgit2/include/git2/stdint.h +3 -3
  95. data/vendor/libgit2/include/git2/strarray.h +6 -10
  96. data/vendor/libgit2/include/git2/submodule.h +9 -0
  97. data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
  98. data/vendor/libgit2/include/git2/sys/email.h +45 -0
  99. data/vendor/libgit2/include/git2/sys/filter.h +49 -28
  100. data/vendor/libgit2/include/git2/sys/midx.h +74 -0
  101. data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -0
  102. data/vendor/libgit2/include/git2/sys/transport.h +1 -0
  103. data/vendor/libgit2/include/git2/tag.h +12 -0
  104. data/vendor/libgit2/include/git2/transport.h +1 -1
  105. data/vendor/libgit2/include/git2/tree.h +2 -14
  106. data/vendor/libgit2/include/git2/types.h +9 -0
  107. data/vendor/libgit2/include/git2/version.h +4 -4
  108. data/vendor/libgit2/include/git2/worktree.h +1 -0
  109. data/vendor/libgit2/include/git2.h +1 -0
  110. data/vendor/libgit2/src/CMakeLists.txt +84 -44
  111. data/vendor/libgit2/src/alloc.c +21 -8
  112. data/vendor/libgit2/src/allocators/failalloc.c +92 -0
  113. data/vendor/libgit2/src/allocators/failalloc.h +23 -0
  114. data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
  115. data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
  116. data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
  117. data/vendor/libgit2/src/annotated_commit.c +21 -9
  118. data/vendor/libgit2/src/apply.c +21 -8
  119. data/vendor/libgit2/src/array.h +11 -11
  120. data/vendor/libgit2/src/assert_safe.h +58 -0
  121. data/vendor/libgit2/src/attr.c +192 -70
  122. data/vendor/libgit2/src/attr_file.c +99 -41
  123. data/vendor/libgit2/src/attr_file.h +32 -11
  124. data/vendor/libgit2/src/attrcache.c +44 -40
  125. data/vendor/libgit2/src/attrcache.h +4 -5
  126. data/vendor/libgit2/src/blame.c +32 -19
  127. data/vendor/libgit2/src/blame_git.c +7 -4
  128. data/vendor/libgit2/src/blob.c +60 -32
  129. data/vendor/libgit2/src/branch.c +87 -37
  130. data/vendor/libgit2/src/buffer.c +349 -29
  131. data/vendor/libgit2/src/buffer.h +154 -2
  132. data/vendor/libgit2/src/cache.c +3 -24
  133. data/vendor/libgit2/src/cache.h +7 -7
  134. data/vendor/libgit2/src/cc-compat.h +10 -8
  135. data/vendor/libgit2/src/checkout.c +103 -105
  136. data/vendor/libgit2/src/cherrypick.c +8 -2
  137. data/vendor/libgit2/src/clone.c +105 -30
  138. data/vendor/libgit2/src/commit.c +41 -28
  139. data/vendor/libgit2/src/commit_graph.c +1209 -0
  140. data/vendor/libgit2/src/commit_graph.h +162 -0
  141. data/vendor/libgit2/src/commit_list.c +46 -0
  142. data/vendor/libgit2/src/commit_list.h +2 -0
  143. data/vendor/libgit2/src/common.h +26 -2
  144. data/vendor/libgit2/src/config.c +41 -23
  145. data/vendor/libgit2/src/config_cache.c +9 -4
  146. data/vendor/libgit2/src/config_entries.c +35 -27
  147. data/vendor/libgit2/src/config_file.c +17 -9
  148. data/vendor/libgit2/src/config_parse.c +6 -8
  149. data/vendor/libgit2/src/config_snapshot.c +2 -1
  150. data/vendor/libgit2/src/crlf.c +16 -6
  151. data/vendor/libgit2/src/date.c +4 -3
  152. data/vendor/libgit2/src/delta.c +1 -1
  153. data/vendor/libgit2/src/describe.c +12 -5
  154. data/vendor/libgit2/src/diff.c +55 -183
  155. data/vendor/libgit2/src/diff_driver.c +21 -17
  156. data/vendor/libgit2/src/diff_file.c +5 -7
  157. data/vendor/libgit2/src/diff_generate.c +56 -28
  158. data/vendor/libgit2/src/diff_parse.c +2 -3
  159. data/vendor/libgit2/src/diff_print.c +81 -65
  160. data/vendor/libgit2/src/diff_stats.c +19 -16
  161. data/vendor/libgit2/src/diff_tform.c +13 -13
  162. data/vendor/libgit2/src/diff_xdiff.c +4 -2
  163. data/vendor/libgit2/src/diff_xdiff.h +1 -1
  164. data/vendor/libgit2/src/email.c +299 -0
  165. data/vendor/libgit2/src/email.h +25 -0
  166. data/vendor/libgit2/src/errors.c +26 -19
  167. data/vendor/libgit2/src/features.h.in +5 -1
  168. data/vendor/libgit2/src/fetch.c +7 -2
  169. data/vendor/libgit2/src/fetchhead.c +8 -4
  170. data/vendor/libgit2/src/filebuf.c +9 -7
  171. data/vendor/libgit2/src/filter.c +215 -113
  172. data/vendor/libgit2/src/filter.h +24 -5
  173. data/vendor/libgit2/src/futils.c +8 -8
  174. data/vendor/libgit2/src/futils.h +4 -4
  175. data/vendor/libgit2/src/graph.c +64 -9
  176. data/vendor/libgit2/src/hash/sha1/collisiondetect.c +3 -3
  177. data/vendor/libgit2/src/hash/sha1/common_crypto.c +3 -3
  178. data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
  179. data/vendor/libgit2/src/hash/sha1/mbedtls.c +12 -12
  180. data/vendor/libgit2/src/hash/sha1/openssl.c +3 -3
  181. data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +8 -10
  182. data/vendor/libgit2/src/hash/sha1/win32.c +15 -11
  183. data/vendor/libgit2/src/hash.c +16 -13
  184. data/vendor/libgit2/src/hash.h +1 -1
  185. data/vendor/libgit2/src/hashsig.c +23 -10
  186. data/vendor/libgit2/src/ident.c +13 -3
  187. data/vendor/libgit2/src/idxmap.c +0 -22
  188. data/vendor/libgit2/src/ignore.c +33 -17
  189. data/vendor/libgit2/src/index.c +124 -82
  190. data/vendor/libgit2/src/index.h +1 -1
  191. data/vendor/libgit2/src/indexer.c +95 -37
  192. data/vendor/libgit2/src/integer.h +79 -2
  193. data/vendor/libgit2/src/iterator.c +40 -28
  194. data/vendor/libgit2/src/iterator.h +1 -1
  195. data/vendor/libgit2/src/khash.h +2 -11
  196. data/vendor/libgit2/src/{settings.c → libgit2.c} +148 -49
  197. data/vendor/libgit2/src/libgit2.h +15 -0
  198. data/vendor/libgit2/src/mailmap.c +23 -10
  199. data/vendor/libgit2/src/map.h +3 -3
  200. data/vendor/libgit2/src/merge.c +95 -43
  201. data/vendor/libgit2/src/merge.h +2 -1
  202. data/vendor/libgit2/src/merge_driver.c +19 -13
  203. data/vendor/libgit2/src/merge_file.c +15 -9
  204. data/vendor/libgit2/src/message.c +3 -1
  205. data/vendor/libgit2/src/midx.c +879 -0
  206. data/vendor/libgit2/src/midx.h +110 -0
  207. data/vendor/libgit2/src/mwindow.c +214 -95
  208. data/vendor/libgit2/src/mwindow.h +3 -3
  209. data/vendor/libgit2/src/net.c +133 -4
  210. data/vendor/libgit2/src/net.h +16 -2
  211. data/vendor/libgit2/src/netops.c +6 -4
  212. data/vendor/libgit2/src/netops.h +2 -2
  213. data/vendor/libgit2/src/notes.c +40 -40
  214. data/vendor/libgit2/src/object.c +24 -15
  215. data/vendor/libgit2/src/odb.c +298 -57
  216. data/vendor/libgit2/src/odb.h +16 -2
  217. data/vendor/libgit2/src/odb_loose.c +31 -21
  218. data/vendor/libgit2/src/odb_mempack.c +3 -1
  219. data/vendor/libgit2/src/odb_pack.c +391 -114
  220. data/vendor/libgit2/src/oid.c +7 -4
  221. data/vendor/libgit2/src/oidarray.c +10 -1
  222. data/vendor/libgit2/src/pack-objects.c +83 -69
  223. data/vendor/libgit2/src/pack.c +383 -150
  224. data/vendor/libgit2/src/pack.h +44 -9
  225. data/vendor/libgit2/src/patch.c +14 -7
  226. data/vendor/libgit2/src/patch_generate.c +3 -5
  227. data/vendor/libgit2/src/patch_parse.c +6 -3
  228. data/vendor/libgit2/src/path.c +103 -58
  229. data/vendor/libgit2/src/path.h +80 -7
  230. data/vendor/libgit2/src/pathspec.c +12 -11
  231. data/vendor/libgit2/src/pool.c +34 -22
  232. data/vendor/libgit2/src/pool.h +9 -1
  233. data/vendor/libgit2/src/posix.c +43 -12
  234. data/vendor/libgit2/src/posix.h +9 -0
  235. data/vendor/libgit2/src/proxy.c +2 -0
  236. data/vendor/libgit2/src/push.c +2 -0
  237. data/vendor/libgit2/src/reader.c +10 -6
  238. data/vendor/libgit2/src/rebase.c +95 -49
  239. data/vendor/libgit2/src/refdb.c +165 -13
  240. data/vendor/libgit2/src/refdb.h +69 -0
  241. data/vendor/libgit2/src/refdb_fs.c +145 -153
  242. data/vendor/libgit2/src/reflog.c +21 -20
  243. data/vendor/libgit2/src/refs.c +153 -233
  244. data/vendor/libgit2/src/refs.h +2 -20
  245. data/vendor/libgit2/src/refspec.c +81 -45
  246. data/vendor/libgit2/src/regexp.c +2 -2
  247. data/vendor/libgit2/src/remote.c +320 -122
  248. data/vendor/libgit2/src/remote.h +2 -1
  249. data/vendor/libgit2/src/repository.c +476 -203
  250. data/vendor/libgit2/src/repository.h +27 -29
  251. data/vendor/libgit2/src/reset.c +8 -7
  252. data/vendor/libgit2/src/revert.c +8 -2
  253. data/vendor/libgit2/src/revparse.c +23 -17
  254. data/vendor/libgit2/src/revwalk.c +35 -20
  255. data/vendor/libgit2/src/runtime.c +162 -0
  256. data/vendor/libgit2/src/runtime.h +62 -0
  257. data/vendor/libgit2/src/{refdb_fs.h → settings.h} +3 -11
  258. data/vendor/libgit2/src/signature.c +6 -5
  259. data/vendor/libgit2/src/sortedcache.c +2 -3
  260. data/vendor/libgit2/src/sortedcache.h +10 -8
  261. data/vendor/libgit2/src/stash.c +6 -2
  262. data/vendor/libgit2/src/status.c +9 -4
  263. data/vendor/libgit2/src/strarray.c +64 -0
  264. data/vendor/libgit2/src/streams/mbedtls.c +14 -17
  265. data/vendor/libgit2/src/streams/mbedtls.h +1 -1
  266. data/vendor/libgit2/src/streams/openssl.c +113 -207
  267. data/vendor/libgit2/src/streams/openssl.h +9 -1
  268. data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
  269. data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
  270. data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
  271. data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
  272. data/vendor/libgit2/src/streams/registry.c +10 -9
  273. data/vendor/libgit2/src/streams/socket.c +6 -2
  274. data/vendor/libgit2/src/streams/stransport.c +6 -3
  275. data/vendor/libgit2/src/streams/tls.c +5 -3
  276. data/vendor/libgit2/src/submodule.c +134 -66
  277. data/vendor/libgit2/src/submodule.h +9 -9
  278. data/vendor/libgit2/src/sysdir.c +8 -26
  279. data/vendor/libgit2/src/sysdir.h +0 -11
  280. data/vendor/libgit2/src/tag.c +49 -11
  281. data/vendor/libgit2/src/thread.c +140 -0
  282. data/vendor/libgit2/src/thread.h +479 -0
  283. data/vendor/libgit2/src/threadstate.c +84 -0
  284. data/vendor/libgit2/src/threadstate.h +24 -0
  285. data/vendor/libgit2/src/trace.c +2 -2
  286. data/vendor/libgit2/src/trace.h +17 -13
  287. data/vendor/libgit2/src/trailer.c +1 -1
  288. data/vendor/libgit2/src/transaction.c +21 -9
  289. data/vendor/libgit2/src/transport.c +3 -3
  290. data/vendor/libgit2/src/transports/auth.c +1 -1
  291. data/vendor/libgit2/src/transports/auth_negotiate.c +11 -4
  292. data/vendor/libgit2/src/transports/auth_ntlm.c +10 -6
  293. data/vendor/libgit2/src/transports/credential.c +17 -7
  294. data/vendor/libgit2/src/transports/credential_helpers.c +2 -0
  295. data/vendor/libgit2/src/transports/git.c +1 -3
  296. data/vendor/libgit2/src/transports/http.c +19 -17
  297. data/vendor/libgit2/src/transports/http.h +1 -0
  298. data/vendor/libgit2/src/transports/httpclient.c +68 -38
  299. data/vendor/libgit2/src/transports/httpclient.h +1 -1
  300. data/vendor/libgit2/src/transports/local.c +5 -5
  301. data/vendor/libgit2/src/transports/smart.c +14 -9
  302. data/vendor/libgit2/src/transports/smart.h +1 -1
  303. data/vendor/libgit2/src/transports/smart_protocol.c +11 -5
  304. data/vendor/libgit2/src/transports/ssh.c +55 -21
  305. data/vendor/libgit2/src/transports/winhttp.c +157 -89
  306. data/vendor/libgit2/src/tree.c +100 -77
  307. data/vendor/libgit2/src/tree.h +1 -0
  308. data/vendor/libgit2/src/tsort.c +0 -2
  309. data/vendor/libgit2/src/unix/map.c +3 -1
  310. data/vendor/libgit2/src/unix/posix.h +16 -1
  311. data/vendor/libgit2/src/unix/pthread.h +2 -1
  312. data/vendor/libgit2/src/utf8.c +150 -0
  313. data/vendor/libgit2/src/utf8.h +52 -0
  314. data/vendor/libgit2/src/util.c +75 -184
  315. data/vendor/libgit2/src/util.h +34 -40
  316. data/vendor/libgit2/src/vector.c +23 -19
  317. data/vendor/libgit2/src/vector.h +4 -2
  318. data/vendor/libgit2/src/win32/findfile.c +5 -3
  319. data/vendor/libgit2/src/win32/git2.rc +18 -3
  320. data/vendor/libgit2/src/win32/map.c +1 -1
  321. data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
  322. data/vendor/libgit2/src/win32/path_w32.c +23 -25
  323. data/vendor/libgit2/src/win32/path_w32.h +0 -1
  324. data/vendor/libgit2/src/win32/posix.h +6 -6
  325. data/vendor/libgit2/src/win32/posix_w32.c +86 -7
  326. data/vendor/libgit2/src/win32/precompiled.h +0 -1
  327. data/vendor/libgit2/src/win32/reparse.h +4 -4
  328. data/vendor/libgit2/src/win32/thread.c +24 -15
  329. data/vendor/libgit2/src/win32/thread.h +1 -1
  330. data/vendor/libgit2/src/win32/w32_buffer.c +3 -3
  331. data/vendor/libgit2/src/win32/w32_common.h +18 -9
  332. data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
  333. data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
  334. data/vendor/libgit2/src/win32/w32_util.h +6 -6
  335. data/vendor/libgit2/src/worktree.c +36 -14
  336. data/vendor/libgit2/src/zstream.c +1 -1
  337. metadata +65 -42
  338. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +0 -29
  339. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +0 -96
  340. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  341. data/vendor/libgit2/src/buf_text.c +0 -316
  342. data/vendor/libgit2/src/buf_text.h +0 -122
  343. data/vendor/libgit2/src/global.c +0 -361
  344. data/vendor/libgit2/src/global.h +0 -41
  345. data/vendor/libgit2/src/thread-utils.c +0 -58
  346. data/vendor/libgit2/src/thread-utils.h +0 -246
  347. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
  348. data/vendor/libgit2/src/win32/w32_stack.c +0 -188
  349. data/vendor/libgit2/src/win32/w32_stack.h +0 -140
@@ -67,8 +67,6 @@ extern int git_path_basename_r(git_buf *buffer, const char *path);
67
67
  */
68
68
  extern size_t git_path_basename_offset(git_buf *buffer);
69
69
 
70
- extern const char *git_path_topdir(const char *path);
71
-
72
70
  /**
73
71
  * Find offset to root of path if path has one.
74
72
  *
@@ -87,7 +85,7 @@ extern int git_path_to_dir(git_buf *path);
87
85
  /**
88
86
  * Ensure string has a trailing '/' if there is space for it.
89
87
  */
90
- extern void git_path_string_to_dir(char* path, size_t size);
88
+ extern void git_path_string_to_dir(char *path, size_t size);
91
89
 
92
90
  /**
93
91
  * Taken from git.git; returns nonzero if the given path is "." or "..".
@@ -285,7 +283,7 @@ extern int git_path_prettify_dir(git_buf *path_out, const char *path, const char
285
283
  * appends the trailing '/'. If the path does not exist, it is
286
284
  * treated like a regular filename.
287
285
  */
288
- extern int git_path_find_dir(git_buf *dir, const char *path, const char *base);
286
+ extern int git_path_find_dir(git_buf *dir);
289
287
 
290
288
  /**
291
289
  * Resolve relative references within a path.
@@ -628,20 +626,95 @@ extern int git_path_from_url_or_path(git_buf *local_path_out, const char *url_or
628
626
  #define GIT_PATH_REJECT_INDEX_DEFAULTS \
629
627
  GIT_PATH_REJECT_TRAVERSAL | GIT_PATH_REJECT_DOT_GIT
630
628
 
631
- /*
632
- * Determine whether a path is a valid git path or not - this must not contain
629
+ /**
630
+ * Validate a "bare" git path. This ensures that the given path is legal
631
+ * to place in the index or a tree. This should be checked by mechanisms
632
+ * like `git_index_add` and `git_treebuilder_insert` when taking user
633
+ * data, and by `git_checkout` before constructing on-disk paths.
634
+ *
635
+ * This will ensure that a git path does not contain any "unsafe" components,
633
636
  * a '.' or '..' component, or a component that is ".git" (in any case).
634
637
  *
638
+ * (Note: if you take or construct an on-disk path -- a workdir path,
639
+ * a path to a git repository or a reference name that could be a loose
640
+ * ref -- you should _also_ validate that with `git_path_validate_workdir`.)
641
+ *
635
642
  * `repo` is optional. If specified, it will be used to determine the short
636
643
  * path name to reject (if `GIT_PATH_REJECT_DOS_SHORTNAME` is specified),
637
644
  * in addition to the default of "git~1".
638
645
  */
639
- extern bool git_path_isvalid(
646
+ extern bool git_path_validate(
640
647
  git_repository *repo,
641
648
  const char *path,
642
649
  uint16_t mode,
643
650
  unsigned int flags);
644
651
 
652
+ /**
653
+ * Validate an on-disk path, taking into account that it will have a
654
+ * suffix appended (eg, `.lock`).
655
+ */
656
+ GIT_INLINE(int) git_path_validate_filesystem_with_suffix(
657
+ const char *path,
658
+ size_t path_len,
659
+ size_t suffix_len)
660
+ {
661
+ #ifdef GIT_WIN32
662
+ size_t path_chars, total_chars;
663
+
664
+ path_chars = git_utf8_char_length(path, path_len);
665
+
666
+ if (GIT_ADD_SIZET_OVERFLOW(&total_chars, path_chars, suffix_len) ||
667
+ total_chars > MAX_PATH) {
668
+ git_error_set(GIT_ERROR_FILESYSTEM, "path too long: '%s'", path);
669
+ return -1;
670
+ }
671
+ return 0;
672
+ #else
673
+ GIT_UNUSED(path);
674
+ GIT_UNUSED(path_len);
675
+ GIT_UNUSED(suffix_len);
676
+ return 0;
677
+ #endif
678
+ }
679
+
680
+ /**
681
+ * Validate an path on the filesystem. This ensures that the given
682
+ * path is valid for the operating system/platform; for example, this
683
+ * will ensure that the given absolute path is smaller than MAX_PATH on
684
+ * Windows.
685
+ *
686
+ * For paths within the working directory, you should use ensure that
687
+ * `core.longpaths` is obeyed. Use `git_path_validate_workdir`.
688
+ */
689
+ GIT_INLINE(int) git_path_validate_filesystem(
690
+ const char *path,
691
+ size_t path_len)
692
+ {
693
+ return git_path_validate_filesystem_with_suffix(path, path_len, 0);
694
+ }
695
+
696
+ /**
697
+ * Validate a path relative to the repo's worktree. This ensures that
698
+ * the given working tree path is valid for the operating system/platform.
699
+ * This will ensure that an absolute path is smaller than MAX_PATH on
700
+ * Windows, while keeping `core.longpaths` configuration settings in mind.
701
+ *
702
+ * This should be checked by mechamisms like `git_checkout` after
703
+ * contructing on-disk paths and before trying to write them.
704
+ *
705
+ * If the repository is null, no repository configuration is applied.
706
+ */
707
+ extern int git_path_validate_workdir(
708
+ git_repository *repo,
709
+ const char *path);
710
+ extern int git_path_validate_workdir_with_len(
711
+ git_repository *repo,
712
+ const char *path,
713
+ size_t path_len);
714
+ extern int git_path_validate_workdir_buf(
715
+ git_repository *repo,
716
+ git_buf *buf);
717
+
645
718
  /**
646
719
  * Convert any backslashes into slashes
647
720
  */
@@ -9,7 +9,6 @@
9
9
 
10
10
  #include "git2/pathspec.h"
11
11
  #include "git2/diff.h"
12
- #include "buf_text.h"
13
12
  #include "attr_file.h"
14
13
  #include "iterator.h"
15
14
  #include "repository.h"
@@ -25,7 +24,7 @@ char *git_pathspec_prefix(const git_strarray *pathspec)
25
24
  const char *scan;
26
25
 
27
26
  if (!pathspec || !pathspec->count ||
28
- git_buf_text_common_prefix(&prefix, pathspec) < 0)
27
+ git_buf_common_prefix(&prefix, pathspec->strings, pathspec->count) < 0)
29
28
  return NULL;
30
29
 
31
30
  /* diff prefix will only be leading non-wildcards */
@@ -41,7 +40,7 @@ char *git_pathspec_prefix(const git_strarray *pathspec)
41
40
  return NULL;
42
41
  }
43
42
 
44
- git_buf_text_unescape(&prefix);
43
+ git_buf_unescape(&prefix);
45
44
 
46
45
  return git_buf_detach(&prefix);
47
46
  }
@@ -238,9 +237,9 @@ int git_pathspec__init(git_pathspec *ps, const git_strarray *paths)
238
237
  memset(ps, 0, sizeof(*ps));
239
238
 
240
239
  ps->prefix = git_pathspec_prefix(paths);
241
- git_pool_init(&ps->pool, 1);
242
240
 
243
- if ((error = git_pathspec__vinit(&ps->pathspec, paths, &ps->pool)) < 0)
241
+ if ((error = git_pool_init(&ps->pool, 1)) < 0 ||
242
+ (error = git_pathspec__vinit(&ps->pathspec, paths, &ps->pool)) < 0)
244
243
  git_pathspec__clear(ps);
245
244
 
246
245
  return error;
@@ -289,7 +288,8 @@ int git_pathspec_matches_path(
289
288
  bool no_fnmatch = (flags & GIT_PATHSPEC_NO_GLOB) != 0;
290
289
  bool casefold = (flags & GIT_PATHSPEC_IGNORE_CASE) != 0;
291
290
 
292
- assert(ps && path);
291
+ GIT_ASSERT_ARG(ps);
292
+ GIT_ASSERT_ARG(path);
293
293
 
294
294
  return (0 != git_pathspec__match(
295
295
  &ps->pathspec, path, no_fnmatch, casefold, NULL, NULL));
@@ -316,7 +316,8 @@ static git_pathspec_match_list *pathspec_match_alloc(
316
316
  if (!m)
317
317
  return NULL;
318
318
 
319
- git_pool_init(&m->pool, 1);
319
+ if (git_pool_init(&m->pool, 1) < 0)
320
+ return NULL;
320
321
 
321
322
  /* need to keep reference to pathspec and increment refcount because
322
323
  * failures array stores pointers to the pattern strings of the
@@ -525,7 +526,7 @@ int git_pathspec_match_workdir(
525
526
  git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
526
527
  int error = 0;
527
528
 
528
- assert(repo);
529
+ GIT_ASSERT_ARG(repo);
529
530
 
530
531
  iter_opts.flags = pathspec_match_iter_flags(flags);
531
532
 
@@ -547,7 +548,7 @@ int git_pathspec_match_index(
547
548
  git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
548
549
  int error = 0;
549
550
 
550
- assert(index);
551
+ GIT_ASSERT_ARG(index);
551
552
 
552
553
  iter_opts.flags = pathspec_match_iter_flags(flags);
553
554
 
@@ -569,7 +570,7 @@ int git_pathspec_match_tree(
569
570
  git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
570
571
  int error = 0;
571
572
 
572
- assert(tree);
573
+ GIT_ASSERT_ARG(tree);
573
574
 
574
575
  iter_opts.flags = pathspec_match_iter_flags(flags);
575
576
 
@@ -597,7 +598,7 @@ int git_pathspec_match_diff(
597
598
  const git_diff_delta *delta, **match;
598
599
  git_bitvec used_patterns;
599
600
 
600
- assert(diff);
601
+ GIT_ASSERT_ARG(diff);
601
602
 
602
603
  if (git_bitvec_init(&used_patterns, patterns->length) < 0)
603
604
  return -1;
@@ -21,30 +21,29 @@ struct git_pool_page {
21
21
 
22
22
  static void *pool_alloc_page(git_pool *pool, size_t size);
23
23
 
24
- size_t git_pool__system_page_size(void)
25
- {
26
- static size_t size = 0;
24
+ #ifndef GIT_DEBUG_POOL
27
25
 
28
- if (!size) {
29
- size_t page_size;
30
- if (git__page_size(&page_size) < 0)
31
- page_size = 4096;
32
- /* allow space for malloc overhead */
33
- size = (page_size - (2 * sizeof(void *)) - sizeof(git_pool_page));
34
- }
26
+ static size_t system_page_size = 0;
35
27
 
36
- return size;
28
+ int git_pool_global_init(void)
29
+ {
30
+ if (git__page_size(&system_page_size) < 0)
31
+ system_page_size = 4096;
32
+ /* allow space for malloc overhead */
33
+ system_page_size -= (2 * sizeof(void *)) + sizeof(git_pool_page);
34
+ return 0;
37
35
  }
38
36
 
39
- #ifndef GIT_DEBUG_POOL
40
- void git_pool_init(git_pool *pool, size_t item_size)
37
+ int git_pool_init(git_pool *pool, size_t item_size)
41
38
  {
42
- assert(pool);
43
- assert(item_size >= 1);
39
+ GIT_ASSERT_ARG(pool);
40
+ GIT_ASSERT_ARG(item_size >= 1);
44
41
 
45
42
  memset(pool, 0, sizeof(git_pool));
46
43
  pool->item_size = item_size;
47
- pool->page_size = git_pool__system_page_size();
44
+ pool->page_size = system_page_size;
45
+
46
+ return 0;
48
47
  }
49
48
 
50
49
  void git_pool_clear(git_pool *pool)
@@ -112,6 +111,11 @@ bool git_pool__ptr_in_pool(git_pool *pool, void *ptr)
112
111
 
113
112
  #else
114
113
 
114
+ int git_pool_global_init(void)
115
+ {
116
+ return 0;
117
+ }
118
+
115
119
  static int git_pool__ptr_cmp(const void * a, const void * b)
116
120
  {
117
121
  if(a > b) {
@@ -125,15 +129,17 @@ static int git_pool__ptr_cmp(const void * a, const void * b)
125
129
  }
126
130
  }
127
131
 
128
- void git_pool_init(git_pool *pool, size_t item_size)
132
+ int git_pool_init(git_pool *pool, size_t item_size)
129
133
  {
130
- assert(pool);
131
- assert(item_size >= 1);
134
+ GIT_ASSERT_ARG(pool);
135
+ GIT_ASSERT_ARG(item_size >= 1);
132
136
 
133
137
  memset(pool, 0, sizeof(git_pool));
134
138
  pool->item_size = item_size;
135
139
  pool->page_size = git_pool__system_page_size();
136
140
  git_vector_init(&pool->allocations, 100, git_pool__ptr_cmp);
141
+
142
+ return 0;
137
143
  }
138
144
 
139
145
  void git_pool_clear(git_pool *pool)
@@ -199,7 +205,9 @@ char *git_pool_strndup(git_pool *pool, const char *str, size_t n)
199
205
  {
200
206
  char *ptr = NULL;
201
207
 
202
- assert(pool && str && pool->item_size == sizeof(char));
208
+ GIT_ASSERT_ARG_WITH_RETVAL(pool, NULL);
209
+ GIT_ASSERT_ARG_WITH_RETVAL(str, NULL);
210
+ GIT_ASSERT_ARG_WITH_RETVAL(pool->item_size == sizeof(char), NULL);
203
211
 
204
212
  if (n == SIZE_MAX)
205
213
  return NULL;
@@ -214,7 +222,10 @@ char *git_pool_strndup(git_pool *pool, const char *str, size_t n)
214
222
 
215
223
  char *git_pool_strdup(git_pool *pool, const char *str)
216
224
  {
217
- assert(pool && str && pool->item_size == sizeof(char));
225
+ GIT_ASSERT_ARG_WITH_RETVAL(pool, NULL);
226
+ GIT_ASSERT_ARG_WITH_RETVAL(str, NULL);
227
+ GIT_ASSERT_ARG_WITH_RETVAL(pool->item_size == sizeof(char), NULL);
228
+
218
229
  return git_pool_strndup(pool, str, strlen(str));
219
230
  }
220
231
 
@@ -228,7 +239,8 @@ char *git_pool_strcat(git_pool *pool, const char *a, const char *b)
228
239
  void *ptr;
229
240
  size_t len_a, len_b, total;
230
241
 
231
- assert(pool && pool->item_size == sizeof(char));
242
+ GIT_ASSERT_ARG_WITH_RETVAL(pool, NULL);
243
+ GIT_ASSERT_ARG_WITH_RETVAL(pool->item_size == sizeof(char), NULL);
232
244
 
233
245
  len_a = a ? strlen(a) : 0;
234
246
  len_b = b ? strlen(b) : 0;
@@ -81,7 +81,7 @@ typedef struct {
81
81
  * Of course, you can use this in other ways, but those are the
82
82
  * two most common patterns.
83
83
  */
84
- extern void git_pool_init(git_pool *pool, size_t item_size);
84
+ extern int git_pool_init(git_pool *pool, size_t item_size);
85
85
 
86
86
  /**
87
87
  * Free all items in pool
@@ -135,4 +135,12 @@ extern uint32_t git_pool__open_pages(git_pool *pool);
135
135
  #endif
136
136
  extern bool git_pool__ptr_in_pool(git_pool *pool, void *ptr);
137
137
 
138
+ /**
139
+ * This function is being called by our global setup routines to
140
+ * initialize the system pool size.
141
+ *
142
+ * @return 0 on success, <0 on failure
143
+ */
144
+ extern int git_pool_global_init(void);
145
+
138
146
  #endif
@@ -109,6 +109,13 @@ int p_open(const char *path, volatile int flags, ...)
109
109
  {
110
110
  mode_t mode = 0;
111
111
 
112
+ #ifdef GIT_DEBUG_STRICT_OPEN
113
+ if (strstr(path, "//") != NULL) {
114
+ errno = EACCES;
115
+ return -1;
116
+ }
117
+ #endif
118
+
112
119
  if (flags & O_CREAT) {
113
120
  va_list arg_list;
114
121
 
@@ -129,7 +136,8 @@ int p_getcwd(char *buffer_out, size_t size)
129
136
  {
130
137
  char *cwd_buffer;
131
138
 
132
- assert(buffer_out && size > 0);
139
+ GIT_ASSERT_ARG(buffer_out);
140
+ GIT_ASSERT_ARG(size > 0);
133
141
 
134
142
  cwd_buffer = getcwd(buffer_out, size);
135
143
 
@@ -196,7 +204,7 @@ int p_write(git_file fd, const void *buf, size_t cnt)
196
204
  while (cnt) {
197
205
  ssize_t r;
198
206
  #ifdef GIT_WIN32
199
- assert((size_t)((unsigned int)cnt) == cnt);
207
+ GIT_ASSERT((size_t)((unsigned int)cnt) == cnt);
200
208
  r = write(fd, b, (unsigned int)cnt);
201
209
  #else
202
210
  r = write(fd, b, cnt);
@@ -237,24 +245,43 @@ int git__mmap_alignment(size_t *alignment)
237
245
 
238
246
  int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, off64_t offset)
239
247
  {
248
+ const char *ptr;
249
+ size_t remaining_len;
250
+
240
251
  GIT_MMAP_VALIDATE(out, len, prot, flags);
241
252
 
242
- out->data = NULL;
243
- out->len = 0;
253
+ /* writes cannot be emulated without handling pagefaults since write happens by
254
+ * writing to mapped memory */
255
+ if (prot & GIT_PROT_WRITE) {
256
+ git_error_set(GIT_ERROR_OS, "trying to map %s-writeable",
257
+ ((flags & GIT_MAP_TYPE) == GIT_MAP_SHARED) ? "shared": "private");
258
+ return -1;
259
+ }
244
260
 
245
- if ((prot & GIT_PROT_WRITE) && ((flags & GIT_MAP_TYPE) == GIT_MAP_SHARED)) {
246
- git_error_set(GIT_ERROR_OS, "trying to map shared-writeable");
261
+ if (!git__is_ssizet(len)) {
262
+ errno = EINVAL;
247
263
  return -1;
248
264
  }
249
265
 
266
+ out->len = 0;
250
267
  out->data = git__malloc(len);
251
268
  GIT_ERROR_CHECK_ALLOC(out->data);
252
269
 
253
- if (!git__is_ssizet(len) ||
254
- (p_lseek(fd, offset, SEEK_SET) < 0) ||
255
- (p_read(fd, out->data, len) != (ssize_t)len)) {
256
- git_error_set(GIT_ERROR_OS, "mmap emulation failed");
257
- return -1;
270
+ remaining_len = len;
271
+ ptr = (const char *)out->data;
272
+ while (remaining_len > 0) {
273
+ ssize_t nb;
274
+ HANDLE_EINTR(nb, p_pread(fd, (void *)ptr, remaining_len, offset));
275
+ if (nb <= 0) {
276
+ git_error_set(GIT_ERROR_OS, "mmap emulation failed");
277
+ git__free(out->data);
278
+ out->data = NULL;
279
+ return -1;
280
+ }
281
+
282
+ ptr += nb;
283
+ offset += nb;
284
+ remaining_len -= nb;
258
285
  }
259
286
 
260
287
  out->len = len;
@@ -263,9 +290,13 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, off64_t offset
263
290
 
264
291
  int p_munmap(git_map *map)
265
292
  {
266
- assert(map != NULL);
293
+ GIT_ASSERT_ARG(map);
267
294
  git__free(map->data);
268
295
 
296
+ /* Initializing will help debug use-after-free */
297
+ map->len = 0;
298
+ map->data = NULL;
299
+
269
300
  return 0;
270
301
  }
271
302
 
@@ -89,6 +89,12 @@
89
89
  #define EAFNOSUPPORT (INT_MAX-1)
90
90
  #endif
91
91
 
92
+ /* Compiler independent macro to handle signal interrpted system calls */
93
+ #define HANDLE_EINTR(result, x) do { \
94
+ result = (x); \
95
+ } while (result == -1 && errno == EINTR);
96
+
97
+
92
98
  /* Provide a 64-bit size for offsets. */
93
99
 
94
100
  #if defined(_MSC_VER)
@@ -119,6 +125,9 @@ typedef int git_file;
119
125
  extern ssize_t p_read(git_file fd, void *buf, size_t cnt);
120
126
  extern int p_write(git_file fd, const void *buf, size_t cnt);
121
127
 
128
+ extern ssize_t p_pread(int fd, void *data, size_t size, off64_t offset);
129
+ extern ssize_t p_pwrite(int fd, const void *data, size_t size, off64_t offset);
130
+
122
131
  #define p_close(fd) close(fd)
123
132
  #define p_umask(m) umask(m)
124
133
 
@@ -16,10 +16,12 @@ int git_proxy_options_init(git_proxy_options *opts, unsigned int version)
16
16
  return 0;
17
17
  }
18
18
 
19
+ #ifndef GIT_DEPRECATE_HARD
19
20
  int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
20
21
  {
21
22
  return git_proxy_options_init(opts, version);
22
23
  }
24
+ #endif
23
25
 
24
26
  int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
25
27
  {
@@ -555,7 +555,9 @@ int git_push_options_init(git_push_options *opts, unsigned int version)
555
555
  return 0;
556
556
  }
557
557
 
558
+ #ifndef GIT_DEPRECATE_HARD
558
559
  int git_push_init_options(git_push_options *opts, unsigned int version)
559
560
  {
560
561
  return git_push_options_init(opts, version);
561
562
  }
563
+ #endif
@@ -61,7 +61,8 @@ int git_reader_for_tree(git_reader **out, git_tree *tree)
61
61
  {
62
62
  tree_reader *reader;
63
63
 
64
- assert(out && tree);
64
+ GIT_ASSERT_ARG(out);
65
+ GIT_ASSERT_ARG(tree);
65
66
 
66
67
  reader = git__calloc(1, sizeof(tree_reader));
67
68
  GIT_ERROR_CHECK_ALLOC(reader);
@@ -97,8 +98,7 @@ static int workdir_reader_read(
97
98
  git_oid id;
98
99
  int error;
99
100
 
100
- if ((error = git_buf_joinpath(&path,
101
- git_repository_workdir(reader->repo), filename)) < 0)
101
+ if ((error = git_repository_workdir_path(&path, reader->repo, filename)) < 0)
102
102
  goto done;
103
103
 
104
104
  if ((error = p_lstat(path.ptr, &st)) < 0) {
@@ -158,7 +158,8 @@ int git_reader_for_workdir(
158
158
  workdir_reader *reader;
159
159
  int error;
160
160
 
161
- assert(out && repo);
161
+ GIT_ASSERT_ARG(out);
162
+ GIT_ASSERT_ARG(repo);
162
163
 
163
164
  reader = git__calloc(1, sizeof(workdir_reader));
164
165
  GIT_ERROR_CHECK_ALLOC(reader);
@@ -223,7 +224,8 @@ int git_reader_for_index(
223
224
  index_reader *reader;
224
225
  int error;
225
226
 
226
- assert(out && repo);
227
+ GIT_ASSERT_ARG(out);
228
+ GIT_ASSERT_ARG(repo);
227
229
 
228
230
  reader = git__calloc(1, sizeof(index_reader));
229
231
  GIT_ERROR_CHECK_ALLOC(reader);
@@ -251,7 +253,9 @@ int git_reader_read(
251
253
  git_reader *reader,
252
254
  const char *filename)
253
255
  {
254
- assert(out && reader && filename);
256
+ GIT_ASSERT_ARG(out);
257
+ GIT_ASSERT_ARG(reader);
258
+ GIT_ASSERT_ARG(filename);
255
259
 
256
260
  return reader->read(out, out_id, out_filemode, reader, filename);
257
261
  }