rugged 0.27.10 → 0.27.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (420) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/AUTHORS +0 -1
  4. data/vendor/libgit2/CMakeLists.txt +54 -98
  5. data/vendor/libgit2/COPYING +0 -28
  6. data/vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake +1 -15
  7. data/vendor/libgit2/cmake/Modules/EnableWarnings.cmake +8 -9
  8. data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +2 -2
  9. data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +1 -1
  10. data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +2 -2
  11. data/vendor/libgit2/cmake/Modules/FindStatNsec.cmake +0 -6
  12. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -2
  13. data/vendor/libgit2/deps/http-parser/{COPYING → LICENSE-MIT} +0 -0
  14. data/vendor/libgit2/deps/http-parser/http_parser.c +6 -11
  15. data/vendor/libgit2/deps/regex/CMakeLists.txt +2 -0
  16. data/vendor/libgit2/deps/regex/config.h +7 -0
  17. data/vendor/libgit2/deps/regex/regcomp.c +3857 -0
  18. data/vendor/libgit2/deps/regex/regex.c +92 -0
  19. data/vendor/libgit2/deps/regex/regex.h +582 -0
  20. data/vendor/libgit2/deps/regex/regex_internal.c +1744 -0
  21. data/vendor/libgit2/deps/regex/regex_internal.h +819 -0
  22. data/vendor/libgit2/deps/regex/regexec.c +4369 -0
  23. data/vendor/libgit2/deps/zlib/CMakeLists.txt +0 -1
  24. data/vendor/libgit2/deps/zlib/adler32.c +7 -0
  25. data/vendor/libgit2/deps/zlib/crc32.c +7 -0
  26. data/vendor/libgit2/include/git2.h +0 -5
  27. data/vendor/libgit2/include/git2/annotated_commit.h +0 -9
  28. data/vendor/libgit2/include/git2/attr.h +20 -38
  29. data/vendor/libgit2/include/git2/blame.h +25 -42
  30. data/vendor/libgit2/include/git2/blob.h +13 -45
  31. data/vendor/libgit2/include/git2/branch.h +1 -1
  32. data/vendor/libgit2/include/git2/buffer.h +16 -22
  33. data/vendor/libgit2/include/git2/checkout.h +32 -65
  34. data/vendor/libgit2/include/git2/cherrypick.h +7 -9
  35. data/vendor/libgit2/include/git2/clone.h +10 -12
  36. data/vendor/libgit2/include/git2/commit.h +3 -53
  37. data/vendor/libgit2/include/git2/common.h +8 -60
  38. data/vendor/libgit2/include/git2/config.h +19 -30
  39. data/vendor/libgit2/include/git2/describe.h +9 -32
  40. data/vendor/libgit2/include/git2/diff.h +156 -208
  41. data/vendor/libgit2/include/git2/errors.h +46 -54
  42. data/vendor/libgit2/include/git2/filter.h +0 -8
  43. data/vendor/libgit2/include/git2/ignore.h +2 -2
  44. data/vendor/libgit2/include/git2/index.h +52 -74
  45. data/vendor/libgit2/include/git2/indexer.h +6 -76
  46. data/vendor/libgit2/include/git2/inttypes.h +309 -0
  47. data/vendor/libgit2/include/git2/merge.h +18 -35
  48. data/vendor/libgit2/include/git2/net.h +5 -0
  49. data/vendor/libgit2/include/git2/notes.h +1 -1
  50. data/vendor/libgit2/include/git2/object.h +29 -17
  51. data/vendor/libgit2/include/git2/odb.h +11 -12
  52. data/vendor/libgit2/include/git2/odb_backend.h +9 -10
  53. data/vendor/libgit2/include/git2/oid.h +2 -2
  54. data/vendor/libgit2/include/git2/pack.h +3 -14
  55. data/vendor/libgit2/include/git2/proxy.h +8 -14
  56. data/vendor/libgit2/include/git2/rebase.h +6 -53
  57. data/vendor/libgit2/include/git2/refs.h +15 -33
  58. data/vendor/libgit2/include/git2/refspec.h +0 -17
  59. data/vendor/libgit2/include/git2/remote.h +24 -123
  60. data/vendor/libgit2/include/git2/repository.h +39 -76
  61. data/vendor/libgit2/include/git2/revert.h +4 -6
  62. data/vendor/libgit2/include/git2/revwalk.h +7 -7
  63. data/vendor/libgit2/include/git2/signature.h +2 -2
  64. data/vendor/libgit2/include/git2/stash.h +12 -15
  65. data/vendor/libgit2/include/git2/status.h +20 -33
  66. data/vendor/libgit2/include/git2/submodule.h +12 -30
  67. data/vendor/libgit2/include/git2/sys/commit.h +1 -1
  68. data/vendor/libgit2/include/git2/sys/config.h +13 -13
  69. data/vendor/libgit2/include/git2/sys/filter.h +6 -6
  70. data/vendor/libgit2/include/git2/sys/index.h +0 -3
  71. data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
  72. data/vendor/libgit2/include/git2/sys/merge.h +4 -9
  73. data/vendor/libgit2/include/git2/sys/odb_backend.h +22 -66
  74. data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -76
  75. data/vendor/libgit2/include/git2/sys/repository.h +1 -5
  76. data/vendor/libgit2/include/git2/sys/stream.h +12 -92
  77. data/vendor/libgit2/include/git2/sys/time.h +31 -0
  78. data/vendor/libgit2/include/git2/sys/transport.h +83 -129
  79. data/vendor/libgit2/include/git2/tag.h +4 -13
  80. data/vendor/libgit2/include/git2/trace.h +2 -2
  81. data/vendor/libgit2/include/git2/transaction.h +0 -1
  82. data/vendor/libgit2/include/git2/transport.h +311 -11
  83. data/vendor/libgit2/include/git2/tree.h +4 -4
  84. data/vendor/libgit2/include/git2/types.h +111 -33
  85. data/vendor/libgit2/include/git2/version.h +4 -4
  86. data/vendor/libgit2/include/git2/worktree.h +13 -48
  87. data/vendor/libgit2/libgit2.pc.in +13 -0
  88. data/vendor/libgit2/src/CMakeLists.txt +164 -96
  89. data/vendor/libgit2/src/annotated_commit.c +8 -15
  90. data/vendor/libgit2/src/apply.c +31 -537
  91. data/vendor/libgit2/src/apply.h +1 -3
  92. data/vendor/libgit2/src/array.h +2 -2
  93. data/vendor/libgit2/src/attr.c +75 -81
  94. data/vendor/libgit2/src/attr_file.c +121 -207
  95. data/vendor/libgit2/src/attr_file.h +9 -9
  96. data/vendor/libgit2/src/attrcache.c +53 -51
  97. data/vendor/libgit2/src/attrcache.h +1 -2
  98. data/vendor/libgit2/src/blame.c +20 -47
  99. data/vendor/libgit2/src/blame.h +1 -2
  100. data/vendor/libgit2/src/blame_git.c +20 -37
  101. data/vendor/libgit2/src/blob.c +42 -128
  102. data/vendor/libgit2/src/blob.h +2 -19
  103. data/vendor/libgit2/src/branch.c +43 -67
  104. data/vendor/libgit2/src/buf_text.c +6 -7
  105. data/vendor/libgit2/src/buffer.c +57 -69
  106. data/vendor/libgit2/src/buffer.h +1 -1
  107. data/vendor/libgit2/src/cache.c +45 -38
  108. data/vendor/libgit2/src/cache.h +3 -3
  109. data/vendor/libgit2/src/cc-compat.h +3 -20
  110. data/vendor/libgit2/src/checkout.c +90 -109
  111. data/vendor/libgit2/src/cherrypick.c +9 -15
  112. data/vendor/libgit2/src/clone.c +27 -49
  113. data/vendor/libgit2/src/clone.h +0 -4
  114. data/vendor/libgit2/src/commit.c +49 -117
  115. data/vendor/libgit2/src/commit.h +0 -7
  116. data/vendor/libgit2/src/commit_list.c +78 -30
  117. data/vendor/libgit2/src/commit_list.h +2 -2
  118. data/vendor/libgit2/src/common.h +91 -27
  119. data/vendor/libgit2/src/config.c +176 -194
  120. data/vendor/libgit2/src/config.h +20 -8
  121. data/vendor/libgit2/src/config_cache.c +35 -41
  122. data/vendor/libgit2/src/config_file.c +753 -439
  123. data/vendor/libgit2/src/config_file.h +73 -0
  124. data/vendor/libgit2/src/config_parse.c +63 -114
  125. data/vendor/libgit2/src/config_parse.h +16 -17
  126. data/vendor/libgit2/src/crlf.c +190 -219
  127. data/vendor/libgit2/src/delta.c +18 -25
  128. data/vendor/libgit2/src/describe.c +41 -42
  129. data/vendor/libgit2/src/diff.c +68 -53
  130. data/vendor/libgit2/src/diff.h +1 -2
  131. data/vendor/libgit2/src/diff_driver.c +49 -47
  132. data/vendor/libgit2/src/diff_file.c +17 -19
  133. data/vendor/libgit2/src/diff_file.h +1 -1
  134. data/vendor/libgit2/src/diff_generate.c +106 -162
  135. data/vendor/libgit2/src/diff_generate.h +3 -3
  136. data/vendor/libgit2/src/diff_parse.c +4 -4
  137. data/vendor/libgit2/src/diff_print.c +30 -42
  138. data/vendor/libgit2/src/diff_stats.c +7 -22
  139. data/vendor/libgit2/src/diff_tform.c +16 -16
  140. data/vendor/libgit2/src/diff_xdiff.c +3 -15
  141. data/vendor/libgit2/src/errors.c +39 -51
  142. data/vendor/libgit2/src/features.h.in +3 -11
  143. data/vendor/libgit2/src/fetch.c +5 -10
  144. data/vendor/libgit2/src/fetchhead.c +17 -17
  145. data/vendor/libgit2/src/filebuf.c +36 -32
  146. data/vendor/libgit2/src/filebuf.h +2 -2
  147. data/vendor/libgit2/src/{futils.c → fileops.c} +73 -80
  148. data/vendor/libgit2/src/{futils.h → fileops.h} +6 -6
  149. data/vendor/libgit2/src/filter.c +38 -46
  150. data/vendor/libgit2/src/filter.h +10 -0
  151. data/vendor/libgit2/src/fnmatch.c +248 -0
  152. data/vendor/libgit2/src/fnmatch.h +48 -0
  153. data/vendor/libgit2/src/global.c +63 -48
  154. data/vendor/libgit2/src/global.h +2 -0
  155. data/vendor/libgit2/src/hash.c +0 -61
  156. data/vendor/libgit2/src/hash.h +19 -20
  157. data/vendor/libgit2/src/hash/hash_collisiondetect.h +47 -0
  158. data/vendor/libgit2/src/hash/{sha1/common_crypto.c → hash_common_crypto.h} +17 -17
  159. data/vendor/libgit2/src/hash/{sha1/generic.c → hash_generic.c} +10 -22
  160. data/vendor/libgit2/src/hash/{sha1/generic.h → hash_generic.h} +10 -4
  161. data/vendor/libgit2/src/hash/hash_openssl.h +59 -0
  162. data/vendor/libgit2/src/hash/{sha1/win32.c → hash_win32.c} +37 -47
  163. data/vendor/libgit2/src/hash/{sha1/win32.h → hash_win32.h} +19 -6
  164. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.c +3 -14
  165. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/sha1.h +0 -0
  166. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.c +0 -0
  167. data/vendor/libgit2/src/hash/{sha1/sha1dc → sha1dc}/ubc_check.h +0 -0
  168. data/vendor/libgit2/src/hashsig.c +5 -5
  169. data/vendor/libgit2/src/idxmap.c +61 -107
  170. data/vendor/libgit2/src/idxmap.h +31 -153
  171. data/vendor/libgit2/src/ignore.c +47 -43
  172. data/vendor/libgit2/src/index.c +232 -337
  173. data/vendor/libgit2/src/index.h +1 -17
  174. data/vendor/libgit2/src/indexer.c +175 -346
  175. data/vendor/libgit2/src/integer.h +26 -71
  176. data/vendor/libgit2/src/iterator.c +70 -142
  177. data/vendor/libgit2/src/iterator.h +0 -15
  178. data/vendor/libgit2/src/khash.h +1 -3
  179. data/vendor/libgit2/src/map.h +1 -1
  180. data/vendor/libgit2/src/merge.c +100 -144
  181. data/vendor/libgit2/src/merge_driver.c +11 -11
  182. data/vendor/libgit2/src/merge_file.c +2 -2
  183. data/vendor/libgit2/src/mwindow.c +29 -24
  184. data/vendor/libgit2/src/mwindow.h +4 -4
  185. data/vendor/libgit2/src/netops.c +156 -55
  186. data/vendor/libgit2/src/netops.h +23 -3
  187. data/vendor/libgit2/src/notes.c +11 -16
  188. data/vendor/libgit2/src/object.c +69 -120
  189. data/vendor/libgit2/src/object.h +9 -22
  190. data/vendor/libgit2/src/object_api.c +8 -8
  191. data/vendor/libgit2/src/odb.c +93 -116
  192. data/vendor/libgit2/src/odb.h +7 -8
  193. data/vendor/libgit2/src/odb_loose.c +55 -62
  194. data/vendor/libgit2/src/odb_mempack.c +34 -21
  195. data/vendor/libgit2/src/odb_pack.c +14 -18
  196. data/vendor/libgit2/src/offmap.c +35 -53
  197. data/vendor/libgit2/src/offmap.h +21 -108
  198. data/vendor/libgit2/src/oid.c +7 -12
  199. data/vendor/libgit2/src/oidmap.c +47 -49
  200. data/vendor/libgit2/src/oidmap.h +24 -101
  201. data/vendor/libgit2/src/pack-objects.c +87 -88
  202. data/vendor/libgit2/src/pack-objects.h +8 -2
  203. data/vendor/libgit2/src/pack.c +101 -99
  204. data/vendor/libgit2/src/pack.h +19 -17
  205. data/vendor/libgit2/src/parse.c +0 -10
  206. data/vendor/libgit2/src/parse.h +3 -3
  207. data/vendor/libgit2/src/patch.c +4 -4
  208. data/vendor/libgit2/src/patch_generate.c +20 -20
  209. data/vendor/libgit2/src/patch_parse.c +63 -151
  210. data/vendor/libgit2/src/path.c +104 -117
  211. data/vendor/libgit2/src/path.h +71 -3
  212. data/vendor/libgit2/src/pathspec.c +19 -19
  213. data/vendor/libgit2/src/pool.c +22 -26
  214. data/vendor/libgit2/src/pool.h +7 -7
  215. data/vendor/libgit2/src/posix.c +10 -10
  216. data/vendor/libgit2/src/posix.h +1 -12
  217. data/vendor/libgit2/src/proxy.c +3 -8
  218. data/vendor/libgit2/src/push.c +31 -37
  219. data/vendor/libgit2/src/push.h +1 -2
  220. data/vendor/libgit2/src/rebase.c +59 -115
  221. data/vendor/libgit2/src/refdb.c +3 -15
  222. data/vendor/libgit2/src/refdb_fs.c +254 -381
  223. data/vendor/libgit2/src/reflog.c +15 -13
  224. data/vendor/libgit2/src/refs.c +88 -118
  225. data/vendor/libgit2/src/refs.h +3 -5
  226. data/vendor/libgit2/src/refspec.c +37 -56
  227. data/vendor/libgit2/src/refspec.h +1 -1
  228. data/vendor/libgit2/src/remote.c +215 -266
  229. data/vendor/libgit2/src/remote.h +2 -11
  230. data/vendor/libgit2/src/repository.c +225 -280
  231. data/vendor/libgit2/src/repository.h +40 -52
  232. data/vendor/libgit2/src/reset.c +8 -8
  233. data/vendor/libgit2/src/revert.c +9 -14
  234. data/vendor/libgit2/src/revparse.c +48 -47
  235. data/vendor/libgit2/src/revwalk.c +57 -120
  236. data/vendor/libgit2/src/revwalk.h +1 -22
  237. data/vendor/libgit2/src/settings.c +10 -47
  238. data/vendor/libgit2/src/signature.c +11 -11
  239. data/vendor/libgit2/src/sortedcache.c +36 -22
  240. data/vendor/libgit2/src/sortedcache.h +1 -1
  241. data/vendor/libgit2/src/stash.c +99 -125
  242. data/vendor/libgit2/src/status.c +22 -28
  243. data/vendor/libgit2/src/stream.h +2 -17
  244. data/vendor/libgit2/src/streams/curl.c +385 -0
  245. data/vendor/libgit2/src/{allocators/stdalloc.h → streams/curl.h} +5 -5
  246. data/vendor/libgit2/src/streams/openssl.c +114 -224
  247. data/vendor/libgit2/src/streams/openssl.h +108 -4
  248. data/vendor/libgit2/src/streams/socket.c +30 -55
  249. data/vendor/libgit2/src/streams/stransport.c +32 -57
  250. data/vendor/libgit2/src/streams/stransport.h +0 -5
  251. data/vendor/libgit2/src/streams/tls.c +19 -50
  252. data/vendor/libgit2/src/streams/tls.h +4 -12
  253. data/vendor/libgit2/src/strmap.c +74 -47
  254. data/vendor/libgit2/src/strmap.h +33 -108
  255. data/vendor/libgit2/src/submodule.c +216 -272
  256. data/vendor/libgit2/src/submodule.h +1 -1
  257. data/vendor/libgit2/src/sysdir.c +19 -29
  258. data/vendor/libgit2/src/tag.c +28 -41
  259. data/vendor/libgit2/src/tag.h +1 -2
  260. data/vendor/libgit2/src/trace.c +2 -2
  261. data/vendor/libgit2/src/trace.h +3 -3
  262. data/vendor/libgit2/src/trailer.c +38 -52
  263. data/vendor/libgit2/src/transaction.c +29 -30
  264. data/vendor/libgit2/src/transport.c +5 -5
  265. data/vendor/libgit2/src/transports/auth.c +11 -15
  266. data/vendor/libgit2/src/transports/auth.h +3 -10
  267. data/vendor/libgit2/src/transports/auth_negotiate.c +18 -33
  268. data/vendor/libgit2/src/transports/auth_negotiate.h +2 -2
  269. data/vendor/libgit2/src/transports/cred.c +24 -24
  270. data/vendor/libgit2/src/{allocators/win32_crtdbg.h → transports/cred.h} +4 -5
  271. data/vendor/libgit2/src/transports/git.c +31 -26
  272. data/vendor/libgit2/src/transports/http.c +348 -881
  273. data/vendor/libgit2/src/transports/http.h +0 -2
  274. data/vendor/libgit2/src/transports/local.c +35 -35
  275. data/vendor/libgit2/src/transports/smart.c +47 -70
  276. data/vendor/libgit2/src/transports/smart.h +4 -3
  277. data/vendor/libgit2/src/transports/smart_pkt.c +40 -43
  278. data/vendor/libgit2/src/transports/smart_protocol.c +116 -96
  279. data/vendor/libgit2/src/transports/ssh.c +66 -77
  280. data/vendor/libgit2/src/transports/winhttp.c +314 -318
  281. data/vendor/libgit2/src/tree-cache.c +12 -19
  282. data/vendor/libgit2/src/tree.c +142 -103
  283. data/vendor/libgit2/src/tree.h +12 -1
  284. data/vendor/libgit2/src/unix/map.c +3 -3
  285. data/vendor/libgit2/src/unix/posix.h +11 -1
  286. data/vendor/libgit2/src/userdiff.h +1 -3
  287. data/vendor/libgit2/src/util.c +56 -70
  288. data/vendor/libgit2/src/util.h +156 -28
  289. data/vendor/libgit2/src/vector.c +4 -4
  290. data/vendor/libgit2/src/win32/dir.c +3 -3
  291. data/vendor/libgit2/src/win32/findfile.c +3 -3
  292. data/vendor/libgit2/src/win32/map.c +11 -9
  293. data/vendor/libgit2/src/win32/msvc-compat.h +0 -6
  294. data/vendor/libgit2/src/win32/path_w32.c +9 -113
  295. data/vendor/libgit2/src/win32/path_w32.h +29 -18
  296. data/vendor/libgit2/src/win32/posix.h +4 -1
  297. data/vendor/libgit2/src/win32/posix_w32.c +45 -70
  298. data/vendor/libgit2/src/win32/precompiled.h +2 -0
  299. data/vendor/libgit2/src/win32/thread.c +10 -5
  300. data/vendor/libgit2/src/win32/w32_buffer.c +5 -9
  301. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +2 -3
  302. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +75 -26
  303. data/vendor/libgit2/src/win32/w32_stack.c +11 -6
  304. data/vendor/libgit2/src/win32/w32_stack.h +3 -3
  305. data/vendor/libgit2/src/win32/w32_util.c +64 -27
  306. data/vendor/libgit2/src/win32/w32_util.h +49 -5
  307. data/vendor/libgit2/src/worktree.c +60 -95
  308. data/vendor/libgit2/src/worktree.h +0 -2
  309. data/vendor/libgit2/src/xdiff/xdiffi.c +5 -7
  310. data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
  311. data/vendor/libgit2/src/xdiff/xmerge.c +15 -27
  312. data/vendor/libgit2/src/xdiff/xpatience.c +0 -3
  313. data/vendor/libgit2/src/zstream.c +4 -4
  314. metadata +33 -122
  315. data/vendor/libgit2/cmake/Modules/FindGSSFramework.cmake +0 -28
  316. data/vendor/libgit2/cmake/Modules/FindPCRE.cmake +0 -38
  317. data/vendor/libgit2/cmake/Modules/FindPCRE2.cmake +0 -37
  318. data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +0 -93
  319. data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +0 -110
  320. data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +0 -53
  321. data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +0 -124
  322. data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +0 -66
  323. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +0 -21
  324. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -33
  325. data/vendor/libgit2/deps/ntlmclient/crypt.h +0 -64
  326. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +0 -120
  327. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +0 -18
  328. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -145
  329. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +0 -18
  330. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +0 -130
  331. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +0 -21
  332. data/vendor/libgit2/deps/ntlmclient/ntlm.c +0 -1420
  333. data/vendor/libgit2/deps/ntlmclient/ntlm.h +0 -174
  334. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +0 -320
  335. data/vendor/libgit2/deps/ntlmclient/unicode.h +0 -36
  336. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +0 -445
  337. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +0 -201
  338. data/vendor/libgit2/deps/ntlmclient/utf8.h +0 -1257
  339. data/vendor/libgit2/deps/ntlmclient/util.c +0 -21
  340. data/vendor/libgit2/deps/ntlmclient/util.h +0 -14
  341. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
  342. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  343. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  344. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  345. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  346. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  347. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  348. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  349. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  350. data/vendor/libgit2/deps/pcre/pcre_chartables.c +0 -198
  351. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9800
  352. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  353. data/vendor/libgit2/deps/pcre/pcre_dfa_exec.c +0 -3676
  354. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  355. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  356. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  357. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  358. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  359. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  360. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  361. data/vendor/libgit2/deps/pcre/pcre_newline.c +0 -210
  362. data/vendor/libgit2/deps/pcre/pcre_ord2utf8.c +0 -94
  363. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  364. data/vendor/libgit2/deps/pcre/pcre_refcount.c +0 -92
  365. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  366. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  367. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  368. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  369. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  370. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  371. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  372. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -421
  373. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  374. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
  375. data/vendor/libgit2/deps/winhttp/COPYING.GPL +0 -993
  376. data/vendor/libgit2/deps/winhttp/COPYING.LGPL +0 -502
  377. data/vendor/libgit2/deps/zlib/COPYING +0 -27
  378. data/vendor/libgit2/include/git2/apply.h +0 -149
  379. data/vendor/libgit2/include/git2/cert.h +0 -135
  380. data/vendor/libgit2/include/git2/cred.h +0 -308
  381. data/vendor/libgit2/include/git2/deprecated.h +0 -493
  382. data/vendor/libgit2/include/git2/mailmap.h +0 -115
  383. data/vendor/libgit2/include/git2/sys/alloc.h +0 -101
  384. data/vendor/libgit2/include/git2/sys/cred.h +0 -90
  385. data/vendor/libgit2/include/git2/sys/path.h +0 -64
  386. data/vendor/libgit2/src/alloc.c +0 -43
  387. data/vendor/libgit2/src/alloc.h +0 -40
  388. data/vendor/libgit2/src/allocators/stdalloc.c +0 -119
  389. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  390. data/vendor/libgit2/src/config_backend.h +0 -96
  391. data/vendor/libgit2/src/config_entries.c +0 -229
  392. data/vendor/libgit2/src/config_entries.h +0 -24
  393. data/vendor/libgit2/src/config_mem.c +0 -220
  394. data/vendor/libgit2/src/config_snapshot.c +0 -206
  395. data/vendor/libgit2/src/errors.h +0 -81
  396. data/vendor/libgit2/src/hash/sha1.h +0 -38
  397. data/vendor/libgit2/src/hash/sha1/collisiondetect.c +0 -48
  398. data/vendor/libgit2/src/hash/sha1/collisiondetect.h +0 -19
  399. data/vendor/libgit2/src/hash/sha1/common_crypto.h +0 -19
  400. data/vendor/libgit2/src/hash/sha1/mbedtls.c +0 -46
  401. data/vendor/libgit2/src/hash/sha1/mbedtls.h +0 -19
  402. data/vendor/libgit2/src/hash/sha1/openssl.c +0 -59
  403. data/vendor/libgit2/src/hash/sha1/openssl.h +0 -19
  404. data/vendor/libgit2/src/mailmap.c +0 -485
  405. data/vendor/libgit2/src/mailmap.h +0 -35
  406. data/vendor/libgit2/src/net.c +0 -184
  407. data/vendor/libgit2/src/net.h +0 -36
  408. data/vendor/libgit2/src/reader.c +0 -265
  409. data/vendor/libgit2/src/reader.h +0 -107
  410. data/vendor/libgit2/src/regexp.c +0 -221
  411. data/vendor/libgit2/src/regexp.h +0 -97
  412. data/vendor/libgit2/src/streams/mbedtls.c +0 -483
  413. data/vendor/libgit2/src/streams/mbedtls.h +0 -23
  414. data/vendor/libgit2/src/streams/registry.c +0 -118
  415. data/vendor/libgit2/src/streams/registry.h +0 -19
  416. data/vendor/libgit2/src/transports/auth_ntlm.c +0 -223
  417. data/vendor/libgit2/src/transports/auth_ntlm.h +0 -35
  418. data/vendor/libgit2/src/wildmatch.c +0 -320
  419. data/vendor/libgit2/src/wildmatch.h +0 -23
  420. data/vendor/libgit2/src/win32/w32_common.h +0 -39
