rugged 1.6.3 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/rugged_allocator.c +0 -54
  3. data/lib/rugged/version.rb +1 -1
  4. data/vendor/libgit2/AUTHORS +1 -0
  5. data/vendor/libgit2/CMakeLists.txt +25 -17
  6. data/vendor/libgit2/COPYING +195 -1
  7. data/vendor/libgit2/cmake/CheckPrototypeDefinitionSafe.cmake +16 -0
  8. data/vendor/libgit2/cmake/{FindIconv.cmake → FindIntlIconv.cmake} +6 -0
  9. data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
  10. data/vendor/libgit2/cmake/SelectGSSAPI.cmake +4 -4
  11. data/vendor/libgit2/cmake/SelectHTTPParser.cmake +23 -8
  12. data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +34 -6
  13. data/vendor/libgit2/cmake/SelectHashes.cmake +32 -11
  14. data/vendor/libgit2/cmake/SelectRegex.cmake +6 -1
  15. data/vendor/libgit2/cmake/SelectSSH.cmake +22 -17
  16. data/vendor/libgit2/cmake/SelectXdiff.cmake +9 -0
  17. data/vendor/libgit2/cmake/SelectZlib.cmake +4 -0
  18. data/vendor/libgit2/deps/llhttp/CMakeLists.txt +8 -0
  19. data/vendor/libgit2/deps/llhttp/LICENSE-MIT +22 -0
  20. data/vendor/libgit2/deps/llhttp/api.c +510 -0
  21. data/vendor/libgit2/deps/llhttp/http.c +170 -0
  22. data/vendor/libgit2/deps/llhttp/llhttp.c +10168 -0
  23. data/vendor/libgit2/deps/llhttp/llhttp.h +897 -0
  24. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +1 -1
  25. data/vendor/libgit2/deps/ntlmclient/crypt_builtin_md4.c +311 -0
  26. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +2 -1
  27. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -20
  28. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +4 -4
  29. data/vendor/libgit2/deps/ntlmclient/ntlm.c +21 -21
  30. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +5 -4
  31. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +2 -1
  32. data/vendor/libgit2/deps/ntlmclient/utf8.h +1176 -721
  33. data/vendor/libgit2/deps/ntlmclient/util.h +11 -0
  34. data/vendor/libgit2/deps/pcre/CMakeLists.txt +1 -0
  35. data/vendor/libgit2/deps/pcre/LICENCE +5 -5
  36. data/vendor/libgit2/deps/pcre/pcre.h +2 -2
  37. data/vendor/libgit2/deps/pcre/pcre_compile.c +6 -3
  38. data/vendor/libgit2/deps/pcre/pcre_exec.c +2 -2
  39. data/vendor/libgit2/deps/xdiff/CMakeLists.txt +28 -0
  40. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/git-xdiff.h +4 -1
  41. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiffi.c +19 -18
  42. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiffi.h +2 -4
  43. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xemit.c +3 -3
  44. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xhistogram.c +7 -18
  45. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xmacros.h +18 -1
  46. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xmerge.c +22 -20
  47. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xpatience.c +21 -30
  48. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xprepare.c +13 -30
  49. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xutils.c +18 -1
  50. data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xutils.h +2 -1
  51. data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
  52. data/vendor/libgit2/deps/zlib/LICENSE +22 -0
  53. data/vendor/libgit2/deps/zlib/adler32.c +5 -27
  54. data/vendor/libgit2/deps/zlib/crc32.c +94 -167
  55. data/vendor/libgit2/deps/zlib/deflate.c +358 -435
  56. data/vendor/libgit2/deps/zlib/deflate.h +41 -10
  57. data/vendor/libgit2/deps/zlib/gzguts.h +13 -18
  58. data/vendor/libgit2/deps/zlib/infback.c +17 -30
  59. data/vendor/libgit2/deps/zlib/inffast.c +1 -4
  60. data/vendor/libgit2/deps/zlib/inffast.h +1 -1
  61. data/vendor/libgit2/deps/zlib/inflate.c +36 -102
  62. data/vendor/libgit2/deps/zlib/inftrees.c +6 -11
  63. data/vendor/libgit2/deps/zlib/inftrees.h +6 -6
  64. data/vendor/libgit2/deps/zlib/trees.c +287 -352
  65. data/vendor/libgit2/deps/zlib/zconf.h +23 -14
  66. data/vendor/libgit2/deps/zlib/zlib.h +202 -202
  67. data/vendor/libgit2/deps/zlib/zutil.c +18 -44
  68. data/vendor/libgit2/deps/zlib/zutil.h +13 -33
  69. data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
  70. data/vendor/libgit2/include/git2/apply.h +27 -6
  71. data/vendor/libgit2/include/git2/attr.h +17 -4
  72. data/vendor/libgit2/include/git2/blame.h +133 -28
  73. data/vendor/libgit2/include/git2/blob.h +71 -28
  74. data/vendor/libgit2/include/git2/branch.h +22 -15
  75. data/vendor/libgit2/include/git2/buffer.h +6 -4
  76. data/vendor/libgit2/include/git2/cert.h +2 -1
  77. data/vendor/libgit2/include/git2/checkout.h +83 -32
  78. data/vendor/libgit2/include/git2/cherrypick.h +10 -3
  79. data/vendor/libgit2/include/git2/clone.h +25 -9
  80. data/vendor/libgit2/include/git2/commit.h +132 -3
  81. data/vendor/libgit2/include/git2/common.h +138 -56
  82. data/vendor/libgit2/include/git2/config.h +93 -23
  83. data/vendor/libgit2/include/git2/credential.h +30 -2
  84. data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
  85. data/vendor/libgit2/include/git2/deprecated.h +133 -3
  86. data/vendor/libgit2/include/git2/describe.h +13 -1
  87. data/vendor/libgit2/include/git2/diff.h +77 -9
  88. data/vendor/libgit2/include/git2/email.h +9 -29
  89. data/vendor/libgit2/include/git2/errors.h +49 -74
  90. data/vendor/libgit2/include/git2/filter.h +14 -7
  91. data/vendor/libgit2/include/git2/global.h +8 -1
  92. data/vendor/libgit2/include/git2/graph.h +3 -2
  93. data/vendor/libgit2/include/git2/ignore.h +10 -0
  94. data/vendor/libgit2/include/git2/index.h +100 -6
  95. data/vendor/libgit2/include/git2/indexer.h +21 -4
  96. data/vendor/libgit2/include/git2/mailmap.h +7 -1
  97. data/vendor/libgit2/include/git2/merge.h +46 -1
  98. data/vendor/libgit2/include/git2/message.h +2 -2
  99. data/vendor/libgit2/include/git2/net.h +3 -1
  100. data/vendor/libgit2/include/git2/notes.h +9 -6
  101. data/vendor/libgit2/include/git2/object.h +9 -8
  102. data/vendor/libgit2/include/git2/odb.h +91 -49
  103. data/vendor/libgit2/include/git2/odb_backend.h +80 -52
  104. data/vendor/libgit2/include/git2/oid.h +24 -25
  105. data/vendor/libgit2/include/git2/oidarray.h +7 -1
  106. data/vendor/libgit2/include/git2/pack.h +13 -1
  107. data/vendor/libgit2/include/git2/patch.h +2 -3
  108. data/vendor/libgit2/include/git2/pathspec.h +9 -0
  109. data/vendor/libgit2/include/git2/proxy.h +10 -0
  110. data/vendor/libgit2/include/git2/rebase.h +9 -6
  111. data/vendor/libgit2/include/git2/refdb.h +2 -2
  112. data/vendor/libgit2/include/git2/reflog.h +3 -2
  113. data/vendor/libgit2/include/git2/refs.h +9 -6
  114. data/vendor/libgit2/include/git2/refspec.h +14 -4
  115. data/vendor/libgit2/include/git2/remote.h +112 -18
  116. data/vendor/libgit2/include/git2/repository.h +61 -15
  117. data/vendor/libgit2/include/git2/reset.h +16 -3
  118. data/vendor/libgit2/include/git2/revert.h +9 -4
  119. data/vendor/libgit2/include/git2/revparse.h +3 -3
  120. data/vendor/libgit2/include/git2/revwalk.h +3 -2
  121. data/vendor/libgit2/include/git2/signature.h +46 -1
  122. data/vendor/libgit2/include/git2/stash.h +17 -3
  123. data/vendor/libgit2/include/git2/status.h +10 -6
  124. data/vendor/libgit2/include/git2/stdint.h +87 -85
  125. data/vendor/libgit2/include/git2/strarray.h +2 -3
  126. data/vendor/libgit2/include/git2/submodule.h +20 -9
  127. data/vendor/libgit2/include/git2/sys/alloc.h +12 -34
  128. data/vendor/libgit2/include/git2/sys/commit.h +77 -3
  129. data/vendor/libgit2/include/git2/sys/commit_graph.h +109 -58
  130. data/vendor/libgit2/include/git2/sys/config.h +80 -4
  131. data/vendor/libgit2/include/git2/sys/credential.h +4 -3
  132. data/vendor/libgit2/include/git2/sys/diff.h +21 -1
  133. data/vendor/libgit2/include/git2/sys/email.h +7 -0
  134. data/vendor/libgit2/include/git2/sys/errors.h +76 -0
  135. data/vendor/libgit2/include/git2/sys/filter.h +66 -3
  136. data/vendor/libgit2/include/git2/sys/hashsig.h +11 -0
  137. data/vendor/libgit2/include/git2/sys/index.h +3 -2
  138. data/vendor/libgit2/include/git2/sys/mempack.h +32 -2
  139. data/vendor/libgit2/include/git2/sys/merge.h +55 -7
  140. data/vendor/libgit2/include/git2/sys/midx.h +47 -4
  141. data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -3
  142. data/vendor/libgit2/include/git2/sys/openssl.h +8 -1
  143. data/vendor/libgit2/include/git2/sys/path.h +12 -1
  144. data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -36
  145. data/vendor/libgit2/include/git2/sys/refs.h +3 -2
  146. data/vendor/libgit2/include/git2/sys/remote.h +8 -1
  147. data/vendor/libgit2/include/git2/sys/repository.h +63 -3
  148. data/vendor/libgit2/include/git2/sys/stream.h +25 -2
  149. data/vendor/libgit2/include/git2/sys/transport.h +44 -5
  150. data/vendor/libgit2/include/git2/tag.h +3 -1
  151. data/vendor/libgit2/include/git2/trace.h +9 -3
  152. data/vendor/libgit2/include/git2/transaction.h +3 -2
  153. data/vendor/libgit2/include/git2/transport.h +11 -3
  154. data/vendor/libgit2/include/git2/tree.h +16 -5
  155. data/vendor/libgit2/include/git2/types.h +19 -3
  156. data/vendor/libgit2/include/git2/version.h +44 -8
  157. data/vendor/libgit2/include/git2/worktree.h +19 -7
  158. data/vendor/libgit2/src/CMakeLists.txt +40 -15
  159. data/vendor/libgit2/src/cli/CMakeLists.txt +2 -2
  160. data/vendor/libgit2/src/cli/cmd.c +1 -1
  161. data/vendor/libgit2/src/cli/cmd.h +4 -0
  162. data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
  163. data/vendor/libgit2/src/cli/cmd_cat_file.c +6 -8
  164. data/vendor/libgit2/src/cli/cmd_clone.c +27 -13
  165. data/vendor/libgit2/src/cli/cmd_config.c +241 -0
  166. data/vendor/libgit2/src/cli/cmd_hash_object.c +6 -8
  167. data/vendor/libgit2/src/cli/cmd_help.c +6 -7
  168. data/vendor/libgit2/src/cli/cmd_index_pack.c +114 -0
  169. data/vendor/libgit2/src/cli/cmd_init.c +102 -0
  170. data/vendor/libgit2/src/cli/common.c +168 -0
  171. data/vendor/libgit2/src/cli/common.h +63 -0
  172. data/vendor/libgit2/src/cli/error.h +1 -1
  173. data/vendor/libgit2/src/cli/main.c +52 -24
  174. data/vendor/libgit2/src/cli/opt.c +29 -3
  175. data/vendor/libgit2/src/cli/opt.h +21 -3
  176. data/vendor/libgit2/src/cli/opt_usage.c +102 -33
  177. data/vendor/libgit2/src/cli/opt_usage.h +6 -1
  178. data/vendor/libgit2/src/cli/progress.c +60 -10
  179. data/vendor/libgit2/src/cli/progress.h +16 -4
  180. data/vendor/libgit2/src/cli/unix/sighandler.c +2 -1
  181. data/vendor/libgit2/src/cli/win32/precompiled.h +1 -1
  182. data/vendor/libgit2/src/cli/win32/sighandler.c +1 -1
  183. data/vendor/libgit2/src/libgit2/CMakeLists.txt +27 -27
  184. data/vendor/libgit2/src/libgit2/annotated_commit.c +2 -2
  185. data/vendor/libgit2/src/libgit2/annotated_commit.h +1 -1
  186. data/vendor/libgit2/src/libgit2/apply.c +14 -16
  187. data/vendor/libgit2/src/libgit2/attr.c +30 -13
  188. data/vendor/libgit2/src/libgit2/attr_file.c +7 -2
  189. data/vendor/libgit2/src/libgit2/attr_file.h +2 -0
  190. data/vendor/libgit2/src/libgit2/attrcache.c +69 -33
  191. data/vendor/libgit2/src/libgit2/attrcache.h +5 -9
  192. data/vendor/libgit2/src/libgit2/blame.c +152 -59
  193. data/vendor/libgit2/src/libgit2/blame.h +1 -0
  194. data/vendor/libgit2/src/libgit2/blame_git.c +0 -1
  195. data/vendor/libgit2/src/libgit2/branch.c +2 -2
  196. data/vendor/libgit2/src/libgit2/cache.c +22 -17
  197. data/vendor/libgit2/src/libgit2/cache.h +7 -9
  198. data/vendor/libgit2/src/libgit2/checkout.c +34 -24
  199. data/vendor/libgit2/src/libgit2/checkout.h +0 -2
  200. data/vendor/libgit2/src/libgit2/cherrypick.c +4 -5
  201. data/vendor/libgit2/src/libgit2/clone.c +186 -164
  202. data/vendor/libgit2/src/libgit2/clone.h +4 -1
  203. data/vendor/libgit2/src/libgit2/commit.c +123 -9
  204. data/vendor/libgit2/src/libgit2/commit_graph.c +166 -88
  205. data/vendor/libgit2/src/libgit2/commit_graph.h +21 -6
  206. data/vendor/libgit2/src/libgit2/commit_list.c +12 -5
  207. data/vendor/libgit2/src/libgit2/commit_list.h +1 -0
  208. data/vendor/libgit2/src/libgit2/config.c +394 -300
  209. data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
  210. data/vendor/libgit2/src/libgit2/config.h +9 -4
  211. data/vendor/libgit2/src/libgit2/config_backend.h +8 -10
  212. data/vendor/libgit2/src/libgit2/config_cache.c +4 -5
  213. data/vendor/libgit2/src/libgit2/config_file.c +113 -96
  214. data/vendor/libgit2/src/libgit2/config_list.c +285 -0
  215. data/vendor/libgit2/src/libgit2/config_list.h +32 -0
  216. data/vendor/libgit2/src/libgit2/config_mem.c +194 -40
  217. data/vendor/libgit2/src/libgit2/config_parse.c +10 -9
  218. data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
  219. data/vendor/libgit2/src/libgit2/describe.c +34 -31
  220. data/vendor/libgit2/src/libgit2/diff.c +17 -8
  221. data/vendor/libgit2/src/libgit2/diff.h +6 -6
  222. data/vendor/libgit2/src/libgit2/diff_driver.c +12 -19
  223. data/vendor/libgit2/src/libgit2/diff_driver.h +2 -2
  224. data/vendor/libgit2/src/libgit2/diff_file.c +7 -7
  225. data/vendor/libgit2/src/libgit2/diff_generate.c +39 -18
  226. data/vendor/libgit2/src/libgit2/diff_parse.c +22 -6
  227. data/vendor/libgit2/src/libgit2/diff_print.c +88 -13
  228. data/vendor/libgit2/src/libgit2/diff_tform.c +40 -12
  229. data/vendor/libgit2/src/libgit2/diff_xdiff.h +1 -1
  230. data/vendor/libgit2/src/libgit2/email.c +5 -3
  231. data/vendor/libgit2/src/libgit2/fetch.c +39 -9
  232. data/vendor/libgit2/src/libgit2/fetch.h +0 -2
  233. data/vendor/libgit2/src/libgit2/fetchhead.c +11 -9
  234. data/vendor/libgit2/src/libgit2/filter.c +5 -5
  235. data/vendor/libgit2/src/libgit2/git2.rc +3 -3
  236. data/vendor/libgit2/src/libgit2/grafts.c +270 -0
  237. data/vendor/libgit2/src/libgit2/grafts.h +35 -0
  238. data/vendor/libgit2/src/libgit2/graph.c +1 -1
  239. data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
  240. data/vendor/libgit2/src/libgit2/ident.c +3 -3
  241. data/vendor/libgit2/src/libgit2/ignore.c +9 -5
  242. data/vendor/libgit2/src/libgit2/index.c +392 -208
  243. data/vendor/libgit2/src/libgit2/index.h +16 -3
  244. data/vendor/libgit2/src/libgit2/index_map.c +95 -0
  245. data/vendor/libgit2/src/libgit2/index_map.h +28 -0
  246. data/vendor/libgit2/src/libgit2/indexer.c +44 -41
  247. data/vendor/libgit2/src/libgit2/iterator.c +34 -13
  248. data/vendor/libgit2/src/libgit2/iterator.h +3 -0
  249. data/vendor/libgit2/src/libgit2/libgit2.c +155 -331
  250. data/vendor/libgit2/src/libgit2/mailmap.c +1 -1
  251. data/vendor/libgit2/src/libgit2/merge.c +56 -46
  252. data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
  253. data/vendor/libgit2/src/libgit2/merge_file.c +0 -2
  254. data/vendor/libgit2/src/libgit2/midx.c +86 -44
  255. data/vendor/libgit2/src/libgit2/midx.h +13 -3
  256. data/vendor/libgit2/src/libgit2/mwindow.c +38 -45
  257. data/vendor/libgit2/src/libgit2/mwindow.h +4 -0
  258. data/vendor/libgit2/src/libgit2/notes.c +9 -8
  259. data/vendor/libgit2/src/libgit2/object.c +42 -16
  260. data/vendor/libgit2/src/libgit2/object.h +6 -0
  261. data/vendor/libgit2/src/libgit2/odb.c +16 -9
  262. data/vendor/libgit2/src/libgit2/odb_mempack.c +49 -17
  263. data/vendor/libgit2/src/libgit2/odb_pack.c +28 -7
  264. data/vendor/libgit2/src/libgit2/oid.c +35 -2
  265. data/vendor/libgit2/src/libgit2/oid.h +11 -0
  266. data/vendor/libgit2/src/libgit2/oidarray.c +49 -3
  267. data/vendor/libgit2/src/libgit2/oidarray.h +5 -1
  268. data/vendor/libgit2/src/libgit2/pack-objects.c +77 -43
  269. data/vendor/libgit2/src/libgit2/pack-objects.h +17 -6
  270. data/vendor/libgit2/src/libgit2/pack.c +33 -27
  271. data/vendor/libgit2/src/libgit2/pack.h +15 -10
  272. data/vendor/libgit2/src/libgit2/parse.c +7 -4
  273. data/vendor/libgit2/src/libgit2/parse.h +1 -1
  274. data/vendor/libgit2/src/libgit2/patch.h +7 -1
  275. data/vendor/libgit2/src/libgit2/patch_generate.c +24 -5
  276. data/vendor/libgit2/src/libgit2/patch_parse.c +18 -10
  277. data/vendor/libgit2/src/libgit2/path.c +1 -1
  278. data/vendor/libgit2/src/libgit2/pathspec.c +1 -1
  279. data/vendor/libgit2/src/libgit2/push.c +81 -30
  280. data/vendor/libgit2/src/libgit2/push.h +1 -0
  281. data/vendor/libgit2/src/libgit2/reader.c +1 -1
  282. data/vendor/libgit2/src/libgit2/rebase.c +72 -84
  283. data/vendor/libgit2/src/libgit2/refdb_fs.c +146 -70
  284. data/vendor/libgit2/src/libgit2/reflog.c +1 -2
  285. data/vendor/libgit2/src/libgit2/reflog.h +2 -0
  286. data/vendor/libgit2/src/libgit2/refs.c +34 -8
  287. data/vendor/libgit2/src/libgit2/refs.h +6 -1
  288. data/vendor/libgit2/src/libgit2/refspec.c +28 -1
  289. data/vendor/libgit2/src/libgit2/refspec.h +8 -0
  290. data/vendor/libgit2/src/libgit2/remote.c +136 -67
  291. data/vendor/libgit2/src/libgit2/remote.h +1 -0
  292. data/vendor/libgit2/src/libgit2/repository.c +789 -330
  293. data/vendor/libgit2/src/libgit2/repository.h +22 -3
  294. data/vendor/libgit2/src/libgit2/reset.c +2 -2
  295. data/vendor/libgit2/src/libgit2/revert.c +9 -13
  296. data/vendor/libgit2/src/libgit2/revparse.c +6 -3
  297. data/vendor/libgit2/src/libgit2/revwalk.c +36 -11
  298. data/vendor/libgit2/src/libgit2/revwalk.h +3 -3
  299. data/vendor/libgit2/src/libgit2/settings.c +468 -0
  300. data/vendor/libgit2/src/libgit2/settings.h +6 -2
  301. data/vendor/libgit2/src/libgit2/signature.c +132 -15
  302. data/vendor/libgit2/src/libgit2/signature.h +0 -1
  303. data/vendor/libgit2/src/libgit2/stash.c +9 -8
  304. data/vendor/libgit2/src/libgit2/status.c +1 -1
  305. data/vendor/libgit2/src/libgit2/streams/mbedtls.c +54 -61
  306. data/vendor/libgit2/src/libgit2/streams/openssl.c +40 -23
  307. data/vendor/libgit2/src/libgit2/streams/openssl.h +2 -0
  308. data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.c +4 -0
  309. data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.h +3 -0
  310. data/vendor/libgit2/src/libgit2/streams/schannel.c +715 -0
  311. data/vendor/libgit2/src/libgit2/streams/schannel.h +28 -0
  312. data/vendor/libgit2/src/libgit2/streams/socket.c +237 -51
  313. data/vendor/libgit2/src/libgit2/streams/socket.h +3 -1
  314. data/vendor/libgit2/src/libgit2/streams/stransport.c +79 -19
  315. data/vendor/libgit2/src/libgit2/streams/tls.c +5 -0
  316. data/vendor/libgit2/src/libgit2/submodule.c +106 -63
  317. data/vendor/libgit2/src/libgit2/submodule.h +9 -10
  318. data/vendor/libgit2/src/libgit2/tag.c +1 -1
  319. data/vendor/libgit2/src/libgit2/trailer.c +6 -6
  320. data/vendor/libgit2/src/libgit2/transaction.c +26 -20
  321. data/vendor/libgit2/src/libgit2/transaction.h +4 -1
  322. data/vendor/libgit2/src/libgit2/transport.c +4 -1
  323. data/vendor/libgit2/src/libgit2/transports/auth.h +1 -2
  324. data/vendor/libgit2/src/libgit2/transports/{auth_negotiate.c → auth_gssapi.c} +32 -32
  325. data/vendor/libgit2/src/libgit2/transports/auth_negotiate.h +1 -1
  326. data/vendor/libgit2/src/libgit2/transports/auth_ntlm.h +1 -1
  327. data/vendor/libgit2/src/libgit2/transports/{auth_ntlm.c → auth_ntlmclient.c} +12 -12
  328. data/vendor/libgit2/src/libgit2/transports/auth_sspi.c +341 -0
  329. data/vendor/libgit2/src/libgit2/transports/credential.c +1 -1
  330. data/vendor/libgit2/src/libgit2/transports/git.c +7 -8
  331. data/vendor/libgit2/src/libgit2/transports/http.c +8 -4
  332. data/vendor/libgit2/src/libgit2/transports/http.h +0 -10
  333. data/vendor/libgit2/src/libgit2/transports/httpclient.c +117 -72
  334. data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
  335. data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
  336. data/vendor/libgit2/src/libgit2/transports/local.c +21 -11
  337. data/vendor/libgit2/src/libgit2/transports/smart.c +50 -32
  338. data/vendor/libgit2/src/libgit2/transports/smart.h +26 -9
  339. data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +139 -18
  340. data/vendor/libgit2/src/libgit2/transports/smart_protocol.c +209 -57
  341. data/vendor/libgit2/src/libgit2/transports/ssh.c +41 -1103
  342. data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +347 -0
  343. data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
  344. data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +1126 -0
  345. data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
  346. data/vendor/libgit2/src/libgit2/transports/winhttp.c +48 -21
  347. data/vendor/libgit2/src/libgit2/tree-cache.c +26 -16
  348. data/vendor/libgit2/src/libgit2/tree-cache.h +5 -3
  349. data/vendor/libgit2/src/libgit2/tree.c +35 -27
  350. data/vendor/libgit2/src/libgit2/tree.h +3 -2
  351. data/vendor/libgit2/src/libgit2/worktree.c +39 -27
  352. data/vendor/libgit2/src/util/CMakeLists.txt +4 -6
  353. data/vendor/libgit2/src/util/alloc.c +69 -7
  354. data/vendor/libgit2/src/util/alloc.h +34 -9
  355. data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
  356. data/vendor/libgit2/src/{cli/cli.h → util/allocators/debugalloc.h} +6 -9
  357. data/vendor/libgit2/src/util/allocators/failalloc.c +0 -60
  358. data/vendor/libgit2/src/util/allocators/failalloc.h +0 -6
  359. data/vendor/libgit2/src/util/allocators/stdalloc.c +2 -115
  360. data/vendor/libgit2/src/util/allocators/win32_leakcheck.c +0 -68
  361. data/vendor/libgit2/src/util/array.h +24 -18
  362. data/vendor/libgit2/src/util/cc-compat.h +4 -0
  363. data/vendor/libgit2/src/util/ctype_compat.h +70 -0
  364. data/vendor/libgit2/src/util/date.c +22 -14
  365. data/vendor/libgit2/src/util/date.h +12 -0
  366. data/vendor/libgit2/src/util/errors.c +401 -0
  367. data/vendor/libgit2/src/{libgit2 → util}/errors.h +21 -17
  368. data/vendor/libgit2/src/util/filebuf.c +6 -1
  369. data/vendor/libgit2/src/util/filebuf.h +19 -6
  370. data/vendor/libgit2/src/util/fs_path.c +16 -5
  371. data/vendor/libgit2/src/util/fs_path.h +23 -0
  372. data/vendor/libgit2/src/util/futils.c +14 -10
  373. data/vendor/libgit2/src/util/futils.h +13 -4
  374. data/vendor/libgit2/src/util/git2_features.h.in +21 -4
  375. data/vendor/libgit2/src/util/git2_util.h +6 -0
  376. data/vendor/libgit2/src/util/hash/openssl.c +152 -0
  377. data/vendor/libgit2/src/util/hash/openssl.h +17 -1
  378. data/vendor/libgit2/src/util/hash/sha.h +4 -1
  379. data/vendor/libgit2/src/util/hashmap.h +424 -0
  380. data/vendor/libgit2/src/util/hashmap_str.h +43 -0
  381. data/vendor/libgit2/src/util/integer.h +3 -1
  382. data/vendor/libgit2/src/util/net.c +318 -161
  383. data/vendor/libgit2/src/util/net.h +27 -0
  384. data/vendor/libgit2/src/util/pool.c +1 -1
  385. data/vendor/libgit2/src/util/pool.h +5 -0
  386. data/vendor/libgit2/src/util/posix.c +54 -0
  387. data/vendor/libgit2/src/util/posix.h +22 -0
  388. data/vendor/libgit2/src/util/pqueue.h +1 -1
  389. data/vendor/libgit2/src/util/process.h +222 -0
  390. data/vendor/libgit2/src/util/rand.c +6 -10
  391. data/vendor/libgit2/src/util/regexp.c +1 -1
  392. data/vendor/libgit2/src/util/sortedcache.c +14 -13
  393. data/vendor/libgit2/src/util/sortedcache.h +3 -3
  394. data/vendor/libgit2/src/util/staticstr.h +66 -0
  395. data/vendor/libgit2/src/util/str.c +2 -2
  396. data/vendor/libgit2/src/util/strlist.c +108 -0
  397. data/vendor/libgit2/src/util/strlist.h +36 -0
  398. data/vendor/libgit2/src/util/unix/posix.h +0 -2
  399. data/vendor/libgit2/src/util/unix/process.c +629 -0
  400. data/vendor/libgit2/src/util/unix/realpath.c +23 -5
  401. data/vendor/libgit2/src/util/util.c +17 -12
  402. data/vendor/libgit2/src/util/util.h +28 -54
  403. data/vendor/libgit2/src/util/vector.c +3 -3
  404. data/vendor/libgit2/src/util/vector.h +2 -2
  405. data/vendor/libgit2/src/util/win32/error.c +1 -1
  406. data/vendor/libgit2/src/util/win32/path_w32.c +8 -8
  407. data/vendor/libgit2/src/util/win32/posix_w32.c +30 -7
  408. data/vendor/libgit2/src/util/win32/process.c +506 -0
  409. data/vendor/libgit2/src/util/win32/utf-conv.c +73 -75
  410. data/vendor/libgit2/src/util/win32/utf-conv.h +81 -14
  411. data/vendor/libgit2/src/util/win32/w32_util.c +1 -1
  412. metadata +72 -49
  413. data/vendor/libgit2/cmake/SelectWinHTTP.cmake +0 -17
  414. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -6
  415. data/vendor/libgit2/deps/http-parser/COPYING +0 -23
  416. data/vendor/libgit2/deps/http-parser/http_parser.c +0 -2182
  417. data/vendor/libgit2/deps/http-parser/http_parser.h +0 -305
  418. data/vendor/libgit2/deps/zlib/COPYING +0 -27
  419. data/vendor/libgit2/include/git2/sys/reflog.h +0 -21
  420. data/vendor/libgit2/src/libgit2/config_entries.c +0 -237
  421. data/vendor/libgit2/src/libgit2/config_entries.h +0 -24
  422. data/vendor/libgit2/src/libgit2/errors.c +0 -238
  423. data/vendor/libgit2/src/libgit2/idxmap.c +0 -157
  424. data/vendor/libgit2/src/libgit2/idxmap.h +0 -177
  425. data/vendor/libgit2/src/libgit2/libgit2.h +0 -15
  426. data/vendor/libgit2/src/libgit2/netops.c +0 -124
  427. data/vendor/libgit2/src/libgit2/netops.h +0 -68
  428. data/vendor/libgit2/src/libgit2/offmap.c +0 -101
  429. data/vendor/libgit2/src/libgit2/offmap.h +0 -133
  430. data/vendor/libgit2/src/libgit2/oidmap.c +0 -107
  431. data/vendor/libgit2/src/libgit2/oidmap.h +0 -128
  432. data/vendor/libgit2/src/libgit2/threadstate.c +0 -84
  433. data/vendor/libgit2/src/libgit2/threadstate.h +0 -24
  434. data/vendor/libgit2/src/libgit2/transports/ssh.h +0 -14
  435. data/vendor/libgit2/src/util/khash.h +0 -615
  436. data/vendor/libgit2/src/util/strmap.c +0 -100
  437. data/vendor/libgit2/src/util/strmap.h +0 -131
  438. /data/vendor/libgit2/cmake/{FindHTTPParser.cmake → FindHTTP_Parser.cmake} +0 -0
  439. /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xdiff.h +0 -0
  440. /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xemit.h +0 -0
  441. /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xinclude.h +0 -0
  442. /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xprepare.h +0 -0
  443. /data/vendor/libgit2/{src/libgit2 → deps}/xdiff/xtypes.h +0 -0
