rugged 1.7.2 → 1.9.4

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 (405) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/extconf.rb +4 -4
  3. data/ext/rugged/rugged.c +12 -1
  4. data/ext/rugged/rugged_blame.c +22 -6
  5. data/ext/rugged/rugged_blob.c +24 -9
  6. data/ext/rugged/rugged_branch.c +10 -7
  7. data/ext/rugged/rugged_branch_collection.c +8 -6
  8. data/ext/rugged/rugged_commit.c +7 -6
  9. data/ext/rugged/rugged_config.c +20 -11
  10. data/ext/rugged/rugged_diff.c +26 -12
  11. data/ext/rugged/rugged_diff_hunk.c +2 -1
  12. data/ext/rugged/rugged_index.c +39 -29
  13. data/ext/rugged/rugged_note.c +7 -6
  14. data/ext/rugged/rugged_object.c +3 -2
  15. data/ext/rugged/rugged_patch.c +23 -9
  16. data/ext/rugged/rugged_rebase.c +22 -10
  17. data/ext/rugged/rugged_reference.c +22 -13
  18. data/ext/rugged/rugged_reference_collection.c +9 -7
  19. data/ext/rugged/rugged_remote.c +23 -12
  20. data/ext/rugged/rugged_remote_collection.c +11 -9
  21. data/ext/rugged/rugged_repo.c +60 -45
  22. data/ext/rugged/rugged_revwalk.c +22 -12
  23. data/ext/rugged/rugged_submodule.c +23 -20
  24. data/ext/rugged/rugged_submodule_collection.c +20 -9
  25. data/ext/rugged/rugged_tag.c +6 -4
  26. data/ext/rugged/rugged_tag_collection.c +7 -5
  27. data/ext/rugged/rugged_tree.c +27 -15
  28. data/lib/rugged/version.rb +1 -1
  29. data/vendor/libgit2/AUTHORS +3 -0
  30. data/vendor/libgit2/CMakeLists.txt +23 -10
  31. data/vendor/libgit2/COPYING +195 -1
  32. data/vendor/libgit2/cmake/DefaultCFlags.cmake +4 -1
  33. data/vendor/libgit2/cmake/{FindIconv.cmake → FindIntlIconv.cmake} +6 -0
  34. data/vendor/libgit2/cmake/FindLLHTTP.cmake +39 -0
  35. data/vendor/libgit2/cmake/SelectGSSAPI.cmake +1 -1
  36. data/vendor/libgit2/cmake/SelectHTTPParser.cmake +23 -8
  37. data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +17 -8
  38. data/vendor/libgit2/cmake/SelectHashes.cmake +28 -11
  39. data/vendor/libgit2/cmake/SelectRegex.cmake +6 -1
  40. data/vendor/libgit2/cmake/SelectSSH.cmake +30 -19
  41. data/vendor/libgit2/cmake/SelectZlib.cmake +4 -0
  42. data/vendor/libgit2/deps/llhttp/CMakeLists.txt +8 -0
  43. data/vendor/libgit2/deps/llhttp/LICENSE-MIT +22 -0
  44. data/vendor/libgit2/deps/llhttp/api.c +510 -0
  45. data/vendor/libgit2/deps/llhttp/http.c +170 -0
  46. data/vendor/libgit2/deps/llhttp/llhttp.c +10168 -0
  47. data/vendor/libgit2/deps/llhttp/llhttp.h +897 -0
  48. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +1 -1
  49. data/vendor/libgit2/deps/ntlmclient/crypt_builtin_md4.c +311 -0
  50. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +2 -1
  51. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +0 -20
  52. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +4 -4
  53. data/vendor/libgit2/deps/ntlmclient/ntlm.c +21 -21
  54. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +5 -4
  55. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +2 -1
  56. data/vendor/libgit2/deps/ntlmclient/utf8.h +1176 -721
  57. data/vendor/libgit2/deps/ntlmclient/util.h +11 -0
  58. data/vendor/libgit2/deps/pcre/CMakeLists.txt +3 -3
  59. data/vendor/libgit2/deps/xdiff/CMakeLists.txt +1 -1
  60. data/vendor/libgit2/deps/xdiff/xmerge.c +16 -12
  61. data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -1
  62. data/vendor/libgit2/deps/zlib/LICENSE +22 -0
  63. data/vendor/libgit2/deps/zlib/adler32.c +5 -27
  64. data/vendor/libgit2/deps/zlib/crc32.c +94 -167
  65. data/vendor/libgit2/deps/zlib/deflate.c +358 -435
  66. data/vendor/libgit2/deps/zlib/deflate.h +41 -10
  67. data/vendor/libgit2/deps/zlib/gzguts.h +13 -18
  68. data/vendor/libgit2/deps/zlib/infback.c +17 -30
  69. data/vendor/libgit2/deps/zlib/inffast.c +1 -4
  70. data/vendor/libgit2/deps/zlib/inffast.h +1 -1
  71. data/vendor/libgit2/deps/zlib/inflate.c +36 -102
  72. data/vendor/libgit2/deps/zlib/inftrees.c +6 -11
  73. data/vendor/libgit2/deps/zlib/inftrees.h +6 -6
  74. data/vendor/libgit2/deps/zlib/trees.c +287 -352
  75. data/vendor/libgit2/deps/zlib/zconf.h +23 -14
  76. data/vendor/libgit2/deps/zlib/zlib.h +202 -202
  77. data/vendor/libgit2/deps/zlib/zutil.c +18 -44
  78. data/vendor/libgit2/deps/zlib/zutil.h +13 -33
  79. data/vendor/libgit2/include/git2/annotated_commit.h +12 -5
  80. data/vendor/libgit2/include/git2/apply.h +27 -6
  81. data/vendor/libgit2/include/git2/attr.h +17 -4
  82. data/vendor/libgit2/include/git2/blame.h +133 -28
  83. data/vendor/libgit2/include/git2/blob.h +71 -28
  84. data/vendor/libgit2/include/git2/branch.h +22 -15
  85. data/vendor/libgit2/include/git2/buffer.h +6 -4
  86. data/vendor/libgit2/include/git2/cert.h +2 -1
  87. data/vendor/libgit2/include/git2/checkout.h +83 -32
  88. data/vendor/libgit2/include/git2/cherrypick.h +10 -3
  89. data/vendor/libgit2/include/git2/clone.h +25 -9
  90. data/vendor/libgit2/include/git2/commit.h +132 -3
  91. data/vendor/libgit2/include/git2/common.h +120 -63
  92. data/vendor/libgit2/include/git2/config.h +93 -23
  93. data/vendor/libgit2/include/git2/credential.h +30 -2
  94. data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
  95. data/vendor/libgit2/include/git2/deprecated.h +134 -4
  96. data/vendor/libgit2/include/git2/describe.h +13 -1
  97. data/vendor/libgit2/include/git2/diff.h +38 -8
  98. data/vendor/libgit2/include/git2/email.h +9 -29
  99. data/vendor/libgit2/include/git2/errors.h +46 -73
  100. data/vendor/libgit2/include/git2/filter.h +14 -7
  101. data/vendor/libgit2/include/git2/global.h +8 -1
  102. data/vendor/libgit2/include/git2/graph.h +3 -2
  103. data/vendor/libgit2/include/git2/ignore.h +10 -0
  104. data/vendor/libgit2/include/git2/index.h +100 -15
  105. data/vendor/libgit2/include/git2/indexer.h +21 -4
  106. data/vendor/libgit2/include/git2/mailmap.h +7 -1
  107. data/vendor/libgit2/include/git2/merge.h +50 -3
  108. data/vendor/libgit2/include/git2/message.h +2 -2
  109. data/vendor/libgit2/include/git2/net.h +3 -1
  110. data/vendor/libgit2/include/git2/notes.h +9 -6
  111. data/vendor/libgit2/include/git2/object.h +9 -8
  112. data/vendor/libgit2/include/git2/odb.h +91 -49
  113. data/vendor/libgit2/include/git2/odb_backend.h +80 -52
  114. data/vendor/libgit2/include/git2/oid.h +23 -25
  115. data/vendor/libgit2/include/git2/oidarray.h +7 -1
  116. data/vendor/libgit2/include/git2/pack.h +13 -1
  117. data/vendor/libgit2/include/git2/patch.h +2 -3
  118. data/vendor/libgit2/include/git2/pathspec.h +9 -0
  119. data/vendor/libgit2/include/git2/proxy.h +12 -3
  120. data/vendor/libgit2/include/git2/rebase.h +9 -6
  121. data/vendor/libgit2/include/git2/refdb.h +2 -2
  122. data/vendor/libgit2/include/git2/reflog.h +3 -2
  123. data/vendor/libgit2/include/git2/refs.h +9 -6
  124. data/vendor/libgit2/include/git2/refspec.h +14 -4
  125. data/vendor/libgit2/include/git2/remote.h +113 -25
  126. data/vendor/libgit2/include/git2/repository.h +57 -21
  127. data/vendor/libgit2/include/git2/reset.h +16 -3
  128. data/vendor/libgit2/include/git2/revert.h +9 -4
  129. data/vendor/libgit2/include/git2/revparse.h +3 -3
  130. data/vendor/libgit2/include/git2/revwalk.h +3 -2
  131. data/vendor/libgit2/include/git2/signature.h +46 -1
  132. data/vendor/libgit2/include/git2/stash.h +17 -3
  133. data/vendor/libgit2/include/git2/status.h +10 -6
  134. data/vendor/libgit2/include/git2/stdint.h +87 -85
  135. data/vendor/libgit2/include/git2/strarray.h +2 -3
  136. data/vendor/libgit2/include/git2/submodule.h +20 -9
  137. data/vendor/libgit2/include/git2/sys/alloc.h +12 -0
  138. data/vendor/libgit2/include/git2/sys/commit.h +77 -3
  139. data/vendor/libgit2/include/git2/sys/commit_graph.h +103 -62
  140. data/vendor/libgit2/include/git2/sys/config.h +80 -4
  141. data/vendor/libgit2/include/git2/sys/credential.h +4 -3
  142. data/vendor/libgit2/include/git2/sys/diff.h +21 -1
  143. data/vendor/libgit2/include/git2/sys/email.h +7 -0
  144. data/vendor/libgit2/include/git2/sys/errors.h +76 -0
  145. data/vendor/libgit2/include/git2/sys/filter.h +66 -3
  146. data/vendor/libgit2/include/git2/sys/hashsig.h +11 -0
  147. data/vendor/libgit2/include/git2/sys/index.h +3 -2
  148. data/vendor/libgit2/include/git2/sys/mempack.h +32 -2
  149. data/vendor/libgit2/include/git2/sys/merge.h +55 -7
  150. data/vendor/libgit2/include/git2/sys/midx.h +43 -4
  151. data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -3
  152. data/vendor/libgit2/include/git2/sys/openssl.h +8 -1
  153. data/vendor/libgit2/include/git2/sys/path.h +12 -1
  154. data/vendor/libgit2/include/git2/sys/refdb_backend.h +40 -36
  155. data/vendor/libgit2/include/git2/sys/refs.h +3 -2
  156. data/vendor/libgit2/include/git2/sys/remote.h +8 -1
  157. data/vendor/libgit2/include/git2/sys/repository.h +63 -3
  158. data/vendor/libgit2/include/git2/sys/stream.h +11 -2
  159. data/vendor/libgit2/include/git2/sys/transport.h +25 -4
  160. data/vendor/libgit2/include/git2/tag.h +3 -1
  161. data/vendor/libgit2/include/git2/trace.h +9 -3
  162. data/vendor/libgit2/include/git2/transaction.h +3 -2
  163. data/vendor/libgit2/include/git2/transport.h +11 -3
  164. data/vendor/libgit2/include/git2/tree.h +16 -5
  165. data/vendor/libgit2/include/git2/types.h +19 -3
  166. data/vendor/libgit2/include/git2/version.h +46 -8
  167. data/vendor/libgit2/include/git2/worktree.h +16 -6
  168. data/vendor/libgit2/src/CMakeLists.txt +6 -4
  169. data/vendor/libgit2/src/cli/CMakeLists.txt +3 -4
  170. data/vendor/libgit2/src/cli/cmd.c +1 -1
  171. data/vendor/libgit2/src/cli/cmd.h +4 -0
  172. data/vendor/libgit2/src/cli/cmd_blame.c +287 -0
  173. data/vendor/libgit2/src/cli/cmd_cat_file.c +6 -8
  174. data/vendor/libgit2/src/cli/cmd_clone.c +5 -7
  175. data/vendor/libgit2/src/cli/cmd_config.c +241 -0
  176. data/vendor/libgit2/src/cli/cmd_hash_object.c +6 -8
  177. data/vendor/libgit2/src/cli/cmd_help.c +6 -7
  178. data/vendor/libgit2/src/cli/cmd_index_pack.c +114 -0
  179. data/vendor/libgit2/src/cli/cmd_init.c +102 -0
  180. data/vendor/libgit2/src/cli/common.c +168 -0
  181. data/vendor/libgit2/src/cli/common.h +63 -0
  182. data/vendor/libgit2/src/cli/error.h +1 -1
  183. data/vendor/libgit2/src/cli/main.c +52 -24
  184. data/vendor/libgit2/src/cli/opt.c +31 -5
  185. data/vendor/libgit2/src/cli/opt.h +21 -3
  186. data/vendor/libgit2/src/cli/opt_usage.c +102 -33
  187. data/vendor/libgit2/src/cli/opt_usage.h +6 -1
  188. data/vendor/libgit2/src/cli/progress.c +51 -2
  189. data/vendor/libgit2/src/cli/progress.h +12 -0
  190. data/vendor/libgit2/src/cli/unix/sighandler.c +2 -1
  191. data/vendor/libgit2/src/cli/win32/precompiled.h +1 -1
  192. data/vendor/libgit2/src/cli/win32/sighandler.c +1 -1
  193. data/vendor/libgit2/src/libgit2/CMakeLists.txt +55 -21
  194. data/vendor/libgit2/src/libgit2/apply.c +10 -13
  195. data/vendor/libgit2/src/libgit2/attr.c +30 -13
  196. data/vendor/libgit2/src/libgit2/attr_file.c +17 -5
  197. data/vendor/libgit2/src/libgit2/attr_file.h +2 -0
  198. data/vendor/libgit2/src/libgit2/attrcache.c +69 -33
  199. data/vendor/libgit2/src/libgit2/attrcache.h +5 -9
  200. data/vendor/libgit2/src/libgit2/blame.c +130 -44
  201. data/vendor/libgit2/src/libgit2/blame.h +1 -0
  202. data/vendor/libgit2/src/libgit2/cache.c +22 -17
  203. data/vendor/libgit2/src/libgit2/cache.h +7 -9
  204. data/vendor/libgit2/src/libgit2/checkout.c +34 -24
  205. data/vendor/libgit2/src/libgit2/checkout.h +0 -2
  206. data/vendor/libgit2/src/libgit2/cherrypick.c +1 -2
  207. data/vendor/libgit2/src/libgit2/clone.c +192 -166
  208. data/vendor/libgit2/src/libgit2/clone.h +4 -1
  209. data/vendor/libgit2/src/libgit2/commit.c +93 -1
  210. data/vendor/libgit2/src/libgit2/commit_graph.c +68 -58
  211. data/vendor/libgit2/src/libgit2/commit_graph.h +1 -2
  212. data/vendor/libgit2/src/libgit2/config.c +390 -299
  213. data/vendor/libgit2/src/libgit2/config.cmake.in +3 -0
  214. data/vendor/libgit2/src/libgit2/config.h +9 -4
  215. data/vendor/libgit2/src/libgit2/config_backend.h +8 -10
  216. data/vendor/libgit2/src/libgit2/config_cache.c +4 -5
  217. data/vendor/libgit2/src/libgit2/config_file.c +101 -89
  218. data/vendor/libgit2/src/libgit2/config_list.c +285 -0
  219. data/vendor/libgit2/src/libgit2/config_list.h +32 -0
  220. data/vendor/libgit2/src/libgit2/config_mem.c +195 -40
  221. data/vendor/libgit2/src/libgit2/config_parse.c +12 -10
  222. data/vendor/libgit2/src/libgit2/config_snapshot.c +24 -31
  223. data/vendor/libgit2/src/libgit2/delta.c +5 -1
  224. data/vendor/libgit2/src/libgit2/describe.c +24 -24
  225. data/vendor/libgit2/src/libgit2/diff.c +1 -1
  226. data/vendor/libgit2/src/libgit2/diff_driver.c +13 -20
  227. data/vendor/libgit2/src/libgit2/diff_driver.h +2 -2
  228. data/vendor/libgit2/src/libgit2/diff_generate.c +3 -3
  229. data/vendor/libgit2/src/libgit2/diff_parse.c +2 -2
  230. data/vendor/libgit2/src/libgit2/diff_print.c +65 -9
  231. data/vendor/libgit2/src/libgit2/diff_stats.c +19 -12
  232. data/vendor/libgit2/src/libgit2/diff_tform.c +36 -8
  233. data/vendor/libgit2/src/libgit2/email.c +1 -0
  234. data/vendor/libgit2/src/libgit2/fetch.c +5 -3
  235. data/vendor/libgit2/src/libgit2/fetchhead.c +1 -1
  236. data/vendor/libgit2/src/libgit2/filter.c +5 -5
  237. data/vendor/libgit2/src/libgit2/git2.rc +3 -3
  238. data/vendor/libgit2/src/libgit2/grafts.c +18 -20
  239. data/vendor/libgit2/src/libgit2/grafts.h +0 -1
  240. data/vendor/libgit2/src/libgit2/graph.c +1 -1
  241. data/vendor/libgit2/src/libgit2/hashmap_oid.h +30 -0
  242. data/vendor/libgit2/src/libgit2/ignore.c +9 -5
  243. data/vendor/libgit2/src/libgit2/index.c +76 -98
  244. data/vendor/libgit2/src/libgit2/index.h +5 -2
  245. data/vendor/libgit2/src/libgit2/index_map.c +95 -0
  246. data/vendor/libgit2/src/libgit2/index_map.h +28 -0
  247. data/vendor/libgit2/src/libgit2/indexer.c +36 -40
  248. data/vendor/libgit2/src/libgit2/iterator.c +14 -8
  249. data/vendor/libgit2/src/libgit2/libgit2.c +153 -368
  250. data/vendor/libgit2/src/libgit2/mailmap.c +1 -1
  251. data/vendor/libgit2/src/libgit2/merge.c +43 -38
  252. data/vendor/libgit2/src/libgit2/merge.h +4 -0
  253. data/vendor/libgit2/src/libgit2/merge_driver.c +2 -2
  254. data/vendor/libgit2/src/libgit2/merge_file.c +43 -30
  255. data/vendor/libgit2/src/libgit2/message.c +1 -1
  256. data/vendor/libgit2/src/libgit2/midx.c +30 -18
  257. data/vendor/libgit2/src/libgit2/mwindow.c +38 -45
  258. data/vendor/libgit2/src/libgit2/mwindow.h +4 -0
  259. data/vendor/libgit2/src/libgit2/object.c +6 -5
  260. data/vendor/libgit2/src/libgit2/odb.c +7 -10
  261. data/vendor/libgit2/src/libgit2/odb_loose.c +24 -14
  262. data/vendor/libgit2/src/libgit2/odb_mempack.c +49 -17
  263. data/vendor/libgit2/src/libgit2/odb_pack.c +13 -5
  264. data/vendor/libgit2/src/libgit2/oid.c +36 -10
  265. data/vendor/libgit2/src/libgit2/oid.h +11 -0
  266. data/vendor/libgit2/src/libgit2/pack-objects.c +59 -34
  267. data/vendor/libgit2/src/libgit2/pack-objects.h +12 -4
  268. data/vendor/libgit2/src/libgit2/pack.c +33 -24
  269. data/vendor/libgit2/src/libgit2/pack.h +15 -10
  270. data/vendor/libgit2/src/libgit2/patch_parse.c +2 -2
  271. data/vendor/libgit2/src/libgit2/path.c +1 -1
  272. data/vendor/libgit2/src/libgit2/pathspec.c +1 -1
  273. data/vendor/libgit2/src/libgit2/push.c +79 -28
  274. data/vendor/libgit2/src/libgit2/push.h +1 -0
  275. data/vendor/libgit2/src/libgit2/refdb_fs.c +128 -61
  276. data/vendor/libgit2/src/libgit2/reflog.c +1 -2
  277. data/vendor/libgit2/src/libgit2/reflog.h +2 -0
  278. data/vendor/libgit2/src/libgit2/refs.c +41 -13
  279. data/vendor/libgit2/src/libgit2/refs.h +6 -1
  280. data/vendor/libgit2/src/libgit2/refspec.c +28 -1
  281. data/vendor/libgit2/src/libgit2/refspec.h +8 -0
  282. data/vendor/libgit2/src/libgit2/remote.c +125 -62
  283. data/vendor/libgit2/src/libgit2/remote.h +0 -1
  284. data/vendor/libgit2/src/libgit2/repository.c +235 -54
  285. data/vendor/libgit2/src/libgit2/repository.h +10 -6
  286. data/vendor/libgit2/src/libgit2/revert.c +1 -2
  287. data/vendor/libgit2/src/libgit2/revparse.c +2 -2
  288. data/vendor/libgit2/src/libgit2/revwalk.c +13 -10
  289. data/vendor/libgit2/src/libgit2/revwalk.h +3 -3
  290. data/vendor/libgit2/src/libgit2/settings.c +468 -0
  291. data/vendor/libgit2/src/libgit2/settings.h +6 -2
  292. data/vendor/libgit2/src/libgit2/signature.c +132 -15
  293. data/vendor/libgit2/src/libgit2/signature.h +0 -1
  294. data/vendor/libgit2/src/libgit2/status.c +1 -1
  295. data/vendor/libgit2/src/libgit2/streams/mbedtls.c +54 -60
  296. data/vendor/libgit2/src/libgit2/streams/openssl.c +32 -7
  297. data/vendor/libgit2/src/libgit2/streams/openssl.h +2 -0
  298. data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.c +4 -0
  299. data/vendor/libgit2/src/libgit2/streams/openssl_dynamic.h +3 -0
  300. data/vendor/libgit2/src/libgit2/streams/socket.c +30 -0
  301. data/vendor/libgit2/src/libgit2/streams/stransport.c +39 -7
  302. data/vendor/libgit2/src/libgit2/submodule.c +118 -68
  303. data/vendor/libgit2/src/libgit2/submodule.h +6 -7
  304. data/vendor/libgit2/src/libgit2/tag.c +4 -2
  305. data/vendor/libgit2/src/libgit2/trailer.c +6 -6
  306. data/vendor/libgit2/src/libgit2/transaction.c +26 -20
  307. data/vendor/libgit2/src/libgit2/transaction.h +4 -1
  308. data/vendor/libgit2/src/libgit2/transport.c +4 -1
  309. data/vendor/libgit2/src/libgit2/transports/auth_sspi.c +2 -0
  310. data/vendor/libgit2/src/libgit2/transports/credential.c +2 -2
  311. data/vendor/libgit2/src/libgit2/transports/git.c +1 -1
  312. data/vendor/libgit2/src/libgit2/transports/http.c +1 -2
  313. data/vendor/libgit2/src/libgit2/transports/http.h +0 -10
  314. data/vendor/libgit2/src/libgit2/transports/httpclient.c +124 -81
  315. data/vendor/libgit2/src/libgit2/transports/httpparser.c +128 -0
  316. data/vendor/libgit2/src/libgit2/transports/httpparser.h +99 -0
  317. data/vendor/libgit2/src/libgit2/transports/local.c +16 -8
  318. data/vendor/libgit2/src/libgit2/transports/smart.c +25 -13
  319. data/vendor/libgit2/src/libgit2/transports/smart.h +4 -2
  320. data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +5 -5
  321. data/vendor/libgit2/src/libgit2/transports/smart_protocol.c +55 -10
  322. data/vendor/libgit2/src/libgit2/transports/ssh.c +41 -1103
  323. data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +386 -0
  324. data/vendor/libgit2/src/libgit2/transports/ssh_exec.h +26 -0
  325. data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +1126 -0
  326. data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.h +28 -0
  327. data/vendor/libgit2/src/libgit2/transports/winhttp.c +35 -7
  328. data/vendor/libgit2/src/libgit2/tree.c +34 -26
  329. data/vendor/libgit2/src/libgit2/tree.h +3 -2
  330. data/vendor/libgit2/src/libgit2/worktree.c +14 -17
  331. data/vendor/libgit2/src/util/CMakeLists.txt +7 -10
  332. data/vendor/libgit2/src/util/alloc.c +4 -1
  333. data/vendor/libgit2/src/util/allocators/debugalloc.c +73 -0
  334. data/vendor/libgit2/src/{cli/cli.h → util/allocators/debugalloc.h} +6 -9
  335. data/vendor/libgit2/src/util/allocators/stdalloc.c +0 -10
  336. data/vendor/libgit2/src/util/array.h +18 -17
  337. data/vendor/libgit2/src/util/cc-compat.h +2 -0
  338. data/vendor/libgit2/src/util/ctype_compat.h +70 -0
  339. data/vendor/libgit2/src/util/date.c +22 -14
  340. data/vendor/libgit2/src/util/date.h +12 -0
  341. data/vendor/libgit2/src/util/errors.c +401 -0
  342. data/vendor/libgit2/src/{libgit2 → util}/errors.h +21 -17
  343. data/vendor/libgit2/src/util/fs_path.c +81 -10
  344. data/vendor/libgit2/src/util/fs_path.h +29 -0
  345. data/vendor/libgit2/src/util/futils.c +6 -5
  346. data/vendor/libgit2/src/util/futils.h +24 -7
  347. data/vendor/libgit2/src/util/git2_features.h.in +12 -1
  348. data/vendor/libgit2/src/util/git2_util.h +6 -0
  349. data/vendor/libgit2/src/util/hash/builtin.c +14 -4
  350. data/vendor/libgit2/src/util/hash/openssl.c +148 -0
  351. data/vendor/libgit2/src/util/hash/openssl.h +17 -1
  352. data/vendor/libgit2/src/util/hash/rfc6234/sha224-256.c +8 -6
  353. data/vendor/libgit2/src/util/hash/sha.h +4 -1
  354. data/vendor/libgit2/src/util/hashmap.h +425 -0
  355. data/vendor/libgit2/src/util/hashmap_str.h +43 -0
  356. data/vendor/libgit2/src/util/integer.h +3 -1
  357. data/vendor/libgit2/src/util/net.c +17 -11
  358. data/vendor/libgit2/src/util/net.h +2 -0
  359. data/vendor/libgit2/src/util/pool.c +1 -1
  360. data/vendor/libgit2/src/util/pool.h +5 -0
  361. data/vendor/libgit2/src/util/pqueue.h +1 -1
  362. data/vendor/libgit2/src/util/process.h +223 -0
  363. data/vendor/libgit2/src/util/rand.c +1 -7
  364. data/vendor/libgit2/src/util/regexp.c +1 -1
  365. data/vendor/libgit2/src/util/runtime.c +2 -2
  366. data/vendor/libgit2/src/util/sortedcache.c +14 -13
  367. data/vendor/libgit2/src/util/sortedcache.h +3 -3
  368. data/vendor/libgit2/src/util/str.c +20 -8
  369. data/vendor/libgit2/src/util/str.h +5 -3
  370. data/vendor/libgit2/src/util/strlist.c +108 -0
  371. data/vendor/libgit2/src/util/strlist.h +36 -0
  372. data/vendor/libgit2/src/util/unix/posix.h +0 -2
  373. data/vendor/libgit2/src/util/unix/process.c +706 -0
  374. data/vendor/libgit2/src/util/unix/realpath.c +23 -5
  375. data/vendor/libgit2/src/util/util.c +18 -5
  376. data/vendor/libgit2/src/util/util.h +5 -38
  377. data/vendor/libgit2/src/util/vector.c +3 -3
  378. data/vendor/libgit2/src/util/vector.h +2 -2
  379. data/vendor/libgit2/src/util/win32/path_w32.c +81 -5
  380. data/vendor/libgit2/src/util/win32/posix_w32.c +29 -6
  381. data/vendor/libgit2/src/util/win32/process.c +522 -0
  382. metadata +60 -32
  383. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -6
  384. data/vendor/libgit2/deps/http-parser/COPYING +0 -23
  385. data/vendor/libgit2/deps/http-parser/http_parser.c +0 -2182
  386. data/vendor/libgit2/deps/http-parser/http_parser.h +0 -305
  387. data/vendor/libgit2/deps/zlib/COPYING +0 -27
  388. data/vendor/libgit2/include/git2/sys/reflog.h +0 -21
  389. data/vendor/libgit2/src/libgit2/config_entries.c +0 -237
  390. data/vendor/libgit2/src/libgit2/config_entries.h +0 -24
  391. data/vendor/libgit2/src/libgit2/errors.c +0 -293
  392. data/vendor/libgit2/src/libgit2/idxmap.c +0 -157
  393. data/vendor/libgit2/src/libgit2/idxmap.h +0 -177
  394. data/vendor/libgit2/src/libgit2/libgit2.h +0 -15
  395. data/vendor/libgit2/src/libgit2/offmap.c +0 -101
  396. data/vendor/libgit2/src/libgit2/offmap.h +0 -133
  397. data/vendor/libgit2/src/libgit2/oidmap.c +0 -107
  398. data/vendor/libgit2/src/libgit2/oidmap.h +0 -128
  399. data/vendor/libgit2/src/libgit2/threadstate.c +0 -97
  400. data/vendor/libgit2/src/libgit2/threadstate.h +0 -22
  401. data/vendor/libgit2/src/libgit2/transports/ssh.h +0 -14
  402. data/vendor/libgit2/src/util/khash.h +0 -615
  403. data/vendor/libgit2/src/util/strmap.c +0 -100
  404. data/vendor/libgit2/src/util/strmap.h +0 -131
  405. /data/vendor/libgit2/cmake/{FindHTTPParser.cmake → FindHTTP_Parser.cmake} +0 -0