@@ -64,9 +64,8 @@ typedef enum {
64
64
  typedef struct git_config_entry {
65
65
  const char *name; /**< Name of the entry (normalised) */
66
66
  const char *value; /**< String value of the entry */
67
- unsigned int include_depth; /**< Depth of includes where this variable was found */
68
67
  git_config_level_t level; /**< Which config file this was found in */
69
- void GIT_CALLBACK(free)(struct git_config_entry *entry); /**< Free function for this entry */
68
+ void (*free)(struct git_config_entry *entry); /**< Free function for this entry */
70
69
  void *payload; /**< Opaque value for the free function. Do not read or write */
71
70
  } git_config_entry;
72
71
 
@@ -75,37 +74,27 @@ typedef struct git_config_entry {
75
74
  */
76
75
  GIT_EXTERN(void) git_config_entry_free(git_config_entry *);
77
76
 
78
- /**
79
- * A config enumeration callback
80
- *
81
- * @param entry the entry currently being enumerated
82
- * @param payload a user-specified pointer
83
- */
84
- typedef int GIT_CALLBACK(git_config_foreach_cb)(const git_config_entry *entry, void *payload);
85
-
86
- /**
87
- * An opaque structure for a configuration iterator
88
- */
77
+ typedef int (*git_config_foreach_cb)(const git_config_entry *, void *);
89
78
  typedef struct git_config_iterator git_config_iterator;
90
79
 
91
80
  /**
92
81
  * Config var type
93
82
  */
94
83
  typedef enum {
95
- GIT_CONFIGMAP_FALSE = 0,
96
- GIT_CONFIGMAP_TRUE = 1,
97
- GIT_CONFIGMAP_INT32,
98
- GIT_CONFIGMAP_STRING
99
- } git_configmap_t;
84
+ GIT_CVAR_FALSE = 0,
85
+ GIT_CVAR_TRUE = 1,
86
+ GIT_CVAR_INT32,
87
+ GIT_CVAR_STRING
88
+ } git_cvar_t;
100
89
 
101
90
  /**
102
91
  * Mapping from config variables to values.
103
92
  */
104
93
  typedef struct {
105
- git_configmap_t type;
94
+ git_cvar_t cvar_type;
106
95
  const char *str_match;
107
96
  int map_value;
108
- } git_configmap;
97
+ } git_cvar_map;
109
98
 