@@ -13,47 +13,86 @@
13
13
 
14
14
  /**
15
15
  * @file git2/config.h
16
- * @brief Git config management routines
16
+ * @brief Per-repository, per-user or per-system configuration
17
17
  * @defgroup git_config Git config management routines
18
18
  * @ingroup Git
19
+ *
20
+ * Git configuration affects the operation of the version control
21
+ * system, and can be specified on a per-repository basis, in user
22
+ * settings, or at the system level.
19
23
  * @{
20
24
  */
21
25
  GIT_BEGIN_DECL
22
26
 
23
27
  /**
24
28
  * Priority level of a config file.
29
+ *
25
30
  * These priority levels correspond to the natural escalation logic
26
- * (from higher to lower) when searching for config entries in git.git.
31
+ * (from higher to lower) when reading or searching for config entries
32
+ * in git.git. Meaning that for the same key, the configuration in
33
+ * the local configuration is preferred over the configuration in
34
+ * the system configuration file.
35
+ *
36
+ * Callers can add their own custom configuration, beginning at the
37
+ * `GIT_CONFIG_LEVEL_APP` level.
38
+ *
39
+ * Writes, by default, occur in the highest priority level backend
40
+ * that is writable. This ordering can be overridden with
41
+ * `git_config_set_writeorder`.
27
42
  *
28
43
  * git_config_open_default() and git_repository_config() honor those
29
44
  * priority levels as well.
45
+ *
46
+ * @see git_config_open_default
47
+ * @see git_repository_config
30
48
  */