@@ -10,12 +10,14 @@
10
10
  #include "common.h"
11
11
  #include "types.h"
12
12
  #include "oid.h"
13
+ #include "odb.h"
13
14
  #include "buffer.h"
15
+ #include "commit.h"
14
16
 
15
17
  /**
16
18
  * @file git2/repository.h
17
- * @brief Git repository management routines
18
- * @defgroup git_repository Git repository management routines
19
+ * @brief The repository stores revisions for a source tree
20
+ * @defgroup git_repository The repository stores revisions for a source tree
19
21
  * @ingroup Git
20
22
  * @{
21
23
  */
@@ -30,7 +32,11 @@ GIT_BEGIN_DECL
30
32
  * The method will automatically detect if 'path' is a normal
31
33
  * or bare repository or fail is 'path' is neither.
32
34
  *
33
- * @param out pointer to the repo which will be opened
35
+ * Note that the libgit2 library _must_ be initialized using
36
+ * `git_libgit2_init` before any APIs can be called, including
37
+ * this one.
38
+ *
39
+ * @param[out] out pointer to the repo which will be opened
34
40
  * @param path the path to the repository
35
41
  * @return 0 or an error code
36
42
  */
@@ -56,19 +62,11 @@ GIT_EXTERN(int) git_repository_open_from_worktree(git_repository **out, git_work
56
62
  *
57
63
  * @param out pointer to the repo
58
64
  * @param odb the object database to wrap
59
- * @param oid_type the oid type of the object database
60
65
  * @return 0 or an error code
61
66
  */
62
- #ifdef GIT_EXPERIMENTAL_SHA256
63
- GIT_EXTERN(int) git_repository_wrap_odb(
64
- git_repository **out,
65
- git_odb *odb,
66
- git_oid_t oid_type);
67
- #else
68
67
  GIT_EXTERN(int) git_repository_wrap_odb(
69
68
  git_repository **out,
70
69
  git_odb *odb);
71
- #endif
72
70
 
73
71
  /**
74
72
  * Look for a git repository and copy its path in the given buffer.
@@ -80,6 +78,10 @@ GIT_EXTERN(int) git_repository_wrap_odb(
80
78
  * The method will automatically detect if the repository is bare
81
79
  * (if there is a repository).
82
80
  *
81
+ * Note that the libgit2 library _must_ be initialized using
82
+ * `git_libgit2_init` before any APIs can be called, including
83
+ * this one.
84
+ *
83
85
  * @param out A pointer to a user-allocated git_buf which will contain
84
86
  * the found path.
85
87
  *
@@ -157,7 +159,11 @@ typedef enum {
157
159
  /**
158
160
  * Find and open a repository with extended controls.
159
161
  *
160
- * @param out Pointer to the repo which will be opened. This can
162
+ * Note that the libgit2 library _must_ be initialized using
163
+ * `git_libgit2_init` before any APIs can be called, including
164
+ * this one.
165
+ *
166
+ * @param[out] out Pointer to the repo which will be opened. This can
161
167
  * actually be NULL if you only want to use the error code to
162
168
  * see if a repo at this path could be opened.
163
169
  * @param path Path to open as git repository. If the flags
@@ -185,7 +191,11 @@ GIT_EXTERN(int) git_repository_open_ext(
185
191
  * if you're e.g. hosting git repositories and need to access them
186
192
  * efficiently
187
193
  *
188
- * @param out Pointer to the repo which will be opened.
194
+ * Note that the libgit2 library _must_ be initialized using
195
+ * `git_libgit2_init` before any APIs can be called, including
196
+ * this one.
197
+ *
198
+ * @param[out] out Pointer to the repo which will be opened.
189
199
  * @param bare_path Direct path to the bare repository
190
200
  * @return 0 on success, or an error code
191
201
  */
@@ -210,7 +220,11 @@ GIT_EXTERN(void) git_repository_free(git_repository *repo);
210
220
  * TODO:
211
221
  * - Reinit the repository
212
222
  *
213
- * @param out pointer to the repo which will be created or reinitialized
223
+ * Note that the libgit2 library _must_ be initialized using
224
+ * `git_libgit2_init` before any APIs can be called, including
225
+ * this one.
226
+ *
227
+ * @param[out] out pointer to the repo which will be created or reinitialized
214
228
  * @param path the path to the repository
215
229
  * @param is_bare if true, a Git repository without a working directory is
216
230
  * created at the pointed path. If false, provided path will be
@@ -372,7 +386,10 @@ typedef struct {
372
386
  #endif
373
387
  } git_repository_init_options;
374
388
 
389
+ /** Current version for the `git_repository_init_options` structure */
375
390
  #define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
391
+
392
+ /** Static constructor for `git_repository_init_options` */
376
393
  #define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
377
394
 
378
395
  /**
@@ -397,6 +414,10 @@ GIT_EXTERN(int) git_repository_init_options_init(
397
414
  * auto-detect the case sensitivity of the file system and if the
398
415
  * file system supports file mode bits correctly.
399
416
  *
417
+ * Note that the libgit2 library _must_ be initialized using
418
+ * `git_libgit2_init` before any APIs can be called, including
419
+ * this one.
420
+ *
400
421
  * @param out Pointer to the repo which will be created or reinitialized.
401
422
  * @param repo_path The path to the repository.
402
423
  * @param opts Pointer to git_repository_init_options struct.
@@ -414,7 +435,7 @@ GIT_EXTERN(int) git_repository_init_ext(
414
435
  * `git_reference_free()` must be called when done with it to release the
415
436
  * allocated memory and prevent a leak.
416
437
  *
417
- * @param out pointer to the reference which will be retrieved
438
+ * @param[out] out pointer to the reference which will be retrieved
418
439
  * @param repo a repository object
419
440
  *
420
441
  * @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing
@@ -503,6 +524,7 @@ typedef enum {
503
524
  GIT_REPOSITORY_ITEM_LOGS,
504
525
  GIT_REPOSITORY_ITEM_MODULES,
505
526
  GIT_REPOSITORY_ITEM_WORKTREES,
527
+ GIT_REPOSITORY_ITEM_WORKTREE_CONFIG,
506
528
  GIT_REPOSITORY_ITEM__LAST
507
529
  } git_repository_item_t;
508
530
 
@@ -634,7 +656,7 @@ GIT_EXTERN(int) git_repository_config_snapshot(git_config **out, git_repository
634
656
  * The ODB must be freed once it's no longer being used by
635
657
  * the user.
636
658
  *
637
- * @param out Pointer to store the loaded ODB
659
+ * @param[out] out Pointer to store the loaded ODB
638
660
  * @param repo A repository object
639
661
  * @return 0, or an error code
640
662
  */
@@ -650,7 +672,7 @@ GIT_EXTERN(int) git_repository_odb(git_odb **out, git_repository *repo);
650
672
  * The refdb must be freed once it's no longer being used by
651
673
  * the user.
652
674
  *
653
- * @param out Pointer to store the loaded refdb
675
+ * @param[out] out Pointer to store the loaded refdb
654
676
  * @param repo A repository object
655
677
  * @return 0, or an error code
656
678
  */
@@ -666,7 +688,7 @@ GIT_EXTERN(int) git_repository_refdb(git_refdb **out, git_repository *repo);
666
688
  * The index must be freed once it's no longer being used by
667
689
  * the user.
668
690
  *
669
- * @param out Pointer to store the loaded index
691
+ * @param[out] out Pointer to store the loaded index
670
692
  * @param repo A repository object
671
693
  * @return 0, or an error code
672
694
  */
@@ -856,7 +878,9 @@ GIT_EXTERN(int) git_repository_set_head_detached(
856
878
  *
857
879
  * See the documentation for `git_repository_set_head_detached()`.
858
880
  *
859
- * @see git_repository_set_head_detached
881
+ * @param repo Repository pointer
882
+ * @param committish annotated commit to point HEAD to
883
+ * @return 0 on success, or an error code
860
884
  */
861
885
  GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
862
886
  git_repository *repo,
@@ -949,8 +973,8 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
949
973
  * The memory is owned by the repository and must not be freed by the
950
974
  * user.
951
975
  *
952
- * @param name where to store the pointer to the name
953
- * @param email where to store the pointer to the email
976
+ * @param[out] name where to store the pointer to the name
977
+ * @param[out] email where to store the pointer to the email
954
978
  * @param repo the repository
955
979
  * @return 0 or an error code
956
980
  */
@@ -978,6 +1002,18 @@ GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name,
978
1002
  */
979
1003
  GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo);
980
1004
 
1005
+ /**
1006
+ * Gets the parents of the next commit, given the current repository state.
1007
+ * Generally, this is the HEAD commit, except when performing a merge, in
1008
+ * which case it is two or more commits.
1009
+ *
1010
+ * @param commits a `git_commitarray` that will contain the commit parents
1011
+ * @param repo the repository
1012
+ * @return 0 or an error code
1013
+ */
1014
+ GIT_EXTERN(int) git_repository_commit_parents(git_commitarray *commits, git_repository *repo);
1015
+
981
1016
  /** @} */
982
1017
  GIT_END_DECL
1018
+
983
1019
  #endif
@@ -14,7 +14,7 @@
14
14
 
15
15
  /**
16
16
  * @file git2/reset.h
17
- * @brief Git reset management routines
17
+ * @brief Reset will update the local repository to a prior state
18
18
  * @ingroup Git
19
19
  * @{
20
20
  */
@@ -75,11 +75,23 @@ GIT_EXTERN(int) git_reset(
75
75
  *
76
76
  * See the documentation for `git_reset()`.
77
77
  *
78
- * @see git_reset
78
+ * @param repo Repository where to perform the reset operation.
79
+ *
80
+ * @param target Annotated commit to which the Head should be moved to.
81
+ * This object must belong to the given `repo`, it will be dereferenced
82
+ * to a git_commit which oid will be used as the target of the branch.
83
+ *
84
+ * @param reset_type Kind of reset operation to perform.
85
+ *
86
+ * @param checkout_opts Optional checkout options to be used for a HARD reset.
87
+ * The checkout_strategy field will be overridden (based on reset_type).
88
+ * This parameter can be used to propagate notify and progress callbacks.
89
+ *
90
+ * @return 0 on success or an error code
79
91
  */
80
92
  GIT_EXTERN(int) git_reset_from_annotated(
81
93
  git_repository *repo,
82
- const git_annotated_commit *commit,
94
+ const git_annotated_commit *target,
83
95
  git_reset_t reset_type,
84
96
  const git_checkout_options *checkout_opts);
85
97
 
@@ -108,4 +120,5 @@ GIT_EXTERN(int) git_reset_default(
108
120
 
109
121
  /** @} */
110
122
  GIT_END_DECL
123
+
111
124
  #endif
@@ -13,8 +13,8 @@
13
13
 
14
14
  /**
15
15
  * @file git2/revert.h
16
- * @brief Git revert routines
17
- * @defgroup git_revert Git revert routines
16
+ * @brief Cherry-pick the inverse of a change to "undo" its effects
17
+ * @defgroup git_revert Cherry-pick the inverse of a change to "undo" its effects
18
18
  * @ingroup Git
19
19
  * @{
20
20
  */
@@ -33,8 +33,13 @@ typedef struct {
33
33
  git_checkout_options checkout_opts; /**< Options for the checkout */
34
34
  } git_revert_options;
35
35
 
36
+ /** Current version for the `git_revert_options` structure */
36
37
  #define GIT_REVERT_OPTIONS_VERSION 1
37
- #define GIT_REVERT_OPTIONS_INIT {GIT_REVERT_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
38
+
39
+ /** Static constructor for `git_revert_options` */
40
+ #define GIT_REVERT_OPTIONS_INIT { \
41
+ GIT_REVERT_OPTIONS_VERSION, 0, \
42
+ GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT }
38
43
 
39
44
  /**
40
45
  * Initialize git_revert_options structure
@@ -87,5 +92,5 @@ GIT_EXTERN(int) git_revert(
87
92
 
88
93
  /** @} */
89
94
  GIT_END_DECL
90
- #endif
91
95
 
96
+ #endif
@@ -12,8 +12,8 @@
12
12
 
13
13
  /**
14
14
  * @file git2/revparse.h
15
- * @brief Git revision parsing routines
16
- * @defgroup git_revparse Git revision parsing routines
15
+ * @brief Parse the textual revision information
16
+ * @defgroup git_revparse Parse the textual revision information
17
17
  * @ingroup Git
18
18
  * @{
19
19
  */
@@ -107,7 +107,7 @@ GIT_EXTERN(int) git_revparse(
107
107
  git_repository *repo,
108
108
  const char *spec);
109
109
 
110
-
111
110
  /** @} */
112
111
  GIT_END_DECL
112
+
113
113
  #endif
@@ -13,8 +13,8 @@
13
13
 
14
14
  /**
15
15
  * @file git2/revwalk.h
16
- * @brief Git revision traversal routines
17
- * @defgroup git_revwalk Git revision traversal routines
16
+ * @brief Traverse (walk) the commit graph (revision history)
17
+ * @defgroup git_revwalk Traverse (walk) the commit graph (revision history)
18
18
  * @ingroup Git
19
19
  * @{
20
20
  */
@@ -299,4 +299,5 @@ GIT_EXTERN(int) git_revwalk_add_hide_cb(
299
299
 
300
300
  /** @} */
301
301
  GIT_END_DECL
302
+
302
303
  #endif
@@ -12,9 +12,13 @@
12
12
 
13
13
  /**
14
14
  * @file git2/signature.h
15
- * @brief Git signature creation
15
+ * @brief Signatures are the actor in a repository and when they acted
16
16
  * @defgroup git_signature Git signature creation
17
17
  * @ingroup Git
18
+ *
19
+ * Signatures contain the information about the actor (committer or
20
+ * author) in a repository, and the time that they performed the
21
+ * commit, or authoring.
18
22
  * @{
19
23
  */
20
24
  GIT_BEGIN_DECL
@@ -48,6 +52,42 @@ GIT_EXTERN(int) git_signature_new(git_signature **out, const char *name, const c
48
52
  */
49
53
  GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const char *email);
50
54
 
55
+ /**
56
+ * Create a new author and/or committer signatures with default
57
+ * information based on the configuration and environment variables.
58
+ *
59
+ * If `author_out` is set, it will be populated with the author
60
+ * information. The `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`
61
+ * environment variables will be honored, and `user.name` and
62
+ * `user.email` configuration options will be honored if the
63
+ * environment variables are unset. For timestamps, `GIT_AUTHOR_DATE`
64
+ * will be used, otherwise the current time will be used.
65
+ *
66
+ * If `committer_out` is set, it will be populated with the
67
+ * committer information. The `GIT_COMMITTER_NAME` and
68
+ * `GIT_COMMITTER_EMAIL` environment variables will be honored,
69
+ * and `user.name` and `user.email` configuration options will
70
+ * be honored if the environment variables are unset. For timestamps,
71
+ * `GIT_COMMITTER_DATE` will be used, otherwise the current time will
72
+ * be used.
73
+ *
74
+ * If neither `GIT_AUTHOR_DATE` nor `GIT_COMMITTER_DATE` are set,
75
+ * both timestamps will be set to the same time.
76
+ *
77
+ * It will return `GIT_ENOTFOUND` if either the `user.name` or
78
+ * `user.email` are not set and there is no fallback from an environment
79
+ * variable. One of `author_out` or `committer_out` must be set.
80
+ *
81
+ * @param author_out pointer to set the author signature, or NULL
82
+ * @param committer_out pointer to set the committer signature, or NULL
83
+ * @param repo repository pointer
84
+ * @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
85
+ */
86
+ GIT_EXTERN(int) git_signature_default_from_env(
87
+ git_signature **author_out,
88
+ git_signature **committer_out,
89
+ git_repository *repo);
90
+
51
91
  /**
52
92
  * Create a new action signature with default user and now timestamp.
53
93
  *
@@ -56,6 +96,10 @@ GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const c
56
96
  * based on that information. It will return GIT_ENOTFOUND if either the
57
97
  * user.name or user.email are not set.
58
98
  *
99
+ * Note that these do not examine environment variables, only the
100
+ * configuration files. Use `git_signature_default_from_env` to
101
+ * consider the environment variables.
102
+ *
59
103
  * @param out new signature
60
104
  * @param repo repository pointer
61
105
  * @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
@@ -100,4 +144,5 @@ GIT_EXTERN(void) git_signature_free(git_signature *sig);
100
144
 
101
145
  /** @} */
102
146
  GIT_END_DECL
147
+
103
148
  #endif
@@ -13,8 +13,13 @@
13
13
 
14
14
  /**
15
15
  * @file git2/stash.h
16
- * @brief Git stash management routines
16
+ * @brief Stashes stores some uncommitted state in the repository
17
17
  * @ingroup Git
18
+ *
19
+ * Stashes stores some uncommitted state in the repository; generally
20
+ * this allows a user to stash some changes so that they can restore
21
+ * the working directory to an unmodified state. This can allow a
22
+ * developer to work on two different changes in parallel.
18
23
  * @{
19
24
  */
20
25
  GIT_BEGIN_DECL
@@ -94,7 +99,10 @@ typedef struct git_stash_save_options {
94
99
  git_strarray paths;
95
100
  } git_stash_save_options;
96
101
 
102
+ /** Current version for the `git_stash_save_options` structure */
97
103
  #define GIT_STASH_SAVE_OPTIONS_VERSION 1
104
+
105
+ /** Static constructor for `git_stash_save_options` */
98
106
  #define GIT_STASH_SAVE_OPTIONS_INIT { GIT_STASH_SAVE_OPTIONS_VERSION }
99
107
 
100
108
  /**
@@ -165,6 +173,10 @@ typedef enum {
165
173
  * Stash application progress notification function.
166
174
  * Return 0 to continue processing, or a negative value to
167
175
  * abort the stash application.
176
+ *
177
+ * @param progress the progress information
178
+ * @param payload the user-specified payload to the apply function
179
+ * @return 0 on success, -1 on error
168
180
  */
169
181
  typedef int GIT_CALLBACK(git_stash_apply_progress_cb)(
170
182
  git_stash_apply_progress_t progress,
@@ -191,7 +203,10 @@ typedef struct git_stash_apply_options {
191
203
  void *progress_payload;
192
204
  } git_stash_apply_options;
193
205
 
206
+ /** Current version for the `git_stash_apply_options` structure */
194
207
  #define GIT_STASH_APPLY_OPTIONS_VERSION 1
208
+
209
+ /** Static constructor for `git_stash_apply_options` */
195
210
  #define GIT_STASH_APPLY_OPTIONS_INIT { \
196
211
  GIT_STASH_APPLY_OPTIONS_VERSION, \
197
212
  GIT_STASH_APPLY_DEFAULT, \
@@ -225,8 +240,6 @@ GIT_EXTERN(int) git_stash_apply_options_init(
225
240
  * GIT_EMERGECONFLICT and both the working directory and index will be left
226
241
  * unmodified.
227
242
  *
228
- * Note that a minimum checkout strategy of `GIT_CHECKOUT_SAFE` is implied.
229
- *
230
243
  * @param repo The owning repository.
231
244
  * @param index The position within the stash list. 0 points to the
232
245
  * most recent stashed state.
@@ -311,4 +324,5 @@ GIT_EXTERN(int) git_stash_pop(
311
324
 
312
325
  /** @} */
313
326
  GIT_END_DECL
327
+
314
328
  #endif
@@ -14,7 +14,7 @@
14
14
 
15
15
  /**
16
16
  * @file git2/status.h
17
- * @brief Git file status routines
17
+ * @brief Status indicates how a user has changed the working directory and index
18
18
  * @defgroup git_status Git file status routines
19
19
  * @ingroup Git
20
20
  * @{
@@ -54,11 +54,10 @@ typedef enum {
54
54
  /**
55
55
  * Function pointer to receive status on individual files
56
56
  *
57
- * `path` is the relative path to the file from the root of the repository.
58
- *
59
- * `status_flags` is a combination of `git_status_t` values that apply.
60
- *
61
- * `payload` is the value you passed to the foreach function as payload.
57
+ * @param path is the path to the file
58
+ * @param status_flags the `git_status_t` values for file's status
59
+ * @param payload the user-specified payload to the foreach function
60
+ * @return 0 on success, or a negative number on failure
62
61
  */
63
62
  typedef int GIT_CALLBACK(git_status_cb)(
64
63
  const char *path, unsigned int status_flags, void *payload);
@@ -207,6 +206,7 @@ typedef enum {
207
206
  GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 15)
208
207
  } git_status_opt_t;
209
208
 
209
+ /** Default `git_status_opt_t` values */
210
210
  #define GIT_STATUS_OPT_DEFAULTS \
211
211
  (GIT_STATUS_OPT_INCLUDE_IGNORED | \
212
212
  GIT_STATUS_OPT_INCLUDE_UNTRACKED | \
@@ -261,7 +261,10 @@ typedef struct {
261
261
  uint16_t rename_threshold;
262
262
  } git_status_options;
263
263
 
264
+ /** Current version for the `git_status_options` structure */
264
265
  #define GIT_STATUS_OPTIONS_VERSION 1
266
+
267
+ /** Static constructor for `git_status_options` */
265
268
  #define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION}
266
269
 
267
270
  /**
@@ -449,4 +452,5 @@ GIT_EXTERN(int) git_status_should_ignore(
449
452
 
450
453
  /** @} */
451
454
  GIT_END_DECL
455
+
452
456
  #endif