110
99
  /**
111
100
  * Locate the path to the global configuration file
@@ -262,7 +251,7 @@ GIT_EXTERN(int) git_config_open_level(
262
251
  * Open the global/XDG configuration file according to git's rules
263
252
  *
264
253
  * Git allows you to store your global configuration at
265
- * `$HOME/.gitconfig` or `$XDG_CONFIG_HOME/git/config`. For backwards
254
+ * `$HOME/.config` or `$XDG_CONFIG_HOME/git/config`. For backwards
266
255
  * compatability, the XDG file shouldn't be used unless the use has
267
256
  * created it explicitly. With this function you'll open the correct
268
257
  * one to write to.
@@ -591,7 +580,7 @@ GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const gi
591
580
  /**
592
581
  * Perform an operation on each config variable matching a regular expression.
593
582
  *
594
- * This behaves like `git_config_foreach` with an additional filter of a
583
+ * This behaviors like `git_config_foreach` with an additional filter of a
595
584
  * regular expression that filters which config keys are passed to the
596
585
  * callback.
597
586
  *
@@ -623,7 +612,7 @@ GIT_EXTERN(int) git_config_foreach_match(
623
612
  *
624
613
  * A mapping array looks as follows:
625
614
  *
626
- * git_configmap autocrlf_mapping[] = {
615
+ * git_cvar_map autocrlf_mapping[] = {
627
616
  * {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},
628
617
  * {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},
629
618
  * {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},
@@ -644,7 +633,7 @@ GIT_EXTERN(int) git_config_foreach_match(
644
633
  * @param out place to store the result of the mapping
645
634
  * @param cfg config file to get the variables from
646
635
  * @param name name of the config variable to lookup
647
- * @param maps array of `git_configmap` objects specifying the possible mappings
636
+ * @param maps array of `git_cvar_map` objects specifying the possible mappings
648
637
  * @param map_n number of mapping objects in `maps`
649
638
  * @return 0 on success, error code otherwise
650
639
  */