31
49
  typedef enum {
32
- /** System-wide on Windows, for compatibility with portable git */
50
+ /**
51
+ * System-wide on Windows, for compatibility with "Portable Git".
52
+ */
33
53
  GIT_CONFIG_LEVEL_PROGRAMDATA = 1,
34
54
 
35
- /** System-wide configuration file; /etc/gitconfig on Linux systems */
55
+ /**
56
+ * System-wide configuration file; `/etc/gitconfig` on Linux.
57
+ */
36
58
  GIT_CONFIG_LEVEL_SYSTEM = 2,
37
59
 
38
- /** XDG compatible configuration file; typically ~/.config/git/config */
60
+ /**
61
+ * XDG compatible configuration file; typically
62
+ * `~/.config/git/config`.
63
+ */
39
64
  GIT_CONFIG_LEVEL_XDG = 3,
40
65
 
41
- /** User-specific configuration file (also called Global configuration
42
- * file); typically ~/.gitconfig
66
+ /**
67
+ * Global configuration file is the user-specific configuration;
68
+ * typically `~/.gitconfig`.
43
69
  */
44
70
  GIT_CONFIG_LEVEL_GLOBAL = 4,
45
71
 
46
- /** Repository specific configuration file; $WORK_DIR/.git/config on
47
- * non-bare repos
72
+ /**
73
+ * Local configuration, the repository-specific configuration file;
74
+ * typically `$GIT_DIR/config`.
48
75
  */
49
76
  GIT_CONFIG_LEVEL_LOCAL = 5,
50
77
 
51
- /** Application specific configuration file; freely defined by applications
78
+ /**
79
+ * Worktree-specific configuration; typically
80
+ * `$GIT_DIR/config.worktree`.
52
81
  */
53
- GIT_CONFIG_LEVEL_APP = 6,
82
+ GIT_CONFIG_LEVEL_WORKTREE = 6,
54
83
 
55
- /** Represents the highest level available config file (i.e. the most
56
- * specific config file available that actually is loaded)
84
+ /**
85
+ * Application-specific configuration file. Callers into libgit2
86
+ * can add their own configuration beginning at this level.
87
+ */
88
+ GIT_CONFIG_LEVEL_APP = 7,
89
+
90
+ /**
91
+ * Not a configuration level; callers can use this value when
92
+ * querying configuration levels to specify that they want to
93
+ * have data from the highest-level currently configuration.
94
+ * This can be used to indicate that callers want the most
95
+ * specific config file available that actually is loaded.
57
96
  */
58
97
  GIT_CONFIG_HIGHEST_LEVEL = -1
59
98
  } git_config_level_t;
@@ -62,23 +101,37 @@ typedef enum {
62
101
  * An entry in a configuration file
63
102
  */
64
103
  typedef struct git_config_entry {
65
- const char *name; /**< Name of the entry (normalised) */
66
- const char *value; /**< String value of the entry */
67
- unsigned int include_depth; /**< Depth of includes where this variable was found */
68
- 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 */
70
- void *payload; /**< Opaque value for the free function. Do not read or write */
104
+ /** Name of the configuration entry (normalized). */
105
+ const char *name;
106
+
107
+ /** Literal (string) value of the entry. */
108
+ const char *value;
109
+
110
+ /** The type of backend that this entry exists in (eg, "file"). */
111
+ const char *backend_type;
112
+
113
+ /**
114
+ * The path to the origin of this entry. For config files, this is
115
+ * the path to the file.
116
+ */
117
+ const char *origin_path;
118
+
119
+ /** Depth of includes where this variable was found. */
120
+ unsigned int include_depth;
121
+
122
+ /** Configuration level for the file this was found in. */
123
+ git_config_level_t level;
71
124
  } git_config_entry;
72
125
 
73
126
  /**
74
- * Free a config entry
127
+ * Free a config entry.
75
128
  *
76
129
  * @param entry The entry to free.
77
130
  */
78
131
  GIT_EXTERN(void) git_config_entry_free(git_config_entry *entry);
79
132
 
80
133
  /**
81
- * A config enumeration callback
134
+ * A config enumeration callback.
82
135
  *
83
136
  * @param entry the entry currently being enumerated
84
137
  * @param payload a user-specified pointer
@@ -87,7 +140,7 @@ GIT_EXTERN(void) git_config_entry_free(git_config_entry *entry);
87
140
  typedef int GIT_CALLBACK(git_config_foreach_cb)(const git_config_entry *entry, void *payload);
88
141
 
89
142
  /**
90
- * An opaque structure for a configuration iterator
143
+ * An opaque structure for a configuration iterator.
91
144
  */
92
145
  typedef struct git_config_iterator git_config_iterator;
93
146
 
@@ -212,9 +265,9 @@ GIT_EXTERN(int) git_config_new(git_config **out);
212
265
  * @param cfg the configuration to add the file to
213
266
  * @param path path to the configuration file to add
214
267
  * @param level the priority level of the backend
215
- * @param force replace config file at the given priority level
216
268
  * @param repo optional repository to allow parsing of
217
269
  * conditional includes
270
+ * @param force replace config file at the given priority level
218
271
  * @return 0 on success, GIT_EEXISTS when adding more than one file
219
272
  * for a given priority level (and force_replace set to 0),
220
273
  * GIT_ENOTFOUND when the file doesn't exist or error code
@@ -276,6 +329,22 @@ GIT_EXTERN(int) git_config_open_level(
276
329
  */
277
330
  GIT_EXTERN(int) git_config_open_global(git_config **out, git_config *config);
278
331
 
332
+ /**
333
+ * Set the write order for configuration backends. By default, the
334
+ * write ordering does not match the read ordering; for example, the
335
+ * worktree configuration is a high-priority for reading, but is not
336
+ * written to unless explicitly chosen.
337
+ *
338
+ * @param cfg the configuration to change write order of
339
+ * @param levels the ordering of levels for writing
340
+ * @param len the length of the levels array
341
+ * @return 0 or an error code
342
+ */
343
+ GIT_EXTERN(int) git_config_set_writeorder(
344
+ git_config *cfg,
345
+ git_config_level_t *levels,
346
+ size_t len);
347
+
279
348
  /**
280
349
  * Create a snapshot of the configuration
281
350
  *
@@ -779,4 +848,5 @@ GIT_EXTERN(int) git_config_lock(git_transaction **tx, git_config *cfg);
779
848
 
780
849
  /** @} */
781
850
  GIT_END_DECL
851
+
782
852
  #endif
@@ -11,9 +11,12 @@
11
11
 
12
12
  /**
13
13
  * @file git2/credential.h
14
- * @brief Git authentication & credential management
14
+ * @brief Authentication and credential management
15
15
  * @defgroup git_credential Authentication & credential management
16
16
  * @ingroup Git
17
+ *
18
+ * Credentials specify how to authenticate to a remote system
19
+ * over HTTPS or SSH.
17
20
  * @{
18
21
  */
19
22
  GIT_BEGIN_DECL
@@ -119,7 +122,7 @@ typedef struct git_credential_ssh_custom git_credential_ssh_custom;
119
122
  * an error. As such, it's easy to get in a loop if you fail to stop providing
120
123
  * the same incorrect credentials.
121
124
  *
122
- * @param out The newly created credential object.
125
+ * @param[out] out The newly created credential object.
123
126
  * @param url The resource for which we are demanding a credential.
124
127
  * @param username_from_url The username that was embedded in a "user\@host"
125
128
  * remote url, or NULL if not included.
@@ -241,6 +244,18 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT LIBSSH2_USERAUTH_KBDINT_PROMPT;
241
244
  typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE LIBSSH2_USERAUTH_KBDINT_RESPONSE;
242
245
  #endif
243
246
 
247
+ /**
248
+ * Callback for interactive SSH credentials.
249
+ *
250
+ * @param name the name
251
+ * @param name_len the length of the name
252
+ * @param instruction the authentication instruction
253
+ * @param instruction_len the length of the instruction
254
+ * @param num_prompts the number of prompts
255
+ * @param prompts the prompts
256
+ * @param responses the responses
257
+ * @param abstract the abstract
258
+ */
244
259
  typedef void GIT_CALLBACK(git_credential_ssh_interactive_cb)(
245
260
  const char *name,
246
261
  int name_len,
@@ -278,6 +293,18 @@ GIT_EXTERN(int) git_credential_ssh_key_from_agent(
278
293
  git_credential **out,
279
294
  const char *username);
280
295
 
296
+ /**
297
+ * Callback for credential signing.
298
+ *
299
+ * @param session the libssh2 session
300
+ * @param sig the signature
301
+ * @param sig_len the length of the signature
302
+ * @param data the data
303
+ * @param data_len the length of the data
304
+ * @param abstract the abstract
305
+ * @return 0 for success, < 0 to indicate an error, > 0 to indicate
306
+ * no credential was acquired
307
+ */
281
308
  typedef int GIT_CALLBACK(git_credential_sign_cb)(
282
309
  LIBSSH2_SESSION *session,
283
310
  unsigned char **sig, size_t *sig_len,
@@ -312,4 +339,5 @@ GIT_EXTERN(int) git_credential_ssh_custom_new(
312
339
 
313
340
  /** @} */
314
341
  GIT_END_DECL
342
+
315
343
  #endif
@@ -50,4 +50,5 @@ GIT_EXTERN(int) git_credential_userpass(
50
50
 
51
51
  /** @} */
52
52
  GIT_END_DECL
53
+
53
54
  #endif
@@ -52,7 +52,7 @@
52
52
 
53
53
  /**
54
54
  * @file git2/deprecated.h
55
- * @brief libgit2 deprecated functions and values
55
+ * @brief Deprecated functions and values
56
56
  * @ingroup Git
57
57
  * @{
58
58
  */
@@ -69,15 +69,23 @@ GIT_BEGIN_DECL
69
69
  */
70
70
  /**@{*/
71
71
 
72
+ /** @deprecated use GIT_ATTR_VALUE_UNSPECIFIED */
72
73
  #define GIT_ATTR_UNSPECIFIED_T GIT_ATTR_VALUE_UNSPECIFIED
74
+ /** @deprecated use GIT_ATTR_VALUE_TRUE */
73
75
  #define GIT_ATTR_TRUE_T GIT_ATTR_VALUE_TRUE
76
+ /** @deprecated use GIT_ATTR_VALUE_FALSE */
74
77
  #define GIT_ATTR_FALSE_T GIT_ATTR_VALUE_FALSE
78
+ /** @deprecated use GIT_ATTR_VALUE_STRING */
75
79
  #define GIT_ATTR_VALUE_T GIT_ATTR_VALUE_STRING
76
80
 
81
+ /** @deprecated use GIT_ATTR_IS_TRUE */
77
82
  #define GIT_ATTR_TRUE(attr) GIT_ATTR_IS_TRUE(attr)
83
+ /** @deprecated use GIT_ATTR_IS_FALSE */
78
84
  #define GIT_ATTR_FALSE(attr) GIT_ATTR_IS_FALSE(attr)
85
+ /** @deprecated use GIT_ATTR_IS_UNSPECIFIED */
79
86
  #define GIT_ATTR_UNSPECIFIED(attr) GIT_ATTR_IS_UNSPECIFIED(attr)
80
87
 
88
+ /** @deprecated use git_attr_value_t */
81
89
  typedef git_attr_value_t git_attr_t;
82
90
 
83
91
  /**@}*/
@@ -93,6 +101,7 @@ typedef git_attr_value_t git_attr_t;
93
101
  */
94
102
  /**@{*/
95
103
 
104
+ /** @deprecated use GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD */
96
105
  #define GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD
97
106
 
98
107
  GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path);
@@ -285,11 +294,16 @@ typedef int (*git_commit_signing_cb)(
285
294
  */
286
295
  /**@{*/
287
296
 
297
+ /** @deprecated use GIT_CONFIGMAP_FALSE */
288
298
  #define GIT_CVAR_FALSE GIT_CONFIGMAP_FALSE
299
+ /** @deprecated use GIT_CONFIGMAP_TRUE */
289
300
  #define GIT_CVAR_TRUE GIT_CONFIGMAP_TRUE
301
+ /** @deprecated use GIT_CONFIGMAP_INT32 */
290
302
  #define GIT_CVAR_INT32 GIT_CONFIGMAP_INT32
303
+ /** @deprecated use GIT_CONFIGMAP_STRING */
291
304
  #define GIT_CVAR_STRING GIT_CONFIGMAP_STRING
292
305
 
306
+ /** @deprecated use git_cvar_map */
293
307
  typedef git_configmap git_cvar_map;
294
308
 
295
309
  /**@}*/
@@ -314,11 +328,12 @@ typedef enum {
314
328
 
315
329
  /** Don't insert "[PATCH]" in the subject header*/
316
330
  GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER = (1 << 0)
317
-
318
331
  } git_diff_format_email_flags_t;
319
332
 
320
333
  /**
321
334
  * Options for controlling the formatting of the generated e-mail.
335
+ *
336
+ * @deprecated use `git_email_create_options`
322
337
  */
323
338
  typedef struct {
324
339
  unsigned int version;
@@ -345,7 +360,9 @@ typedef struct {
345
360
  const git_signature *author;
346
361
  } git_diff_format_email_options;
347
362
 
363
+ /** @deprecated use `git_email_create_options` */
348
364
  #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION 1
365
+ /** @deprecated use `git_email_create_options` */
349
366
  #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT {GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION, 0, 1, 1, NULL, NULL, NULL, NULL}
350
367
 
351
368
  /**
@@ -401,41 +418,75 @@ GIT_EXTERN(int) git_diff_format_email_options_init(
401
418
  */
402
419
  /**@{*/
403
420
 
421
+ /** @deprecated use `GIT_ERROR_NONE` */
404
422
  #define GITERR_NONE GIT_ERROR_NONE
423
+ /** @deprecated use `GIT_ERROR_NOMEMORY` */
405
424
  #define GITERR_NOMEMORY GIT_ERROR_NOMEMORY
425
+ /** @deprecated use `GIT_ERROR_OS` */
406
426
  #define GITERR_OS GIT_ERROR_OS
427
+ /** @deprecated use `GIT_ERROR_INVALID` */
407
428
  #define GITERR_INVALID GIT_ERROR_INVALID
429
+ /** @deprecated use `GIT_ERROR_REFERENCE` */
408
430
  #define GITERR_REFERENCE GIT_ERROR_REFERENCE
431
+ /** @deprecated use `GIT_ERROR_ZLIB` */
409
432
  #define GITERR_ZLIB GIT_ERROR_ZLIB
433
+ /** @deprecated use `GIT_ERROR_REPOSITORY` */
410
434
  #define GITERR_REPOSITORY GIT_ERROR_REPOSITORY
435
+ /** @deprecated use `GIT_ERROR_CONFIG` */
411
436
  #define GITERR_CONFIG GIT_ERROR_CONFIG
437
+ /** @deprecated use `GIT_ERROR_REGEX` */
412
438
  #define GITERR_REGEX GIT_ERROR_REGEX
439
+ /** @deprecated use `GIT_ERROR_ODB` */
413
440
  #define GITERR_ODB GIT_ERROR_ODB
441
+ /** @deprecated use `GIT_ERROR_INDEX` */
414
442
  #define GITERR_INDEX GIT_ERROR_INDEX
443
+ /** @deprecated use `GIT_ERROR_OBJECT` */
415
444
  #define GITERR_OBJECT GIT_ERROR_OBJECT
445
+ /** @deprecated use `GIT_ERROR_NET` */
416
446
  #define GITERR_NET GIT_ERROR_NET
447
+ /** @deprecated use `GIT_ERROR_TAG` */
417
448
  #define GITERR_TAG GIT_ERROR_TAG
449
+ /** @deprecated use `GIT_ERROR_TREE` */
418
450
  #define GITERR_TREE GIT_ERROR_TREE
451
+ /** @deprecated use `GIT_ERROR_INDEXER` */
419
452
  #define GITERR_INDEXER GIT_ERROR_INDEXER
453
+ /** @deprecated use `GIT_ERROR_SSL` */
420
454
  #define GITERR_SSL GIT_ERROR_SSL
455
+ /** @deprecated use `GIT_ERROR_SUBMODULE` */
421
456
  #define GITERR_SUBMODULE GIT_ERROR_SUBMODULE
457
+ /** @deprecated use `GIT_ERROR_THREAD` */
422
458
  #define GITERR_THREAD GIT_ERROR_THREAD
459
+ /** @deprecated use `GIT_ERROR_STASH` */
423
460
  #define GITERR_STASH GIT_ERROR_STASH
461
+ /** @deprecated use `GIT_ERROR_CHECKOUT` */
424
462
  #define GITERR_CHECKOUT GIT_ERROR_CHECKOUT
463
+ /** @deprecated use `GIT_ERROR_FETCHHEAD` */
425
464
  #define GITERR_FETCHHEAD GIT_ERROR_FETCHHEAD
465
+ /** @deprecated use `GIT_ERROR_MERGE` */
426
466
  #define GITERR_MERGE GIT_ERROR_MERGE
467
+ /** @deprecated use `GIT_ERROR_SSH` */
427
468
  #define GITERR_SSH GIT_ERROR_SSH
469
+ /** @deprecated use `GIT_ERROR_FILTER` */
428
470
  #define GITERR_FILTER GIT_ERROR_FILTER
471
+ /** @deprecated use `GIT_ERROR_REVERT` */
429
472
  #define GITERR_REVERT GIT_ERROR_REVERT
473
+ /** @deprecated use `GIT_ERROR_CALLBACK` */
430
474
  #define GITERR_CALLBACK GIT_ERROR_CALLBACK
475
+ /** @deprecated use `GIT_ERROR_CHERRYPICK` */
431
476
  #define GITERR_CHERRYPICK GIT_ERROR_CHERRYPICK
477
+ /** @deprecated use `GIT_ERROR_DESCRIBE` */
432
478
  #define GITERR_DESCRIBE GIT_ERROR_DESCRIBE
479
+ /** @deprecated use `GIT_ERROR_REBASE` */
433
480
  #define GITERR_REBASE GIT_ERROR_REBASE
481
+ /** @deprecated use `GIT_ERROR_FILESYSTEM` */
434
482
  #define GITERR_FILESYSTEM GIT_ERROR_FILESYSTEM
483
+ /** @deprecated use `GIT_ERROR_PATCH` */
435
484
  #define GITERR_PATCH GIT_ERROR_PATCH
485
+ /** @deprecated use `GIT_ERROR_WORKTREE` */
436
486
  #define GITERR_WORKTREE GIT_ERROR_WORKTREE
487
+ /** @deprecated use `GIT_ERROR_SHA1` */
437
488
  #define GITERR_SHA1 GIT_ERROR_SHA1
438
-
489
+ /** @deprecated use `GIT_ERROR_SHA` */
439
490
  #define GIT_ERROR_SHA1 GIT_ERROR_SHA
440
491
 
441
492
  /**
@@ -500,37 +551,63 @@ GIT_EXTERN(void) giterr_set_oom(void);
500
551
  */
501
552
  /**@{*/
502
553
 
554
+ /* The git_idxentry_extended_flag_t enum */
555
+ /** @deprecated use `GIT_INDEX_ENTRY_NAMEMASK` */
503
556
  #define GIT_IDXENTRY_NAMEMASK GIT_INDEX_ENTRY_NAMEMASK
557
+ /** @deprecated use `GIT_INDEX_ENTRY_STAGEMASK` */
504
558
  #define GIT_IDXENTRY_STAGEMASK GIT_INDEX_ENTRY_STAGEMASK
559
+ /** @deprecated use `GIT_INDEX_ENTRY_STAGESHIFT` */
505
560
  #define GIT_IDXENTRY_STAGESHIFT GIT_INDEX_ENTRY_STAGESHIFT
506
561
 
507
562
  /* The git_indxentry_flag_t enum */
563
+ /** @deprecated use `GIT_INDEX_ENTRY_EXTENDED` */
508
564
  #define GIT_IDXENTRY_EXTENDED GIT_INDEX_ENTRY_EXTENDED
565
+ /** @deprecated use `GIT_INDEX_ENTRY_VALID` */
509
566
  #define GIT_IDXENTRY_VALID GIT_INDEX_ENTRY_VALID
510
567
 
568
+ /** @deprecated use `GIT_INDEX_ENTRY_STAGE` */
511
569
  #define GIT_IDXENTRY_STAGE(E) GIT_INDEX_ENTRY_STAGE(E)
570
+ /** @deprecated use `GIT_INDEX_ENTRY_STAGE_SET` */
512
571
  #define GIT_IDXENTRY_STAGE_SET(E,S) GIT_INDEX_ENTRY_STAGE_SET(E,S)
513
572
 
514
573
  /* The git_idxentry_extended_flag_t enum */
574
+ /** @deprecated use `GIT_INDEX_ENTRY_INTENT_TO_ADD` */
515
575
  #define GIT_IDXENTRY_INTENT_TO_ADD GIT_INDEX_ENTRY_INTENT_TO_ADD
576
+ /** @deprecated use `GIT_INDEX_ENTRY_SKIP_WORKTREE` */
516
577
  #define GIT_IDXENTRY_SKIP_WORKTREE GIT_INDEX_ENTRY_SKIP_WORKTREE
578
+ /** @deprecated use `GIT_INDEX_ENTRY_INTENT_TO_ADD | GIT_INDEX_ENTRY_SKIP_WORKTREE` */
517
579
  #define GIT_IDXENTRY_EXTENDED_FLAGS (GIT_INDEX_ENTRY_INTENT_TO_ADD | GIT_INDEX_ENTRY_SKIP_WORKTREE)
580
+ /** @deprecated this value is not public */
518
581
  #define GIT_IDXENTRY_EXTENDED2 (1 << 15)
582
+ /** @deprecated this value is not public */
519
583
  #define GIT_IDXENTRY_UPDATE (1 << 0)
584
+ /** @deprecated this value is not public */
520
585
  #define GIT_IDXENTRY_REMOVE (1 << 1)
586
+ /** @deprecated this value is not public */
521
587
  #define GIT_IDXENTRY_UPTODATE (1 << 2)
588
+ /** @deprecated this value is not public */
522
589
  #define GIT_IDXENTRY_ADDED (1 << 3)
590
+ /** @deprecated this value is not public */
523
591
  #define GIT_IDXENTRY_HASHED (1 << 4)
592
+ /** @deprecated this value is not public */
524
593
  #define GIT_IDXENTRY_UNHASHED (1 << 5)
594
+ /** @deprecated this value is not public */
525
595
  #define GIT_IDXENTRY_WT_REMOVE (1 << 6)
596
+ /** @deprecated this value is not public */
526
597
  #define GIT_IDXENTRY_CONFLICTED (1 << 7)
598
+ /** @deprecated this value is not public */
527
599
  #define GIT_IDXENTRY_UNPACKED (1 << 8)
600
+ /** @deprecated this value is not public */
528
601
  #define GIT_IDXENTRY_NEW_SKIP_WORKTREE (1 << 9)
529
602
 
530
603
  /* The git_index_capability_t enum */
604
+ /** @deprecated use `GIT_INDEX_CAPABILITY_IGNORE_CASE` */
531
605
  #define GIT_INDEXCAP_IGNORE_CASE GIT_INDEX_CAPABILITY_IGNORE_CASE
606
+ /** @deprecated use `GIT_INDEX_CAPABILITY_NO_FILEMODE` */
532
607
  #define GIT_INDEXCAP_NO_FILEMODE GIT_INDEX_CAPABILITY_NO_FILEMODE
608
+ /** @deprecated use `GIT_INDEX_CAPABILITY_NO_SYMLINKS` */
533
609
  #define GIT_INDEXCAP_NO_SYMLINKS GIT_INDEX_CAPABILITY_NO_SYMLINKS
610
+ /** @deprecated use `GIT_INDEX_CAPABILITY_FROM_OWNER` */
534
611
  #define GIT_INDEXCAP_FROM_OWNER GIT_INDEX_CAPABILITY_FROM_OWNER
535
612
 
536
613
  GIT_EXTERN(int) git_index_add_frombuffer(
@@ -550,17 +627,28 @@ GIT_EXTERN(int) git_index_add_frombuffer(
550
627
  */
551
628
  /**@{*/
552
629
 
630
+ /** @deprecate use `git_object_t` */
553
631
  #define git_otype git_object_t
554
632
 
633
+ /** @deprecate use `GIT_OBJECT_ANY` */
555
634
  #define GIT_OBJ_ANY GIT_OBJECT_ANY
635
+ /** @deprecate use `GIT_OBJECT_INVALID` */
556
636
  #define GIT_OBJ_BAD GIT_OBJECT_INVALID
637
+ /** @deprecated this value is not public */
557
638
  #define GIT_OBJ__EXT1 0
639
+ /** @deprecate use `GIT_OBJECT_COMMIT` */
558
640
  #define GIT_OBJ_COMMIT GIT_OBJECT_COMMIT
641
+ /** @deprecate use `GIT_OBJECT_TREE` */
559
642
  #define GIT_OBJ_TREE GIT_OBJECT_TREE
643
+ /** @deprecate use `GIT_OBJECT_BLOB` */
560
644
  #define GIT_OBJ_BLOB GIT_OBJECT_BLOB
645
+ /** @deprecate use `GIT_OBJECT_TAG` */
561
646
  #define GIT_OBJ_TAG GIT_OBJECT_TAG
647
+ /** @deprecated this value is not public */
562
648
  #define GIT_OBJ__EXT2 5
649
+ /** @deprecate use `GIT_OBJECT_OFS_DELTA` */
563
650
  #define GIT_OBJ_OFS_DELTA GIT_OBJECT_OFS_DELTA
651
+ /** @deprecate use `GIT_OBJECT_REF_DELTA` */
564
652
  #define GIT_OBJ_REF_DELTA GIT_OBJECT_REF_DELTA
565
653
 
566
654
  /**
@@ -612,17 +700,27 @@ GIT_EXTERN(int) git_remote_is_valid_name(const char *remote_name);
612
700
  /**@{*/
613
701
 
614
702
  /** Basic type of any Git reference. */
703
+ /** @deprecate use `git_reference_t` */
615
704
  #define git_ref_t git_reference_t
705
+ /** @deprecate use `git_reference_format_t` */
616
706
  #define git_reference_normalize_t git_reference_format_t
617
707
 
708
+ /** @deprecate use `GIT_REFERENCE_INVALID` */
618
709
  #define GIT_REF_INVALID GIT_REFERENCE_INVALID
710
+ /** @deprecate use `GIT_REFERENCE_DIRECT` */
619
711
  #define GIT_REF_OID GIT_REFERENCE_DIRECT
712
+ /** @deprecate use `GIT_REFERENCE_SYMBOLIC` */
620
713
  #define GIT_REF_SYMBOLIC GIT_REFERENCE_SYMBOLIC
714
+ /** @deprecate use `GIT_REFERENCE_ALL` */
621
715
  #define GIT_REF_LISTALL GIT_REFERENCE_ALL
622
716
 
717
+ /** @deprecate use `GIT_REFERENCE_FORMAT_NORMAL` */
623
718
  #define GIT_REF_FORMAT_NORMAL GIT_REFERENCE_FORMAT_NORMAL
719
+ /** @deprecate use `GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL` */
624
720
  #define GIT_REF_FORMAT_ALLOW_ONELEVEL GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL
721
+ /** @deprecate use `GIT_REFERENCE_FORMAT_REFSPEC_PATTERN` */
625
722
  #define GIT_REF_FORMAT_REFSPEC_PATTERN GIT_REFERENCE_FORMAT_REFSPEC_PATTERN
723
+ /** @deprecate use `GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND` */
626
724
  #define GIT_REF_FORMAT_REFSPEC_SHORTHAND GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND
627
725
 
628
726
  /**
@@ -663,8 +761,11 @@ GIT_EXTERN(int) git_tag_create_frombuffer(
663
761
 
664
762
  typedef git_revspec_t git_revparse_mode_t;
665
763
 
764
+ /** @deprecated use `GIT_REVSPEC_SINGLE` */
666
765
  #define GIT_REVPARSE_SINGLE GIT_REVSPEC_SINGLE
766
+ /** @deprecated use `GIT_REVSPEC_RANGE` */
667
767
  #define GIT_REVPARSE_RANGE GIT_REVSPEC_RANGE
768
+ /** @deprecated use `GIT_REVSPEC_MERGE_BASE` */
668
769
  #define GIT_REVPARSE_MERGE_BASE GIT_REVSPEC_MERGE_BASE
669
770
 
670
771
  /**@}*/
@@ -693,14 +794,22 @@ typedef git_credential_sign_cb git_cred_sign_cb;
693
794
  typedef git_credential_ssh_interactive_cb git_cred_ssh_interactive_callback;
694
795
  typedef git_credential_ssh_interactive_cb git_cred_ssh_interactive_cb;
695
796
 
797
+ /** @deprecated use `git_credential_t` */
696
798
  #define git_credtype_t git_credential_t
697
799
 
800
+ /** @deprecated use `GIT_CREDENTIAL_USERPASS_PLAINTEXT` */
698
801
  #define GIT_CREDTYPE_USERPASS_PLAINTEXT GIT_CREDENTIAL_USERPASS_PLAINTEXT
802
+ /** @deprecated use `GIT_CREDENTIAL_SSH_KEY` */
699
803
  #define GIT_CREDTYPE_SSH_KEY GIT_CREDENTIAL_SSH_KEY
804
+ /** @deprecated use `GIT_CREDENTIAL_SSH_CUSTOM` */
700
805
  #define GIT_CREDTYPE_SSH_CUSTOM GIT_CREDENTIAL_SSH_CUSTOM
806
+ /** @deprecated use `GIT_CREDENTIAL_DEFAULT` */
701
807
  #define GIT_CREDTYPE_DEFAULT GIT_CREDENTIAL_DEFAULT
808
+ /** @deprecated use `GIT_CREDENTIAL_SSH_INTERACTIVE` */
702
809
  #define GIT_CREDTYPE_SSH_INTERACTIVE GIT_CREDENTIAL_SSH_INTERACTIVE
810
+ /** @deprecated use `GIT_CREDENTIAL_USERNAME` */
703
811
  #define GIT_CREDTYPE_USERNAME GIT_CREDENTIAL_USERNAME
812
+ /** @deprecated use `GIT_CREDENTIAL_SSH_MEMORY` */
704
813
  #define GIT_CREDTYPE_SSH_MEMORY GIT_CREDENTIAL_SSH_MEMORY
705
814
 
706
815
  GIT_EXTERN(void) git_cred_free(git_credential *cred);
@@ -778,8 +887,11 @@ typedef git_trace_cb git_trace_callback;
778
887
  /**@{*/
779
888
 
780
889
  #ifndef GIT_EXPERIMENTAL_SHA256
890
+ /** Deprecated OID "raw size" definition */
781
891
  # define GIT_OID_RAWSZ GIT_OID_SHA1_SIZE
892
+ /** Deprecated OID "hex size" definition */
782
893
  # define GIT_OID_HEXSZ GIT_OID_SHA1_HEXSIZE
894
+ /** Deprecated OID "hex zero" definition */
783
895
  # define GIT_OID_HEX_ZERO GIT_OID_SHA1_HEXZERO
784
896
  #endif
785
897
 
@@ -892,6 +1004,24 @@ GIT_EXTERN(void) git_strarray_free(git_strarray *array);
892
1004
 
893
1005
  /**@}*/
894
1006
 
1007
+ /** @name Deprecated Version Constants
1008
+ *
1009
+ * These constants are retained for backward compatibility. The newer
1010
+ * versions of these constants should be preferred in all new code.
1011
+ *
1012
+ * There is no plan to remove these backward compatibility constants at
1013
+ * this time.
1014
+ */
1015
+ /**@{*/
1016
+
1017
+ #define LIBGIT2_VER_MAJOR LIBGIT2_VERSION_MAJOR
1018
+ #define LIBGIT2_VER_MINOR LIBGIT2_VERSION_MINOR
1019
+ #define LIBGIT2_VER_REVISION LIBGIT2_VERSION_REVISION
1020
+ #define LIBGIT2_VER_PATCH LIBGIT2_VERSION_PATCH
1021
+ #define LIBGIT2_VER_PRERELEASE LIBGIT2_VERSION_PRERELEASE
1022
+
1023
+ /**@}*/
1024
+
895
1025
  /** @name Deprecated Options Initialization Functions
896
1026
  *
897
1027
  * These functions are retained for backward compatibility. The newer
@@ -13,10 +13,14 @@
13
13
 
14
14
  /**
15
15
  * @file git2/describe.h
16
- * @brief Git describing routines
16
+ * @brief Describe a commit in reference to tags
17
17
  * @defgroup git_describe Git describing routines
18
18
  * @ingroup Git
19
19
  * @{
20
+ *
21
+ * Describe a commit, showing information about how the current commit
22
+ * relates to the tags. This can be useful for showing how the current
23
+ * commit has changed from a particular tagged version of the repository.
20
24
  */
21
25
  GIT_BEGIN_DECL
22
26
 
@@ -60,10 +64,15 @@ typedef struct git_describe_options {
60
64
  int show_commit_oid_as_fallback;
61
65
  } git_describe_options;
62
66
 
67
+ /** Default maximum candidate tags */
63
68
  #define GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS 10
69
+ /** Default abbreviated size */
64
70
  #define GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE 7
65
71
 
72
+ /** Current version for the `git_describe_options` structure */
66
73
  #define GIT_DESCRIBE_OPTIONS_VERSION 1
74
+
75
+ /** Static constructor for `git_describe_options` */
67
76
  #define GIT_DESCRIBE_OPTIONS_INIT { \
68
77
  GIT_DESCRIBE_OPTIONS_VERSION, \
69
78
  GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
@@ -110,7 +119,10 @@ typedef struct {
110
119
  const char *dirty_suffix;
111
120
  } git_describe_format_options;
112
121
 
122
+ /** Current version for the `git_describe_format_options` structure */
113
123
  #define GIT_DESCRIBE_FORMAT_OPTIONS_VERSION 1
124
+
125
+ /** Static constructor for `git_describe_format_options` */
114
126
  #define GIT_DESCRIBE_FORMAT_OPTIONS_INIT { \
115
127
  GIT_DESCRIBE_FORMAT_OPTIONS_VERSION, \
116
128
  GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE, \