@@ -652,20 +641,20 @@ GIT_EXTERN(int) git_config_get_mapped(
652
641
  int *out,
653
642
  const git_config *cfg,
654
643
  const char *name,
655
- const git_configmap *maps,
644
+ const git_cvar_map *maps,
656
645
  size_t map_n);
657
646
 
658
647
  /**
659
648
  * Maps a string value to an integer constant
660
649
  *
661
650
  * @param out place to store the result of the parsing
662
- * @param maps array of `git_configmap` objects specifying the possible mappings
651
+ * @param maps array of `git_cvar_map` objects specifying the possible mappings
663
652
  * @param map_n number of mapping objects in `maps`
664
653
  * @param value value to parse
665
654
  */
666
655
  GIT_EXTERN(int) git_config_lookup_map_value(
667
656
  int *out,
668
- const git_configmap *maps,
657
+ const git_cvar_map *maps,
669
658
  size_t map_n,
670
659
  const char *value);
671
660
 
@@ -721,11 +710,11 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
721
710
  GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
722
711
 
723
712
  /**
724
- * Perform an operation on each config variable in a given config backend,
713
+ * Perform an operation on each config variable in given config backend
725
714
  * matching a regular expression.
726
715
  *
727
- * This behaves like `git_config_foreach_match` except that only config
728
- * entries from the given backend entry are enumerated.
716
+ * This behaviors like `git_config_foreach_match` except instead of all config
717
+ * entries it just enumerates through the given backend entry.
729
718
  *
730
719
  * The regular expression is applied case-sensitively on the normalized form of
731
720
  * the variable name: the section and variable parts are lower-cased. The
@@ -36,9 +36,10 @@ typedef enum {
36
36
  /**
37
37
  * Describe options structure
38
38
  *
39
- * Initialize with `GIT_DESCRIBE_OPTIONS_INIT`. Alternatively, you can
40
- * use `git_describe_options_init`.
39
+ * Initialize with `GIT_DESCRIBE_OPTIONS_INIT` macro to correctly set
40
+ * the `version` field. E.g.
41
41
  *
42
+ * git_describe_options opts = GIT_DESCRIBE_OPTIONS_INIT;
42
43
  */
43
44
  typedef struct git_describe_options {
44
45
  unsigned int version;
@@ -69,24 +70,10 @@ typedef struct git_describe_options {
69
70
  GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
70
71
  }
71
72
 
72
- /**
73
- * Initialize git_describe_options structure
74
- *
75
- * Initializes a `git_describe_options` with default values. Equivalent to creating
76
- * an instance with GIT_DESCRIBE_OPTIONS_INIT.
77
- *
78
- * @param opts The `git_describe_options` struct to initialize.
79
- * @param version The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`.
80
- * @return Zero on success; -1 on failure.
81
- */
82
- GIT_EXTERN(int) git_describe_options_init(git_describe_options *opts, unsigned int version);
73
+ GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version);
83
74
 
84
75
  /**
85
- * Describe format options structure
86
- *
87
- * Initialize with `GIT_DESCRIBE_FORMAT_OPTIONS_INIT`. Alternatively, you can
88
- * use `git_describe_format_options_init`.
89
- *
76
+ * Options for formatting the describe string
90
77
  */
91
78
  typedef struct {
92
79
  unsigned int version;
@@ -116,17 +103,7 @@ typedef struct {
116
103
  GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE, \
117
104
  }
118
105
 
119
- /**
120
- * Initialize git_describe_format_options structure
121
- *
122
- * Initializes a `git_describe_format_options` with default values. Equivalent to creating
123
- * an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.
124
- *
125
- * @param opts The `git_describe_format_options` struct to initialize.
126
- * @param version The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`.
127
- * @return Zero on success; -1 on failure.
128
- */
129
- GIT_EXTERN(int) git_describe_format_options_init(git_describe_format_options *opts, unsigned int version);
106
+ GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version);
130
107
 
131
108
  /**
132
109
  * A struct that stores the result of a describe operation.
@@ -141,7 +118,7 @@ typedef struct git_describe_result git_describe_result;
141
118
  * @param result pointer to store the result. You must free this once
142
119
  * you're done with it.
143
120
  * @param committish a committish to describe
144
- * @param opts the lookup options (or NULL for defaults)
121
+ * @param opts the lookup options
145
122
  */
146
123
  GIT_EXTERN(int) git_describe_commit(
147
124
  git_describe_result **result,
@@ -158,7 +135,7 @@ GIT_EXTERN(int) git_describe_commit(
158
135
  * @param out pointer to store the result. You must free this once
159
136
  * you're done with it.
160
137
  * @param repo the repository in which to perform the describe
161
- * @param opts the lookup options (or NULL for defaults)
138
+ * @param opts the lookup options
162
139
  */
163
140
  GIT_EXTERN(int) git_describe_workdir(
164
141
  git_describe_result **out,
@@ -171,7 +148,7 @@ GIT_EXTERN(int) git_describe_workdir(
171
148
  * @param out The buffer to store the result
172
149
  * @param result the result from `git_describe_commit()` or
173
150
  * `git_describe_workdir()`.
174
- * @param opts the formatting options (or NULL for defaults)
151
+ * @param opts the formatting options
175
152
  */
176
153
  GIT_EXTERN(int) git_describe_format(
177
154
  git_buf *out,
@@ -16,6 +16,50 @@
16
16
  /**
17
17
  * @file git2/diff.h
18
18
  * @brief Git tree and file differencing routines.
19
+ *
20
+ * Overview
21
+ * --------
22
+ *
23
+ * Calculating diffs is generally done in two phases: building a list of
24
+ * diffs then traversing it. This makes is easier to share logic across
25
+ * the various types of diffs (tree vs tree, workdir vs index, etc.), and
26
+ * also allows you to insert optional diff post-processing phases,
27
+ * such as rename detection, in between the steps. When you are done with
28
+ * a diff object, it must be freed.
29
+ *
30
+ * Terminology
31
+ * -----------
32
+ *
33
+ * To understand the diff APIs, you should know the following terms:
34
+ *
35
+ * - A `diff` represents the cumulative list of differences between two
36
+ * snapshots of a repository (possibly filtered by a set of file name
37
+ * patterns). This is the `git_diff` object.
38
+ *
39
+ * - A `delta` is a file pair with an old and new revision. The old version
40
+ * may be absent if the file was just created and the new version may be
41
+ * absent if the file was deleted. A diff is mostly just a list of deltas.
42
+ *
43
+ * - A `binary` file / delta is a file (or pair) for which no text diffs
44
+ * should be generated. A diff can contain delta entries that are
45
+ * binary, but no diff content will be output for those files. There is
46
+ * a base heuristic for binary detection and you can further tune the
47
+ * behavior with git attributes or diff flags and option settings.
48
+ *
49
+ * - A `hunk` is a span of modified lines in a delta along with some stable
50
+ * surrounding context. You can configure the amount of context and other
51
+ * properties of how hunks are generated. Each hunk also comes with a
52
+ * header that described where it starts and ends in both the old and new
53
+ * versions in the delta.
54
+ *
55
+ * - A `line` is a range of characters inside a hunk. It could be a context
56
+ * line (i.e. in both old and new versions), an added line (i.e. only in
57
+ * the new version), or a removed line (i.e. only in the old version).
58
+ * Unfortunately, we don't know anything about the encoding of data in the
59
+ * file being diffed, so we cannot tell you much about the line content.
60
+ * Line data will not be NUL-byte terminated, however, because it will be
61
+ * just a span of bytes inside the larger file.
62
+ *
19
63
  * @ingroup Git
20
64
  * @{
21
65
  */
@@ -119,7 +163,7 @@ typedef enum {
119
163
 
120
164
  /** Include unreadable files in the diff */
121
165
  GIT_DIFF_INCLUDE_UNREADABLE = (1u << 16),
122
-
166
+
123
167
  /** Include unreadable files in the diff */
124
168
  GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 17),
125
169
 
@@ -127,12 +171,6 @@ typedef enum {
127
171
  * Options controlling how output will be generated
128
172
  */
129
173
 
130
- /** Use a heuristic that takes indentation and whitespace into account
131
- * which generally can produce better diffs when dealing with ambiguous
132
- * diff hunks.
133
- */
134
- GIT_DIFF_INDENT_HEURISTIC = (1u << 18),
135
-
136
174
  /** Treat all files as text, disabling binary attributes & detection */
137
175
  GIT_DIFF_FORCE_TEXT = (1u << 20),
138
176
  /** Treat all files as binary, disabling text diffs */
@@ -168,27 +206,21 @@ typedef enum {
168
206
  * can apply given diff information to binary files.
169
207
  */
170
208
  GIT_DIFF_SHOW_BINARY = (1u << 30),
209
+
210
+ /** Use a heuristic that takes indentation and whitespace into account
211
+ * which generally can produce better diffs when dealing with ambiguous
212
+ * diff hunks.
213
+ */
214
+ GIT_DIFF_INDENT_HEURISTIC = (1u << 31),
171
215
  } git_diff_option_t;
172
216
 
173
217
  /**
174
218
  * The diff object that contains all individual file deltas.
175
219
  *
176
- * A `diff` represents the cumulative list of differences between two
177
- * snapshots of a repository (possibly filtered by a set of file name
178
- * patterns).
179
- *
180
- * Calculating diffs is generally done in two phases: building a list of
181
- * diffs then traversing it. This makes is easier to share logic across
182
- * the various types of diffs (tree vs tree, workdir vs index, etc.), and
183
- * also allows you to insert optional diff post-processing phases,
184
- * such as rename detection, in between the steps. When you are done with
185
- * a diff object, it must be freed.
186
- *
187
220
  * This is an opaque structure which will be allocated by one of the diff
188
- * generator functions below (such as `git_diff_tree_to_tree`). You are
221
+ * generator functions below (such as `git_diff_tree_to_tree`). You are
189
222
  * responsible for releasing the object memory when done, using the
190
223
  * `git_diff_free()` function.
191
- *
192
224
  */
193
225
  typedef struct git_diff git_diff;
194
226
 
@@ -258,21 +290,17 @@ typedef enum {
258
290
  * abbreviated to something reasonable, like 7 characters.
259
291
  */
260
292
  typedef struct {
261
- git_oid id;
262
- const char *path;
263
- git_object_size_t size;
264
- uint32_t flags;
265
- uint16_t mode;
266
- uint16_t id_abbrev;
293
+ git_oid id;
294
+ const char *path;
295
+ git_off_t size;
296
+ uint32_t flags;
297
+ uint16_t mode;
298
+ uint16_t id_abbrev;
267
299
  } git_diff_file;
268
300
 
269
301
  /**
270
302
  * Description of changes to one entry.
271
303
  *
272
- * A `delta` is a file pair with an old and new revision. The old version
273
- * may be absent if the file was just created and the new version may be
274
- * absent if the file was deleted. A diff is mostly just a list of deltas.
275
- *
276
304
  * When iterating over a diff, this will be passed to most callbacks and
277
305
  * you can use the contents to understand exactly what has changed.
278
306
  *
@@ -318,7 +346,7 @@ typedef struct {
318
346
  /**
319
347
  * Diff notification callback function.
320
348
  *
321
- * The callback will be called for each file, just before the `git_diff_delta`
349
+ * The callback will be called for each file, just before the `git_delta_t`
322
350
  * gets inserted into the diff.
323
351
  *
324
352
  * When the callback:
@@ -328,7 +356,7 @@ typedef struct {
328
356
  * - returns 0, the delta is inserted into the diff, and the diff process
329
357
  * continues.
330
358
  */
331
- typedef int GIT_CALLBACK(git_diff_notify_cb)(
359
+ typedef int (*git_diff_notify_cb)(
332
360
  const git_diff *diff_so_far,
333
361
  const git_diff_delta *delta_to_add,
334
362
  const char *matched_pathspec,
@@ -344,7 +372,7 @@ typedef int GIT_CALLBACK(git_diff_notify_cb)(
344
372
  * @param new_path The path to the new file or NULL.
345
373
  * @return Non-zero to abort the diff.
346
374
  */
347
- typedef int GIT_CALLBACK(git_diff_progress_cb)(
375
+ typedef int (*git_diff_progress_cb)(
348
376
  const git_diff *diff_so_far,
349
377
  const char *old_path,
350
378
  const char *new_path,
@@ -357,79 +385,46 @@ typedef int GIT_CALLBACK(git_diff_progress_cb)(
357
385
  * values. Similarly, passing NULL for the options structure will
358
386
  * give the defaults. The default values are marked below.
359
387
  *
388
+ * - `flags` is a combination of the `git_diff_option_t` values above
389
+ * - `context_lines` is the number of unchanged lines that define the
390
+ * boundary of a hunk (and to display before and after)
391
+ * - `interhunk_lines` is the maximum number of unchanged lines between
392
+ * hunk boundaries before the hunks will be merged into a one.
393
+ * - `old_prefix` is the virtual "directory" to prefix to old file names
394
+ * in hunk headers (default "a")
395
+ * - `new_prefix` is the virtual "directory" to prefix to new file names
396
+ * in hunk headers (default "b")
397
+ * - `pathspec` is an array of paths / fnmatch patterns to constrain diff
398
+ * - `max_size` is a file size (in bytes) above which a blob will be marked
399
+ * as binary automatically; pass a negative value to disable.
400
+ * - `notify_cb` is an optional callback function, notifying the consumer of
401
+ * changes to the diff as new deltas are added.
402
+ * - `progress_cb` is an optional callback function, notifying the consumer of
403
+ * which files are being examined as the diff is generated.
404
+ * - `payload` is the payload to pass to the callback functions.
405
+ * - `ignore_submodules` overrides the submodule ignore setting for all
406
+ * submodules in the diff.
360
407
  */
361
408
  typedef struct {
362
409
  unsigned int version; /**< version for the struct */
363
-
364
- /**
365
- * A combination of `git_diff_option_t` values above.
366
- * Defaults to GIT_DIFF_NORMAL
367
- */
368
- uint32_t flags;
410
+ uint32_t flags; /**< defaults to GIT_DIFF_NORMAL */
369
411
 
370
412
  /* options controlling which files are in the diff */
371
413
 
372
- /** Overrides the submodule ignore setting for all submodules in the diff. */
373
- git_submodule_ignore_t ignore_submodules;
374
-
375
- /**
376
- * An array of paths / fnmatch patterns to constrain diff.
377
- * All paths are included by default.
378
- */
379
- git_strarray pathspec;
380
-
381
- /**
382
- * An optional callback function, notifying the consumer of changes to
383
- * the diff as new deltas are added.
384
- */
414
+ git_submodule_ignore_t ignore_submodules; /**< submodule ignore rule */
415
+ git_strarray pathspec; /**< defaults to include all paths */
385
416
  git_diff_notify_cb notify_cb;
386
-
387
- /**
388
- * An optional callback function, notifying the consumer of which files
389
- * are being examined as the diff is generated.
390
- */
391
417
  git_diff_progress_cb progress_cb;
392
-
393
- /** The payload to pass to the callback functions. */
394
418
  void *payload;
395
419
 
396
420
  /* options controlling how to diff text is generated */
397
421
 
398
- /**
399
- * The number of unchanged lines that define the boundary of a hunk
400
- * (and to display before and after). Defaults to 3.
401
- */
402
- uint32_t context_lines;
403
- /**
404
- * The maximum number of unchanged lines between hunk boundaries before
405
- * the hunks will be merged into one. Defaults to 0.
406
- */
407
- uint32_t interhunk_lines;
408
-
409
- /**
410
- * The abbreviation length to use when formatting object ids.
411
- * Defaults to the value of 'core.abbrev' from the config, or 7 if unset.
412
- */
413
- uint16_t id_abbrev;
414
-
415
- /**
416
- * A size (in bytes) above which a blob will be marked as binary
417
- * automatically; pass a negative value to disable.
418
- * Defaults to 512MB.
419
- */
420
- git_off_t max_size;
421
-
422
- /**
423
- * The virtual "directory" prefix for old file names in hunk headers.
424
- * Default is "a".
425
- */
426
- const char *old_prefix;
427
-
428
- /**
429
- * The virtual "directory" prefix for new file names in hunk headers.
430
- * Defaults to "b".
431
- */
432
- const char *new_prefix;
422
+ uint32_t context_lines; /**< defaults to 3 */
423
+ uint32_t interhunk_lines; /**< defaults to 0 */
424
+ uint16_t id_abbrev; /**< default 'core.abbrev' or 7 if unset */
425
+ git_off_t max_size; /**< defaults to 512MB */
426
+ const char *old_prefix; /**< defaults to "a" */
427
+ const char *new_prefix; /**< defaults to "b" */
433
428
  } git_diff_options;
434
429
 
435
430
  /* The current version of the diff options structure */
@@ -442,16 +437,14 @@ typedef struct {
442
437
  {GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3}
443
438
 
444
439
  /**
445
- * Initialize git_diff_options structure
446
- *
447
- * Initializes a `git_diff_options` with default values. Equivalent to creating
448
- * an instance with GIT_DIFF_OPTIONS_INIT.
440
+ * Initializes a `git_diff_options` with default values. Equivalent to
441
+ * creating an instance with GIT_DIFF_OPTIONS_INIT.
449
442
  *
450
- * @param opts The `git_diff_options` struct to initialize.
451
- * @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`.
443
+ * @param opts The `git_diff_options` struct to initialize
444
+ * @param version Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`
452
445
  * @return Zero on success; -1 on failure.
453
446
  */
454
- GIT_EXTERN(int) git_diff_options_init(
447
+ GIT_EXTERN(int) git_diff_init_options(
455
448
  git_diff_options *opts,
456
449
  unsigned int version);
457
450
 
@@ -462,7 +455,7 @@ GIT_EXTERN(int) git_diff_options_init(
462
455
  * @param progress Goes from 0 to 1 over the diff
463
456
  * @param payload User-specified pointer from foreach function
464
457
  */
465
- typedef int GIT_CALLBACK(git_diff_file_cb)(
458
+ typedef int (*git_diff_file_cb)(
466
459
  const git_diff_delta *delta,
467
460
  float progress,
468
461
  void *payload);
@@ -501,21 +494,12 @@ typedef struct {
501
494
  size_t inflatedlen;
502
495
  } git_diff_binary_file;
503
496
 
504
- /**
505
- * Structure describing the binary contents of a diff.
506
- *
507
- * A `binary` file / delta is a file (or pair) for which no text diffs
508
- * should be generated. A diff can contain delta entries that are
509
- * binary, but no diff content will be output for those files. There is
510
- * a base heuristic for binary detection and you can further tune the
511
- * behavior with git attributes or diff flags and option settings.
512
- */
497
+ /** Structure describing the binary contents of a diff. */
513
498
  typedef struct {
514
499
  /**
515
- * Whether there is data in this binary structure or not.
516
- *
517
- * If this is `1`, then this was produced and included binary content.
518
- * If this is `0` then this was generated knowing only that a binary
500
+ * Whether there is data in this binary structure or not. If this
501
+ * is `1`, then this was produced and included binary content. If
502
+ * this is `0` then this was generated knowing only that a binary
519
503
  * file changed but without providing the data, probably from a patch
520
504
  * that said `Binary files a/file.txt and b/file.txt differ`.
521
505
  */
@@ -525,22 +509,16 @@ typedef struct {
525
509
  } git_diff_binary;
526
510
 
527
511
  /**
528
- * When iterating over a diff, callback that will be made for
529
- * binary content within the diff.
530
- */
531
- typedef int GIT_CALLBACK(git_diff_binary_cb)(
512
+ * When iterating over a diff, callback that will be made for
513
+ * binary content within the diff.
514
+ */
515
+ typedef int(*git_diff_binary_cb)(
532
516
  const git_diff_delta *delta,
533
517
  const git_diff_binary *binary,
534
518
  void *payload);
535
519
 
536
520
  /**
537
521
  * Structure describing a hunk of a diff.
538
- *
539
- * A `hunk` is a span of modified lines in a delta along with some stable
540
- * surrounding context. You can configure the amount of context and other
541
- * properties of how hunks are generated. Each hunk also comes with a
542
- * header that described where it starts and ends in both the old and new
543
- * versions in the delta.
544
522
  */
545
523
  typedef struct {
546
524
  int old_start; /**< Starting line number in old_file */
@@ -554,7 +532,7 @@ typedef struct {
554
532
  /**
555
533
  * When iterating over a diff, callback that will be made per hunk.
556
534
  */
557
- typedef int GIT_CALLBACK(git_diff_hunk_cb)(
535
+ typedef int (*git_diff_hunk_cb)(
558
536
  const git_diff_delta *delta,
559
537
  const git_diff_hunk *hunk,
560
538
  void *payload);
@@ -588,14 +566,6 @@ typedef enum {
588
566
 
589
567
  /**
590
568
  * Structure describing a line (or data span) of a diff.
591
- *
592
- * A `line` is a range of characters inside a hunk. It could be a context
593
- * line (i.e. in both old and new versions), an added line (i.e. only in
594
- * the new version), or a removed line (i.e. only in the old version).
595
- * Unfortunately, we don't know anything about the encoding of data in the
596
- * file being diffed, so we cannot tell you much about the line content.
597
- * Line data will not be NUL-byte terminated, however, because it will be
598
- * just a span of bytes inside the larger file.
599
569
  */
600
570
  typedef struct {
601
571
  char origin; /**< A git_diff_line_t value */
@@ -615,7 +585,7 @@ typedef struct {
615
585
  * of text. This uses some extra GIT_DIFF_LINE_... constants for output
616
586
  * of lines of file and hunk headers.
617
587
  */
618
- typedef int GIT_CALLBACK(git_diff_line_cb)(
588
+ typedef int (*git_diff_line_cb)(
619
589
  const git_diff_delta *delta, /**< delta that contains this data */
620
590
  const git_diff_hunk *hunk, /**< hunk containing this data */
621
591
  const git_diff_line *line, /**< line data */
@@ -699,14 +669,14 @@ typedef enum {
699
669
  * Pluggable similarity metric
700
670
  */
701
671
  typedef struct {
702
- int GIT_CALLBACK(file_signature)(
672
+ int (*file_signature)(
703
673
  void **out, const git_diff_file *file,
704
674
  const char *fullpath, void *payload);
705
- int GIT_CALLBACK(buffer_signature)(
675
+ int (*buffer_signature)(
706
676
  void **out, const git_diff_file *file,
707
677
  const char *buf, size_t buflen, void *payload);
708
- void GIT_CALLBACK(free_signature)(void *sig, void *payload);
709
- int GIT_CALLBACK(similarity)(int *score, void *siga, void *sigb, void *payload);
678
+ void (*free_signature)(void *sig, void *payload);
679
+ int (*similarity)(int *score, void *siga, void *sigb, void *payload);
710
680
  void *payload;
711
681
  } git_diff_similarity_metric;
712
682
 
@@ -714,6 +684,21 @@ typedef struct {
714
684
  * Control behavior of rename and copy detection
715
685
  *
716
686
  * These options mostly mimic parameters that can be passed to git-diff.
687
+ *
688
+ * - `rename_threshold` is the same as the -M option with a value
689
+ * - `copy_threshold` is the same as the -C option with a value
690
+ * - `rename_from_rewrite_threshold` matches the top of the -B option
691
+ * - `break_rewrite_threshold` matches the bottom of the -B option
692
+ * - `rename_limit` is the maximum number of matches to consider for
693
+ * a particular file. This is a little different from the `-l` option
694
+ * to regular Git because we will still process up to this many matches
695
+ * before abandoning the search.
696
+ *
697
+ * The `metric` option allows you to plug in a custom similarity metric.
698
+ * Set it to NULL for the default internal metric which is based on sampling
699
+ * hashes of ranges of data in the file. The default metric is a pretty
700
+ * good similarity approximation that should work fairly well for both text
701
+ * and binary data, and is pretty fast with fixed memory overhead.
717
702
  */
718
703
  typedef struct {
719
704
  unsigned int version;
@@ -725,49 +710,21 @@ typedef struct {
725
710
  */
726
711
  uint32_t flags;
727
712
 
728
- /**
729
- * Threshold above which similar files will be considered renames.
730
- * This is equivalent to the -M option. Defaults to 50.
731
- */
713
+ /** Similarity to consider a file renamed (default 50) */
732
714
  uint16_t rename_threshold;
733
-
734
- /**
735
- * Threshold below which similar files will be eligible to be a rename source.
736
- * This is equivalent to the first part of the -B option. Defaults to 50.
737
- */
715
+ /** Similarity of modified to be eligible rename source (default 50) */
738
716
  uint16_t rename_from_rewrite_threshold;
739
-
740
- /**
741
- * Threshold above which similar files will be considered copies.
742
- * This is equivalent to the -C option. Defaults to 50.
743
- */
717
+ /** Similarity to consider a file a copy (default 50) */
744
718
  uint16_t copy_threshold;
745
-
746
- /**
747
- * Treshold below which similar files will be split into a delete/add pair.
748
- * This is equivalent to the last part of the -B option. Defaults to 60.
749
- */
719
+ /** Similarity to split modify into delete/add pair (default 60) */
750
720
  uint16_t break_rewrite_threshold;
751
721
 
752
- /**
753
- * Maximum number of matches to consider for a particular file.
754
- *
755
- * This is a little different from the `-l` option from Git because we
756
- * will still process up to this many matches before abandoning the search.
757
- * Defaults to 200.
722
+ /** Maximum similarity sources to examine for a file (somewhat like
723
+ * git-diff's `-l` option or `diff.renameLimit` config) (default 200)
758
724
  */
759
725
  size_t rename_limit;
760
726
 
761
- /**
762
- * The `metric` option allows you to plug in a custom similarity metric.
763
- *
764
- * Set it to NULL to use the default internal metric.
765
- *
766
- * The default metric is based on sampling hashes of ranges of data in
767
- * the file, which is a pretty good similarity approximation that should
768
- * work fairly well for both text and binary data while still being
769
- * pretty fast with a fixed memory overhead.
770
- */
727
+ /** Pluggable similarity metric; pass NULL to use internal metric */
771
728
  git_diff_similarity_metric *metric;
772
729
  } git_diff_find_options;
773
730
 
@@ -775,16 +732,14 @@ typedef struct {
775
732
  #define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
776
733
 
777
734
  /**
778
- * Initialize git_diff_find_options structure
779
- *
780
- * Initializes a `git_diff_find_options` with default values. Equivalent to creating
781
- * an instance with GIT_DIFF_FIND_OPTIONS_INIT.
735
+ * Initializes a `git_diff_find_options` with default values. Equivalent to
736
+ * creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
782
737
  *
783
- * @param opts The `git_diff_find_options` struct to initialize.
784
- * @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`.
738
+ * @param opts The `git_diff_find_options` struct to initialize
739
+ * @param version Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`
785
740
  * @return Zero on success; -1 on failure.
786
741
  */
787
- GIT_EXTERN(int) git_diff_find_options_init(
742
+ GIT_EXTERN(int) git_diff_find_init_options(
788
743
  git_diff_find_options *opts,
789
744
  unsigned int version);
790
745
 
@@ -823,7 +778,7 @@ GIT_EXTERN(int) git_diff_tree_to_tree(
823
778
  git_repository *repo,
824
779
  git_tree *old_tree,
825
780
  git_tree *new_tree,
826
- const git_diff_options *opts);
781
+ const git_diff_options *opts); /**< can be NULL for defaults */
827
782
 
828
783
  /**
829
784
  * Create a diff between a tree and repository index.
@@ -849,7 +804,7 @@ GIT_EXTERN(int) git_diff_tree_to_index(
849
804
  git_repository *repo,
850
805
  git_tree *old_tree,
851
806
  git_index *index,
852
- const git_diff_options *opts);
807
+ const git_diff_options *opts); /**< can be NULL for defaults */
853
808
 
854
809
  /**
855
810
  * Create a diff between the repository index and the workdir directory.
@@ -875,7 +830,7 @@ GIT_EXTERN(int) git_diff_index_to_workdir(
875
830
  git_diff **diff,
876
831
  git_repository *repo,
877
832
  git_index *index,
878
- const git_diff_options *opts);
833
+ const git_diff_options *opts); /**< can be NULL for defaults */
879
834
 
880
835
  /**
881
836
  * Create a diff between a tree and the working directory.
@@ -904,7 +859,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir(
904
859
  git_diff **diff,
905
860
  git_repository *repo,
906
861
  git_tree *old_tree,
907
- const git_diff_options *opts);
862
+ const git_diff_options *opts); /**< can be NULL for defaults */
908
863
 
909
864
  /**
910
865
  * Create a diff between a tree and the working directory using index data
@@ -923,7 +878,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
923
878
  git_diff **diff,
924
879
  git_repository *repo,
925
880
  git_tree *old_tree,
926
- const git_diff_options *opts);
881
+ const git_diff_options *opts); /**< can be NULL for defaults */
927
882
 
928
883
  /**
929
884
  * Create a diff with the difference between two index objects.
@@ -942,7 +897,7 @@ GIT_EXTERN(int) git_diff_index_to_index(
942
897
  git_repository *repo,
943
898
  git_index *old_index,
944
899
  git_index *new_index,
945
- const git_diff_options *opts);
900
+ const git_diff_options *opts); /**< can be NULL for defaults */
946
901
 
947
902
  /**
948
903
  * Merge one diff into another.
@@ -1093,7 +1048,6 @@ typedef enum {
1093
1048
  GIT_DIFF_FORMAT_RAW = 3u, /**< like git diff --raw */
1094
1049
  GIT_DIFF_FORMAT_NAME_ONLY = 4u, /**< like git diff --name-only */
1095
1050
  GIT_DIFF_FORMAT_NAME_STATUS = 5u, /**< like git diff --name-status */
1096
- GIT_DIFF_FORMAT_PATCH_ID = 6u, /**< git diff as used by git patch-id */
1097
1051
  } git_diff_format_t;
1098
1052
 
1099
1053
  /**
@@ -1379,8 +1333,7 @@ typedef enum {
1379
1333
  typedef struct {
1380
1334
  unsigned int version;
1381
1335
 
1382
- /** see `git_diff_format_email_flags_t` above */
1383
- uint32_t flags;
1336
+ git_diff_format_email_flags_t flags;
1384
1337
 
1385
1338
  /** This patch number */
1386
1339
  size_t patch_no;
@@ -1437,29 +1390,27 @@ GIT_EXTERN(int) git_diff_commit_as_email(
1437
1390
  git_commit *commit,
1438
1391
  size_t patch_no,
1439
1392
  size_t total_patches,
1440
- uint32_t flags,
1393
+ git_diff_format_email_flags_t flags,
1441
1394
  const git_diff_options *diff_opts);
1442
1395
 
1443
1396
  /**
1444
- * Initialize git_diff_format_email_options structure
1397
+ * Initializes a `git_diff_format_email_options` with default values.
1445
1398
  *
1446
- * Initializes a `git_diff_format_email_options` with default values. Equivalent
1447
- * to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1399
+ * Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1448
1400
  *
1449
- * @param opts The `git_blame_options` struct to initialize.
1450
- * @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
1401
+ * @param opts The `git_diff_format_email_options` struct to initialize
1402
+ * @param version Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`
1451
1403
  * @return Zero on success; -1 on failure.
1452
1404
  */
1453
- GIT_EXTERN(int) git_diff_format_email_options_init(
1405
+ GIT_EXTERN(int) git_diff_format_email_init_options(
1454
1406
  git_diff_format_email_options *opts,
1455
1407
  unsigned int version);
1456
1408
 
1457
1409
  /**
1458
1410
  * Patch ID options structure
1459
1411
  *
1460
- * Initialize with `GIT_PATCHID_OPTIONS_INIT`. Alternatively, you can
1461
- * use `git_diff_patchid_options_init`.
1462
- *
1412
+ * Initialize with `GIT_DIFF_PATCHID_OPTIONS_INIT` macro to
1413
+ * correctly set the default values and version.
1463
1414
  */
1464
1415
  typedef struct git_diff_patchid_options {
1465
1416
  unsigned int version;
@@ -1469,16 +1420,12 @@ typedef struct git_diff_patchid_options {
1469
1420
  #define GIT_DIFF_PATCHID_OPTIONS_INIT { GIT_DIFF_PATCHID_OPTIONS_VERSION }
1470
1421
 
1471
1422
  /**
1472
- * Initialize git_diff_patchid_options structure
1423
+ * Initialize `git_diff_patchid_options` structure.
1473
1424
  *
1474
- * Initializes a `git_diff_patchid_options` with default values. Equivalent to
1425
+ * Initializes the structure with default values. Equivalent to
1475
1426
  * creating an instance with `GIT_DIFF_PATCHID_OPTIONS_INIT`.
1476
- *
1477
- * @param opts The `git_diff_patchid_options` struct to initialize.
1478
- * @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`.
1479
- * @return Zero on success; -1 on failure.
1480
1427
  */
1481
- GIT_EXTERN(int) git_diff_patchid_options_init(
1428
+ GIT_EXTERN(int) git_diff_patchid_init_options(
1482
1429
  git_diff_patchid_options *opts,
1483
1430
  unsigned int version);
1484
1431
 
@@ -1494,7 +1441,8 @@ GIT_EXTERN(int) git_diff_patchid_options_init(
1494
1441
  * defined in git-patch-id(1), and should in fact generate the
1495
1442
  * same IDs as the upstream git project does.
1496
1443
  *
1497
- * @param out Pointer where the calculated patch ID should be stored
1444
+ * @param out Pointer where the calculated patch ID shoul be
1445
+ * stored
1498
1446
  * @param diff The diff to calculate the ID for
1499
1447
  * @param opts Options for how to calculate the patch ID. This is
1500
1448
  * intended for future changes, as currently no options are