rugged 1.0.1 → 1.3.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 (349) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -0
  3. data/README.md +1 -1
  4. data/ext/rugged/rugged.c +7 -4
  5. data/ext/rugged/rugged_commit.c +1 -1
  6. data/ext/rugged/rugged_object.c +1 -1
  7. data/ext/rugged/rugged_repo.c +3 -3
  8. data/lib/rugged/commit.rb +16 -2
  9. data/lib/rugged/repository.rb +2 -2
  10. data/lib/rugged/version.rb +1 -1
  11. data/vendor/libgit2/CMakeLists.txt +41 -74
  12. data/vendor/libgit2/COPYING +109 -1
  13. data/vendor/libgit2/cmake/{Modules/AddCFlagIfSupported.cmake → AddCFlagIfSupported.cmake} +0 -0
  14. data/vendor/libgit2/cmake/{Modules/EnableWarnings.cmake → EnableWarnings.cmake} +0 -0
  15. data/vendor/libgit2/cmake/{Modules/FindCoreFoundation.cmake → FindCoreFoundation.cmake} +0 -0
  16. data/vendor/libgit2/cmake/{Modules/FindGSSAPI.cmake → FindGSSAPI.cmake} +0 -0
  17. data/vendor/libgit2/cmake/{Modules/FindGSSFramework.cmake → FindGSSFramework.cmake} +0 -0
  18. data/vendor/libgit2/cmake/{Modules/FindHTTP_Parser.cmake → FindHTTP_Parser.cmake} +0 -0
  19. data/vendor/libgit2/cmake/{Modules/FindIconv.cmake → FindIconv.cmake} +0 -0
  20. data/vendor/libgit2/cmake/FindLibSSH2.cmake +13 -0
  21. data/vendor/libgit2/cmake/{Modules/FindPCRE.cmake → FindPCRE.cmake} +0 -0
  22. data/vendor/libgit2/cmake/{Modules/FindPCRE2.cmake → FindPCRE2.cmake} +0 -0
  23. data/vendor/libgit2/cmake/{Modules/FindPkgLibraries.cmake → FindPkgLibraries.cmake} +0 -0
  24. data/vendor/libgit2/cmake/{Modules/FindSecurity.cmake → FindSecurity.cmake} +0 -0
  25. data/vendor/libgit2/cmake/{Modules/FindStatNsec.cmake → FindStatNsec.cmake} +0 -0
  26. data/vendor/libgit2/cmake/Findfutimens.cmake +14 -0
  27. data/vendor/libgit2/cmake/{Modules/FindmbedTLS.cmake → FindmbedTLS.cmake} +0 -0
  28. data/vendor/libgit2/cmake/{Modules/IdeSplitSources.cmake → IdeSplitSources.cmake} +0 -0
  29. data/vendor/libgit2/cmake/{Modules/PkgBuildConfig.cmake → PkgBuildConfig.cmake} +0 -0
  30. data/vendor/libgit2/cmake/{Modules/SanitizeBool.cmake → SanitizeBool.cmake} +0 -0
  31. data/vendor/libgit2/cmake/{Modules/SelectGSSAPI.cmake → SelectGSSAPI.cmake} +18 -26
  32. data/vendor/libgit2/cmake/{Modules/SelectHTTPSBackend.cmake → SelectHTTPSBackend.cmake} +29 -32
  33. data/vendor/libgit2/cmake/{Modules/SelectHashes.cmake → SelectHashes.cmake} +21 -28
  34. data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +101 -0
  35. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +4 -3
  36. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +24 -10
  37. data/vendor/libgit2/deps/ntlmclient/compat.h +0 -27
  38. data/vendor/libgit2/deps/ntlmclient/crypt.h +14 -9
  39. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.c +20 -20
  40. data/vendor/libgit2/deps/ntlmclient/crypt_commoncrypto.h +3 -3
  41. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.c +37 -36
  42. data/vendor/libgit2/deps/ntlmclient/crypt_mbedtls.h +4 -3
  43. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +178 -51
  44. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.h +74 -5
  45. data/vendor/libgit2/deps/ntlmclient/ntlm.c +164 -135
  46. data/vendor/libgit2/deps/ntlmclient/ntlm.h +13 -9
  47. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +16 -3
  48. data/vendor/libgit2/deps/ntlmclient/unicode.h +10 -4
  49. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.c +16 -27
  50. data/vendor/libgit2/deps/ntlmclient/unicode_builtin.h +20 -0
  51. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.c +28 -52
  52. data/vendor/libgit2/deps/ntlmclient/unicode_iconv.h +22 -0
  53. data/vendor/libgit2/deps/ntlmclient/util.c +15 -1
  54. data/vendor/libgit2/deps/ntlmclient/util.h +2 -1
  55. data/vendor/libgit2/deps/pcre/LICENCE +93 -0
  56. data/vendor/libgit2/deps/pcre/pcre.h +2 -2
  57. data/vendor/libgit2/deps/pcre/pcre_compile.c +29 -17
  58. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +4 -4
  59. data/vendor/libgit2/deps/pcre/pcreposix.c +2 -3
  60. data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -5
  61. data/vendor/libgit2/deps/zlib/deflate.c +1 -0
  62. data/vendor/libgit2/include/git2/annotated_commit.h +1 -1
  63. data/vendor/libgit2/include/git2/apply.h +2 -0
  64. data/vendor/libgit2/include/git2/attr.h +95 -0
  65. data/vendor/libgit2/include/git2/blame.h +95 -42
  66. data/vendor/libgit2/include/git2/blob.h +37 -3
  67. data/vendor/libgit2/include/git2/branch.h +25 -0
  68. data/vendor/libgit2/include/git2/cert.h +42 -5
  69. data/vendor/libgit2/include/git2/checkout.h +28 -12
  70. data/vendor/libgit2/include/git2/clone.h +1 -1
  71. data/vendor/libgit2/include/git2/commit.h +35 -19
  72. data/vendor/libgit2/include/git2/common.h +51 -6
  73. data/vendor/libgit2/include/git2/config.h +1 -1
  74. data/vendor/libgit2/include/git2/deprecated.h +368 -8
  75. data/vendor/libgit2/include/git2/diff.h +34 -113
  76. data/vendor/libgit2/include/git2/email.h +127 -0
  77. data/vendor/libgit2/include/git2/errors.h +8 -7
  78. data/vendor/libgit2/include/git2/filter.h +63 -17
  79. data/vendor/libgit2/include/git2/graph.h +20 -2
  80. data/vendor/libgit2/include/git2/index.h +4 -5
  81. data/vendor/libgit2/include/git2/indexer.h +2 -1
  82. data/vendor/libgit2/include/git2/notes.h +2 -2
  83. data/vendor/libgit2/include/git2/odb.h +44 -20
  84. data/vendor/libgit2/include/git2/oidarray.h +5 -8
  85. data/vendor/libgit2/include/git2/pack.h +1 -1
  86. data/vendor/libgit2/include/git2/patch.h +8 -0
  87. data/vendor/libgit2/include/git2/rebase.h +25 -1
  88. data/vendor/libgit2/include/git2/refs.h +9 -5
  89. data/vendor/libgit2/include/git2/remote.h +62 -9
  90. data/vendor/libgit2/include/git2/repository.h +107 -62
  91. data/vendor/libgit2/include/git2/revparse.h +5 -5
  92. data/vendor/libgit2/include/git2/stash.h +1 -1
  93. data/vendor/libgit2/include/git2/status.h +115 -59
  94. data/vendor/libgit2/include/git2/stdint.h +3 -3
  95. data/vendor/libgit2/include/git2/strarray.h +6 -10
  96. data/vendor/libgit2/include/git2/submodule.h +9 -0
  97. data/vendor/libgit2/include/git2/sys/commit_graph.h +174 -0
  98. data/vendor/libgit2/include/git2/sys/email.h +45 -0
  99. data/vendor/libgit2/include/git2/sys/filter.h +49 -28
  100. data/vendor/libgit2/include/git2/sys/midx.h +74 -0
  101. data/vendor/libgit2/include/git2/sys/odb_backend.h +7 -0
  102. data/vendor/libgit2/include/git2/sys/transport.h +1 -0
  103. data/vendor/libgit2/include/git2/tag.h +12 -0
  104. data/vendor/libgit2/include/git2/transport.h +1 -1
  105. data/vendor/libgit2/include/git2/tree.h +2 -14
  106. data/vendor/libgit2/include/git2/types.h +9 -0
  107. data/vendor/libgit2/include/git2/version.h +4 -4
  108. data/vendor/libgit2/include/git2/worktree.h +1 -0
  109. data/vendor/libgit2/include/git2.h +1 -0
  110. data/vendor/libgit2/src/CMakeLists.txt +84 -44
  111. data/vendor/libgit2/src/alloc.c +21 -8
  112. data/vendor/libgit2/src/allocators/failalloc.c +92 -0
  113. data/vendor/libgit2/src/allocators/failalloc.h +23 -0
  114. data/vendor/libgit2/src/allocators/stdalloc.c +41 -10
  115. data/vendor/libgit2/src/allocators/win32_leakcheck.c +118 -0
  116. data/vendor/libgit2/src/allocators/{win32_crtdbg.h → win32_leakcheck.h} +3 -3
  117. data/vendor/libgit2/src/annotated_commit.c +21 -9
  118. data/vendor/libgit2/src/apply.c +21 -8
  119. data/vendor/libgit2/src/array.h +11 -11
  120. data/vendor/libgit2/src/assert_safe.h +58 -0
  121. data/vendor/libgit2/src/attr.c +192 -70
  122. data/vendor/libgit2/src/attr_file.c +99 -41
  123. data/vendor/libgit2/src/attr_file.h +32 -11
  124. data/vendor/libgit2/src/attrcache.c +44 -40
  125. data/vendor/libgit2/src/attrcache.h +4 -5
  126. data/vendor/libgit2/src/blame.c +32 -19
  127. data/vendor/libgit2/src/blame_git.c +7 -4
  128. data/vendor/libgit2/src/blob.c +60 -32
  129. data/vendor/libgit2/src/branch.c +87 -37
  130. data/vendor/libgit2/src/buffer.c +349 -29
  131. data/vendor/libgit2/src/buffer.h +154 -2
  132. data/vendor/libgit2/src/cache.c +3 -24
  133. data/vendor/libgit2/src/cache.h +7 -7
  134. data/vendor/libgit2/src/cc-compat.h +10 -8
  135. data/vendor/libgit2/src/checkout.c +103 -105
  136. data/vendor/libgit2/src/cherrypick.c +8 -2
  137. data/vendor/libgit2/src/clone.c +105 -30
  138. data/vendor/libgit2/src/commit.c +41 -28
  139. data/vendor/libgit2/src/commit_graph.c +1209 -0
  140. data/vendor/libgit2/src/commit_graph.h +162 -0
  141. data/vendor/libgit2/src/commit_list.c +46 -0
  142. data/vendor/libgit2/src/commit_list.h +2 -0
  143. data/vendor/libgit2/src/common.h +26 -2
  144. data/vendor/libgit2/src/config.c +41 -23
  145. data/vendor/libgit2/src/config_cache.c +9 -4
  146. data/vendor/libgit2/src/config_entries.c +35 -27
  147. data/vendor/libgit2/src/config_file.c +17 -9
  148. data/vendor/libgit2/src/config_parse.c +6 -8
  149. data/vendor/libgit2/src/config_snapshot.c +2 -1
  150. data/vendor/libgit2/src/crlf.c +16 -6
  151. data/vendor/libgit2/src/date.c +4 -3
  152. data/vendor/libgit2/src/delta.c +1 -1
  153. data/vendor/libgit2/src/describe.c +12 -5
  154. data/vendor/libgit2/src/diff.c +55 -183
  155. data/vendor/libgit2/src/diff_driver.c +21 -17
  156. data/vendor/libgit2/src/diff_file.c +5 -7
  157. data/vendor/libgit2/src/diff_generate.c +56 -28
  158. data/vendor/libgit2/src/diff_parse.c +2 -3
  159. data/vendor/libgit2/src/diff_print.c +81 -65
  160. data/vendor/libgit2/src/diff_stats.c +19 -16
  161. data/vendor/libgit2/src/diff_tform.c +13 -13
  162. data/vendor/libgit2/src/diff_xdiff.c +4 -2
  163. data/vendor/libgit2/src/diff_xdiff.h +1 -1
  164. data/vendor/libgit2/src/email.c +299 -0
  165. data/vendor/libgit2/src/email.h +25 -0
  166. data/vendor/libgit2/src/errors.c +26 -19
  167. data/vendor/libgit2/src/features.h.in +5 -1
  168. data/vendor/libgit2/src/fetch.c +7 -2
  169. data/vendor/libgit2/src/fetchhead.c +8 -4
  170. data/vendor/libgit2/src/filebuf.c +9 -7
  171. data/vendor/libgit2/src/filter.c +215 -113
  172. data/vendor/libgit2/src/filter.h +24 -5
  173. data/vendor/libgit2/src/futils.c +8 -8
  174. data/vendor/libgit2/src/futils.h +4 -4
  175. data/vendor/libgit2/src/graph.c +64 -9
  176. data/vendor/libgit2/src/hash/sha1/collisiondetect.c +3 -3
  177. data/vendor/libgit2/src/hash/sha1/common_crypto.c +3 -3
  178. data/vendor/libgit2/src/hash/sha1/generic.h +1 -1
  179. data/vendor/libgit2/src/hash/sha1/mbedtls.c +12 -12
  180. data/vendor/libgit2/src/hash/sha1/openssl.c +3 -3
  181. data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +8 -10
  182. data/vendor/libgit2/src/hash/sha1/win32.c +15 -11
  183. data/vendor/libgit2/src/hash.c +16 -13
  184. data/vendor/libgit2/src/hash.h +1 -1
  185. data/vendor/libgit2/src/hashsig.c +23 -10
  186. data/vendor/libgit2/src/ident.c +13 -3
  187. data/vendor/libgit2/src/idxmap.c +0 -22
  188. data/vendor/libgit2/src/ignore.c +33 -17
  189. data/vendor/libgit2/src/index.c +124 -82
  190. data/vendor/libgit2/src/index.h +1 -1
  191. data/vendor/libgit2/src/indexer.c +95 -37
  192. data/vendor/libgit2/src/integer.h +79 -2
  193. data/vendor/libgit2/src/iterator.c +40 -28
  194. data/vendor/libgit2/src/iterator.h +1 -1
  195. data/vendor/libgit2/src/khash.h +2 -11
  196. data/vendor/libgit2/src/{settings.c → libgit2.c} +148 -49
  197. data/vendor/libgit2/src/libgit2.h +15 -0
  198. data/vendor/libgit2/src/mailmap.c +23 -10
  199. data/vendor/libgit2/src/map.h +3 -3
  200. data/vendor/libgit2/src/merge.c +95 -43
  201. data/vendor/libgit2/src/merge.h +2 -1
  202. data/vendor/libgit2/src/merge_driver.c +19 -13
  203. data/vendor/libgit2/src/merge_file.c +15 -9
  204. data/vendor/libgit2/src/message.c +3 -1
  205. data/vendor/libgit2/src/midx.c +879 -0
  206. data/vendor/libgit2/src/midx.h +110 -0
  207. data/vendor/libgit2/src/mwindow.c +214 -95
  208. data/vendor/libgit2/src/mwindow.h +3 -3
  209. data/vendor/libgit2/src/net.c +133 -4
  210. data/vendor/libgit2/src/net.h +16 -2
  211. data/vendor/libgit2/src/netops.c +6 -4
  212. data/vendor/libgit2/src/netops.h +2 -2
  213. data/vendor/libgit2/src/notes.c +40 -40
  214. data/vendor/libgit2/src/object.c +24 -15
  215. data/vendor/libgit2/src/odb.c +298 -57
  216. data/vendor/libgit2/src/odb.h +16 -2
  217. data/vendor/libgit2/src/odb_loose.c +31 -21
  218. data/vendor/libgit2/src/odb_mempack.c +3 -1
  219. data/vendor/libgit2/src/odb_pack.c +391 -114
  220. data/vendor/libgit2/src/oid.c +7 -4
  221. data/vendor/libgit2/src/oidarray.c +10 -1
  222. data/vendor/libgit2/src/pack-objects.c +83 -69
  223. data/vendor/libgit2/src/pack.c +383 -150
  224. data/vendor/libgit2/src/pack.h +44 -9
  225. data/vendor/libgit2/src/patch.c +14 -7
  226. data/vendor/libgit2/src/patch_generate.c +3 -5
  227. data/vendor/libgit2/src/patch_parse.c +6 -3
  228. data/vendor/libgit2/src/path.c +103 -58
  229. data/vendor/libgit2/src/path.h +80 -7
  230. data/vendor/libgit2/src/pathspec.c +12 -11
  231. data/vendor/libgit2/src/pool.c +34 -22
  232. data/vendor/libgit2/src/pool.h +9 -1
  233. data/vendor/libgit2/src/posix.c +43 -12
  234. data/vendor/libgit2/src/posix.h +9 -0
  235. data/vendor/libgit2/src/proxy.c +2 -0
  236. data/vendor/libgit2/src/push.c +2 -0
  237. data/vendor/libgit2/src/reader.c +10 -6
  238. data/vendor/libgit2/src/rebase.c +95 -49
  239. data/vendor/libgit2/src/refdb.c +165 -13
  240. data/vendor/libgit2/src/refdb.h +69 -0
  241. data/vendor/libgit2/src/refdb_fs.c +145 -153
  242. data/vendor/libgit2/src/reflog.c +21 -20
  243. data/vendor/libgit2/src/refs.c +153 -233
  244. data/vendor/libgit2/src/refs.h +2 -20
  245. data/vendor/libgit2/src/refspec.c +81 -45
  246. data/vendor/libgit2/src/regexp.c +2 -2
  247. data/vendor/libgit2/src/remote.c +320 -122
  248. data/vendor/libgit2/src/remote.h +2 -1
  249. data/vendor/libgit2/src/repository.c +476 -203
  250. data/vendor/libgit2/src/repository.h +27 -29
  251. data/vendor/libgit2/src/reset.c +8 -7
  252. data/vendor/libgit2/src/revert.c +8 -2
  253. data/vendor/libgit2/src/revparse.c +23 -17
  254. data/vendor/libgit2/src/revwalk.c +35 -20
  255. data/vendor/libgit2/src/runtime.c +162 -0
  256. data/vendor/libgit2/src/runtime.h +62 -0
  257. data/vendor/libgit2/src/{refdb_fs.h → settings.h} +3 -11
  258. data/vendor/libgit2/src/signature.c +6 -5
  259. data/vendor/libgit2/src/sortedcache.c +2 -3
  260. data/vendor/libgit2/src/sortedcache.h +10 -8
  261. data/vendor/libgit2/src/stash.c +6 -2
  262. data/vendor/libgit2/src/status.c +9 -4
  263. data/vendor/libgit2/src/strarray.c +64 -0
  264. data/vendor/libgit2/src/streams/mbedtls.c +14 -17
  265. data/vendor/libgit2/src/streams/mbedtls.h +1 -1
  266. data/vendor/libgit2/src/streams/openssl.c +113 -207
  267. data/vendor/libgit2/src/streams/openssl.h +9 -1
  268. data/vendor/libgit2/src/streams/openssl_dynamic.c +309 -0
  269. data/vendor/libgit2/src/streams/openssl_dynamic.h +348 -0
  270. data/vendor/libgit2/src/streams/openssl_legacy.c +203 -0
  271. data/vendor/libgit2/src/streams/openssl_legacy.h +63 -0
  272. data/vendor/libgit2/src/streams/registry.c +10 -9
  273. data/vendor/libgit2/src/streams/socket.c +6 -2
  274. data/vendor/libgit2/src/streams/stransport.c +6 -3
  275. data/vendor/libgit2/src/streams/tls.c +5 -3
  276. data/vendor/libgit2/src/submodule.c +134 -66
  277. data/vendor/libgit2/src/submodule.h +9 -9
  278. data/vendor/libgit2/src/sysdir.c +8 -26
  279. data/vendor/libgit2/src/sysdir.h +0 -11
  280. data/vendor/libgit2/src/tag.c +49 -11
  281. data/vendor/libgit2/src/thread.c +140 -0
  282. data/vendor/libgit2/src/thread.h +479 -0
  283. data/vendor/libgit2/src/threadstate.c +84 -0
  284. data/vendor/libgit2/src/threadstate.h +24 -0
  285. data/vendor/libgit2/src/trace.c +2 -2
  286. data/vendor/libgit2/src/trace.h +17 -13
  287. data/vendor/libgit2/src/trailer.c +1 -1
  288. data/vendor/libgit2/src/transaction.c +21 -9
  289. data/vendor/libgit2/src/transport.c +3 -3
  290. data/vendor/libgit2/src/transports/auth.c +1 -1
  291. data/vendor/libgit2/src/transports/auth_negotiate.c +11 -4
  292. data/vendor/libgit2/src/transports/auth_ntlm.c +10 -6
  293. data/vendor/libgit2/src/transports/credential.c +17 -7
  294. data/vendor/libgit2/src/transports/credential_helpers.c +2 -0
  295. data/vendor/libgit2/src/transports/git.c +1 -3
  296. data/vendor/libgit2/src/transports/http.c +19 -17
  297. data/vendor/libgit2/src/transports/http.h +1 -0
  298. data/vendor/libgit2/src/transports/httpclient.c +68 -38
  299. data/vendor/libgit2/src/transports/httpclient.h +1 -1
  300. data/vendor/libgit2/src/transports/local.c +5 -5
  301. data/vendor/libgit2/src/transports/smart.c +14 -9
  302. data/vendor/libgit2/src/transports/smart.h +1 -1
  303. data/vendor/libgit2/src/transports/smart_protocol.c +11 -5
  304. data/vendor/libgit2/src/transports/ssh.c +55 -21
  305. data/vendor/libgit2/src/transports/winhttp.c +157 -89
  306. data/vendor/libgit2/src/tree.c +100 -77
  307. data/vendor/libgit2/src/tree.h +1 -0
  308. data/vendor/libgit2/src/tsort.c +0 -2
  309. data/vendor/libgit2/src/unix/map.c +3 -1
  310. data/vendor/libgit2/src/unix/posix.h +16 -1
  311. data/vendor/libgit2/src/unix/pthread.h +2 -1
  312. data/vendor/libgit2/src/utf8.c +150 -0
  313. data/vendor/libgit2/src/utf8.h +52 -0
  314. data/vendor/libgit2/src/util.c +75 -184
  315. data/vendor/libgit2/src/util.h +34 -40
  316. data/vendor/libgit2/src/vector.c +23 -19
  317. data/vendor/libgit2/src/vector.h +4 -2
  318. data/vendor/libgit2/src/win32/findfile.c +5 -3
  319. data/vendor/libgit2/src/win32/git2.rc +18 -3
  320. data/vendor/libgit2/src/win32/map.c +1 -1
  321. data/vendor/libgit2/src/win32/msvc-compat.h +9 -1
  322. data/vendor/libgit2/src/win32/path_w32.c +23 -25
  323. data/vendor/libgit2/src/win32/path_w32.h +0 -1
  324. data/vendor/libgit2/src/win32/posix.h +6 -6
  325. data/vendor/libgit2/src/win32/posix_w32.c +86 -7
  326. data/vendor/libgit2/src/win32/precompiled.h +0 -1
  327. data/vendor/libgit2/src/win32/reparse.h +4 -4
  328. data/vendor/libgit2/src/win32/thread.c +24 -15
  329. data/vendor/libgit2/src/win32/thread.h +1 -1
  330. data/vendor/libgit2/src/win32/w32_buffer.c +3 -3
  331. data/vendor/libgit2/src/win32/w32_common.h +18 -9
  332. data/vendor/libgit2/src/win32/{w32_crtdbg_stacktrace.c → w32_leakcheck.c} +269 -33
  333. data/vendor/libgit2/src/win32/w32_leakcheck.h +222 -0
  334. data/vendor/libgit2/src/win32/w32_util.h +6 -6
  335. data/vendor/libgit2/src/worktree.c +36 -14
  336. data/vendor/libgit2/src/zstream.c +1 -1
  337. metadata +65 -42
  338. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +0 -29
  339. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +0 -96
  340. data/vendor/libgit2/src/allocators/win32_crtdbg.c +0 -118
  341. data/vendor/libgit2/src/buf_text.c +0 -316
  342. data/vendor/libgit2/src/buf_text.h +0 -122
  343. data/vendor/libgit2/src/global.c +0 -361
  344. data/vendor/libgit2/src/global.h +0 -41
  345. data/vendor/libgit2/src/thread-utils.c +0 -58
  346. data/vendor/libgit2/src/thread-utils.h +0 -246
  347. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +0 -127
  348. data/vendor/libgit2/src/win32/w32_stack.c +0 -188
  349. data/vendor/libgit2/src/win32/w32_stack.h +0 -140
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a71025a0b98dfed66af094ccdc24138d61bf4159eb05c49bf8fb9823a5ba34b
4
- data.tar.gz: c1e1978022f16609de31a310a476c8f0d96cc26018c92f41bd7c10d5fac42cd2
3
+ metadata.gz: d2445a318b46ff0a26c2fbc62b53b5351eb95cee994fa508d267b9c0f9a14edc
4
+ data.tar.gz: fe54aabe575a4a922f6fd8623252d26bcf278d40ba0823b21a367faab7411720
5
5
  SHA512:
6
- metadata.gz: 3a17566ce7dc49b8fe819e4b6c1ef44a7afc6fd538895f93177332273330cd1aedcf855f2ee3093a0deb74a2fff16d22f9b4a3e602a3d6a9e9ed782a013d9227
7
- data.tar.gz: 2f36b64dab2fe738396b5ab5fc9c64354266d4bd3338ff77a8298a8bd0a659e37915945101583436113bf72d7db47d063e0a6aef27a877a84e1a175f13fcc7df
6
+ metadata.gz: 49024fdc5cb1f9a1703c8b142f38799aa2fe78eb0abb2506befc84e5899225a347cdb09af0af5709bd5f4b29599f5cd2ebe05757466803cba25e5b747fbe59ad
7
+ data.tar.gz: 024216a35e8310c6ac6dc5e7dfc73b06f06c66960f6307c3dd35f52f4d8ee46bab40504de2d73dd3f61df665aeccdef4dc41f2ed2ebed7411f5cfd7858e3ef00
data/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License
2
2
 
3
3
  Copyright (c) 2016 GitHub, Inc
4
+ Copyright (c) Rugged Contributors
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -577,7 +577,7 @@ You can store bare repositories in alternative backends instead of storing on di
577
577
  `redbadger/rugged-redis` for an example of how a rugged backend works).
578
578
 
579
579
  ```ruby
580
- a_backend = Rugged::InMemory::Backend.new(opt1: 'setting', opt2: 'setting')
580
+ a_backend = MyProject::CustomObjectDB(opt1: 'setting', opt2: 'setting')
581
581
 
582
582
  repo = Rugged::Repository.init_at('repo_name', :bare, backend: a_backend)
583
583
 
data/ext/rugged/rugged.c CHANGED
@@ -220,15 +220,18 @@ static VALUE rb_git_prettify_message(int argc, VALUE *argv, VALUE self)
220
220
  return result;
221
221
  }
222
222
 
223
- static VALUE minimize_cb(VALUE rb_oid, git_oid_shorten *shortener)
223
+ static VALUE minimize_cb(RB_BLOCK_CALL_FUNC_ARGLIST(rb_oid, shorten))
224
224
  {
225
+ git_oid_shorten *shortener = (git_oid_shorten*) shorten;
226
+
225
227
  Check_Type(rb_oid, T_STRING);
226
228
  git_oid_shorten_add(shortener, RSTRING_PTR(rb_oid));
227
229
  return Qnil;
228
230
  }
229
231
 
230
- static VALUE minimize_yield(VALUE rb_oid, VALUE *data)
232
+ static VALUE minimize_yield(RB_BLOCK_CALL_FUNC_ARGLIST(rb_oid, args))
231
233
  {
234
+ VALUE *data = (VALUE*) args;
232
235
  rb_funcall(data[0], rb_intern("call"), 1,
233
236
  rb_str_substr(rb_oid, 0, FIX2INT(data[1])));
234
237
  return Qnil;
@@ -293,7 +296,7 @@ static VALUE rb_git_minimize_oid(int argc, VALUE *argv, VALUE self)
293
296
 
294
297
  shrt = git_oid_shorten_new(minlen);
295
298
 
296
- rb_iterate(rb_each, rb_enum, &minimize_cb, (VALUE)shrt);
299
+ rb_block_call(rb_enum, rb_intern("each"), 0, NULL, minimize_cb, (VALUE)shrt);
297
300
  length = git_oid_shorten_add(shrt, NULL);
298
301
 
299
302
  git_oid_shorten_free(shrt);
@@ -305,7 +308,7 @@ static VALUE rb_git_minimize_oid(int argc, VALUE *argv, VALUE self)
305
308
  yield_data[0] = rb_block;
306
309
  yield_data[1] = INT2FIX(length);
307
310
 
308
- rb_iterate(rb_each, rb_enum, &minimize_yield, (VALUE)yield_data);
311
+ rb_block_call(rb_enum, rb_intern("each"), 0, NULL, minimize_yield, (VALUE)yield_data);
309
312
  return Qnil;
310
313
  }
311
314
 
@@ -425,7 +425,7 @@ struct commit_data {
425
425
  * Note that parents may be set even when the function errors, so make
426
426
  * sure to free this data.
427
427
  */
428
- static VALUE parse_commit_options(struct commit_data *out, git_repository *repo, VALUE rb_data)
428
+ static int parse_commit_options(struct commit_data *out, git_repository *repo, VALUE rb_data)
429
429
  {
430
430
  VALUE rb_message, rb_tree, rb_parents, rb_ref;
431
431
  int error = 0, parent_count, i;
@@ -400,7 +400,7 @@ static VALUE rb_git_object_read_raw(VALUE self)
400
400
 
401
401
  void Init_rugged_object(void)
402
402
  {
403
- rb_cRuggedObject = rb_define_class_under(rb_mRugged, "Object", rb_cData);
403
+ rb_cRuggedObject = rb_define_class_under(rb_mRugged, "Object", rb_cObject);
404
404
  rb_define_singleton_method(rb_cRuggedObject, "lookup", rb_git_object_lookup, 2);
405
405
  rb_define_singleton_method(rb_cRuggedObject, "rev_parse", rb_git_object_rev_parse, 2);
406
406
  rb_define_singleton_method(rb_cRuggedObject, "rev_parse_oid", rb_git_object_rev_parse_oid, 2);
@@ -1460,8 +1460,8 @@ static VALUE rb_git_repo_is_shallow(VALUE self)
1460
1460
  * call-seq:
1461
1461
  * repo.empty? -> true or false
1462
1462
  *
1463
- * Return whether a repository is empty or not. An empty repository has just
1464
- * been initialized and has no commits yet.
1463
+ * Return whether a repository is empty or not. An empty repository has HEAD
1464
+ * pointing to the default value and there are no other references.
1465
1465
  */
1466
1466
  static VALUE rb_git_repo_is_empty(VALUE self)
1467
1467
  {
@@ -2845,7 +2845,7 @@ void Init_rugged_repo(void)
2845
2845
  rb_define_method(rb_cRuggedRepo, "cherrypick_commit", rb_git_repo_cherrypick_commit, -1);
2846
2846
  rb_define_method(rb_cRuggedRepo, "fetch_attributes", rb_git_repo_attributes, -1);
2847
2847
 
2848
- rb_cRuggedOdbObject = rb_define_class_under(rb_mRugged, "OdbObject", rb_cData);
2848
+ rb_cRuggedOdbObject = rb_define_class_under(rb_mRugged, "OdbObject", rb_cObject);
2849
2849
  rb_define_method(rb_cRuggedOdbObject, "data", rb_git_odbobj_data, 0);
2850
2850
  rb_define_method(rb_cRuggedOdbObject, "len", rb_git_odbobj_size, 0);
2851
2851
  rb_define_method(rb_cRuggedOdbObject, "type", rb_git_odbobj_type, 0);
data/lib/rugged/commit.rb CHANGED
@@ -19,10 +19,24 @@ module Rugged
19
19
 
20
20
  # Return a diff between this commit and its first parent or another commit or tree.
21
21
  #
22
+ # The commit is treated as the new side of the diff by default
23
+ #
22
24
  # See Rugged::Tree#diff for more details.
23
25
  def diff(*args)
24
- args.unshift(parents.first) if args.size == 1 && args.first.is_a?(Hash)
25
- self.tree.diff(*args)
26
+ raise ArgumentError("wrong number of arguments (given #{args.length}, expected 0..2") if args.length > 2
27
+ other, opts = args
28
+ if other.is_a?(Hash)
29
+ opts = other
30
+ other = nil
31
+ end
32
+ opts ||= {}
33
+ # if other is not provided at all (as opposed to explicitly nil, or given)
34
+ # then diff against the prior commit
35
+ if args.empty? || args.first.is_a?(Hash)
36
+ other = parents.first
37
+ opts[:reverse] = !opts[:reverse]
38
+ end
39
+ self.tree.diff(other, opts)
26
40
  end
27
41
 
28
42
  # Return a diff between this commit and the workdir.
@@ -263,12 +263,12 @@ module Rugged
263
263
  #
264
264
  # Returns a hash containing the pushed refspecs as keys and
265
265
  # any error messages or +nil+ as values.
266
- def push(remote_or_url, *args)
266
+ def push(remote_or_url, *args, **kwargs)
267
267
  unless remote_or_url.kind_of? Remote
268
268
  remote_or_url = remotes[remote_or_url] || remotes.create_anonymous(remote_or_url)
269
269
  end
270
270
 
271
- remote_or_url.push(*args)
271
+ remote_or_url.push(*args, **kwargs)
272
272
  end
273
273
  end
274
274
  end
@@ -4,5 +4,5 @@
4
4
  # For full terms see the included LICENSE file.
5
5
 
6
6
  module Rugged
7
- Version = VERSION = '1.0.1'
7
+ Version = VERSION = '1.3.0'
8
8
  end
@@ -11,21 +11,12 @@
11
11
  # Install:
12
12
  # > cmake --build . --target install
13
13
 
14
- PROJECT(libgit2 C)
15
14
  CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
16
- CMAKE_POLICY(SET CMP0015 NEW)
17
- IF(POLICY CMP0051)
18
- CMAKE_POLICY(SET CMP0051 NEW)
19
- ENDIF()
20
- IF(POLICY CMP0042)
21
- CMAKE_POLICY(SET CMP0042 NEW)
22
- ENDIF()
23
- IF(POLICY CMP0054)
24
- CMAKE_POLICY(SET CMP0054 NEW)
25
- ENDIF()
15
+
16
+ project(libgit2 VERSION "1.3.0" LANGUAGES C)
26
17
 
27
18
  # Add find modules to the path
28
- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/Modules/")
19
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/")
29
20
 
30
21
  INCLUDE(CheckLibraryExists)
31
22
  INCLUDE(CheckFunctionExists)
@@ -36,6 +27,7 @@ INCLUDE(AddCFlagIfSupported)
36
27
  INCLUDE(FindPkgLibraries)
37
28
  INCLUDE(FindThreads)
38
29
  INCLUDE(FindStatNsec)
30
+ INCLUDE(Findfutimens)
39
31
  INCLUDE(GNUInstallDirs)
40
32
  INCLUDE(IdeSplitSources)
41
33
  INCLUDE(FeatureSummary)
@@ -49,8 +41,6 @@ OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
49
41
  OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
50
42
  OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
51
43
  OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
52
- OPTION(TAGS "Generate tags" OFF)
53
- OPTION(PROFILE "Generate profiling information" OFF)
54
44
  OPTION(ENABLE_TRACE "Enables tracing support" ON)
55
45
  OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF)
56
46
  OPTION(USE_SSH "Link with libssh2 to enable SSH support" ON)
@@ -60,8 +50,10 @@ OPTION(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
60
50
  OPTION(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF)
61
51
  OPTION(USE_LEAK_CHECKER "Run tests with leak checker" OFF)
62
52
  OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
53
+ OPTION(DEBUG_STRICT_ALLOC "Enable strict allocator behavior" OFF)
54
+ OPTION(DEBUG_STRICT_OPEN "Enable path validation in open" OFF)
63
55
  OPTION(ENABLE_WERROR "Enable compilation with -Werror" OFF)
64
- OPTION(USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF)
56
+ OPTION(USE_BUNDLED_ZLIB "Use the bundled version of zlib. Can be set to one of Bundled(ON)/Chromium. The Chromium option requires a x86_64 processor with SSE4.2 and CLMUL" OFF)
65
57
  SET(USE_HTTP_PARSER "" CACHE STRING "Specifies the HTTP Parser implementation; either system or builtin.")
66
58
  OPTION(DEPRECATE_HARD "Do not include deprecated functions in the library" OFF)
67
59
  SET(REGEX_BACKEND "" CACHE STRING "Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin.")
@@ -100,20 +92,10 @@ IF(WIN32)
100
92
  ENDIF()
101
93
 
102
94
  IF(MSVC)
103
- # Enable MSVC CRTDBG memory leak reporting when in debug mode.
104
- OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
95
+ # Enable leak checking using the debugging C runtime.
96
+ OPTION(WIN32_LEAKCHECK "Enable leak reporting via crtdbg" OFF)
105
97
  ENDIF()
106
98
 
107
- FILE(STRINGS "${libgit2_SOURCE_DIR}/include/git2/version.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
108
-
109
- STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}")
110
- STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}")
111
- STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_REV "${GIT2_HEADER}")
112
- SET(LIBGIT2_VERSION_STRING "${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}.${LIBGIT2_VERSION_REV}")
113
-
114
- FILE(STRINGS "${libgit2_SOURCE_DIR}/include/git2/version.h" GIT2_HEADER_SOVERSION REGEX "^#define LIBGIT2_SOVERSION \"([0-9.]+)\"$")
115
- STRING(REGEX REPLACE "^.*LIBGIT2_SOVERSION \"([0-9.]+)\"$" "\\1" LIBGIT2_SOVERSION "${GIT2_HEADER_SOVERSION}")
116
-
117
99
  IF (DEPRECATE_HARD)
118
100
  ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)
119
101
  ENDIF()
@@ -137,6 +119,11 @@ IF (MSVC)
137
119
  # /Gd - explicitly set cdecl calling convention
138
120
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd")
139
121
 
122
+ IF (NOT (MSVC_VERSION LESS 1900))
123
+ # /guard:cf - Enable Control Flow Guard
124
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
125
+ ENDIF()
126
+
140
127
  IF (STATIC_CRT)
141
128
  SET(CRT_FLAG_DEBUG "/MTd")
142
129
  SET(CRT_FLAG_RELEASE "/MT")
@@ -145,8 +132,8 @@ IF (MSVC)
145
132
  SET(CRT_FLAG_RELEASE "/MD")
146
133
  ENDIF()
147
134
 
148
- IF (MSVC_CRTDBG)
149
- SET(GIT_MSVC_CRTDBG 1)
135
+ IF (WIN32_LEAKCHECK)
136
+ SET(GIT_WIN32_LEAKCHECK 1)
150
137
  SET(CRT_FLAG_DEBUG "${CRT_FLAG_DEBUG}")
151
138
  SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} Dbghelp.lib")
152
139
  ENDIF()
@@ -181,7 +168,12 @@ IF (MSVC)
181
168
  # /NXCOMPAT - Data execution prevention (DEP)
182
169
  # /LARGEADDRESSAWARE - >2GB user address space on x86
183
170
  # /VERSION - Embed version information in PE header
184
- SET(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}")
171
+ SET(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:${libgit2_VERSION_MAJOR}.${libgit2_VERSION_MINOR}")
172
+
173
+ IF (NOT (MSVC_VERSION LESS 1900))
174
+ # /GUARD:CF - Enable Control Flow Guard
175
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /GUARD:CF")
176
+ ENDIF()
185
177
 
186
178
  # /DEBUG - Create a PDB
187
179
  # /LTCG - Link time code generation (whole program optimization)
@@ -232,35 +224,29 @@ ELSE ()
232
224
  ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO=1)
233
225
  ENDIF ()
234
226
 
235
- ENABLE_WARNINGS(documentation)
236
- DISABLE_WARNINGS(missing-field-initializers)
237
- ENABLE_WARNINGS(strict-aliasing)
238
- ENABLE_WARNINGS(strict-prototypes)
239
- ENABLE_WARNINGS(declaration-after-statement)
240
- ENABLE_WARNINGS(shift-count-overflow)
241
- ENABLE_WARNINGS(unused-const-variable)
242
- ENABLE_WARNINGS(unused-function)
243
- ENABLE_WARNINGS(int-conversion)
227
+ enable_warnings(documentation)
228
+ disable_warnings(documentation-deprecated-sync)
229
+ disable_warnings(missing-field-initializers)
230
+ enable_warnings(strict-aliasing)
231
+ enable_warnings(strict-prototypes)
232
+ enable_warnings(declaration-after-statement)
233
+ enable_warnings(shift-count-overflow)
234
+ enable_warnings(unused-const-variable)
235
+ enable_warnings(unused-function)
236
+ enable_warnings(int-conversion)
237
+ enable_warnings(c11-extensions)
238
+ enable_warnings(c99-c11-compat)
244
239
 
245
240
  # MinGW uses gcc, which expects POSIX formatting for printf, but
246
241
  # uses the Windows C library, which uses its own format specifiers.
247
242
  # Disable format specifier warnings.
248
- IF(MINGW)
249
- DISABLE_WARNINGS(format)
250
- DISABLE_WARNINGS(format-security)
251
- ELSE()
252
- ENABLE_WARNINGS(format)
253
- ENABLE_WARNINGS(format-security)
254
- ENDIF()
255
-
256
- IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
257
- DISABLE_WARNINGS(documentation-deprecated-sync)
258
- ENDIF()
259
-
260
- IF (PROFILE)
261
- SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}")
262
- SET(CMAKE_EXE_LINKER_FLAGS "-pg ${CMAKE_EXE_LINKER_FLAGS}")
263
- ENDIF ()
243
+ if(MINGW)
244
+ disable_warnings(format)
245
+ disable_warnings(format-security)
246
+ else()
247
+ enable_warnings(format)
248
+ enable_warnings(format-security)
249
+ endif()
264
250
  ENDIF()
265
251
 
266
252
  # Ensure that MinGW provides the correct header files.
@@ -300,25 +286,6 @@ IF (BUILD_CLAR)
300
286
  ADD_SUBDIRECTORY(tests)
301
287
  ENDIF ()
302
288
 
303
- IF (TAGS)
304
- FIND_PROGRAM(CTAGS ctags)
305
- IF (NOT CTAGS)
306
- MESSAGE(FATAL_ERROR "Could not find ctags command")
307
- ENDIF ()
308
-
309
- FILE(GLOB_RECURSE SRC_ALL *.[ch])
310
-
311
- ADD_CUSTOM_COMMAND(
312
- OUTPUT tags
313
- COMMAND ${CTAGS} -a ${SRC_ALL}
314
- DEPENDS ${SRC_ALL}
315
- )
316
- ADD_CUSTOM_TARGET(
317
- do_tags ALL
318
- DEPENDS tags
319
- )
320
- ENDIF ()
321
-
322
289
  IF (BUILD_EXAMPLES)
323
290
  ADD_SUBDIRECTORY(examples)
324
291
  ENDIF ()
@@ -420,7 +420,7 @@ The GNU C Library is free software; you can redistribute it and/or
420
420
  modify it under the terms of the GNU Lesser General Public
421
421
  License as published by the Free Software Foundation; either
422
422
  version 2.1 of the License, or (at your option) any later version.
423
-
423
+
424
424
  The GNU C Library is distributed in the hope that it will be useful,
425
425
  but WITHOUT ANY WARRANTY; without even the implied warranty of
426
426
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -1019,3 +1019,111 @@ following restrictions are are met:
1019
1019
  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1020
1020
  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1021
1021
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1022
+
1023
+ ----------------------------------------------------------------------
1024
+
1025
+ Portions of the OpenSSL headers are included under the OpenSSL license:
1026
+
1027
+ Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
1028
+ All rights reserved.
1029
+
1030
+ This package is an SSL implementation written
1031
+ by Eric Young (eay@cryptsoft.com).
1032
+ The implementation was written so as to conform with Netscapes SSL.
1033
+
1034
+ This library is free for commercial and non-commercial use as long as
1035
+ the following conditions are aheared to. The following conditions
1036
+ apply to all code found in this distribution, be it the RC4, RSA,
1037
+ lhash, DES, etc., code; not just the SSL code. The SSL documentation
1038
+ included with this distribution is covered by the same copyright terms
1039
+ except that the holder is Tim Hudson (tjh@cryptsoft.com).
1040
+
1041
+ Copyright remains Eric Young's, and as such any Copyright notices in
1042
+ the code are not to be removed.
1043
+ If this package is used in a product, Eric Young should be given attribution
1044
+ as the author of the parts of the library used.
1045
+ This can be in the form of a textual message at program startup or
1046
+ in documentation (online or textual) provided with the package.
1047
+
1048
+ Redistribution and use in source and binary forms, with or without
1049
+ modification, are permitted provided that the following conditions
1050
+ are met:
1051
+ 1. Redistributions of source code must retain the copyright
1052
+ notice, this list of conditions and the following disclaimer.
1053
+ 2. Redistributions in binary form must reproduce the above copyright
1054
+ notice, this list of conditions and the following disclaimer in the
1055
+ documentation and/or other materials provided with the distribution.
1056
+ 3. All advertising materials mentioning features or use of this software
1057
+ must display the following acknowledgement:
1058
+ "This product includes cryptographic software written by
1059
+ Eric Young (eay@cryptsoft.com)"
1060
+ The word 'cryptographic' can be left out if the rouines from the library
1061
+ being used are not cryptographic related :-).
1062
+ 4. If you include any Windows specific code (or a derivative thereof) from
1063
+ the apps directory (application code) you must include an acknowledgement:
1064
+ "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
1065
+
1066
+ THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
1067
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1068
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1069
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1070
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1071
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1072
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1073
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1074
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1075
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1076
+ SUCH DAMAGE.
1077
+
1078
+ The licence and distribution terms for any publically available version or
1079
+ derivative of this code cannot be changed. i.e. this code cannot simply be
1080
+ copied and put under another distribution licence
1081
+ [including the GNU Public Licence.]
1082
+
1083
+ ====================================================================
1084
+ Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved.
1085
+
1086
+ Redistribution and use in source and binary forms, with or without
1087
+ modification, are permitted provided that the following conditions
1088
+ are met:
1089
+
1090
+ 1. Redistributions of source code must retain the above copyright
1091
+ notice, this list of conditions and the following disclaimer.
1092
+
1093
+ 2. Redistributions in binary form must reproduce the above copyright
1094
+ notice, this list of conditions and the following disclaimer in
1095
+ the documentation and/or other materials provided with the
1096
+ distribution.
1097
+
1098
+ 3. All advertising materials mentioning features or use of this
1099
+ software must display the following acknowledgment:
1100
+ "This product includes software developed by the OpenSSL Project
1101
+ for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
1102
+
1103
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
1104
+ endorse or promote products derived from this software without
1105
+ prior written permission. For written permission, please contact
1106
+ openssl-core@openssl.org.
1107
+
1108
+ 5. Products derived from this software may not be called "OpenSSL"
1109
+ nor may "OpenSSL" appear in their names without prior written
1110
+ permission of the OpenSSL Project.
1111
+
1112
+ 6. Redistributions of any form whatsoever must retain the following
1113
+ acknowledgment:
1114
+ "This product includes software developed by the OpenSSL Project
1115
+ for use in the OpenSSL Toolkit (http://www.openssl.org/)"
1116
+
1117
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
1118
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1119
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1120
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
1121
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1122
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1123
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1124
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1125
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1126
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1127
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
1128
+ OF THE POSSIBILITY OF SUCH DAMAGE.
1129
+
@@ -0,0 +1,13 @@
1
+ # LIBSSH2_FOUND - system has the libssh2 library
2
+ # LIBSSH2_INCLUDE_DIR - the libssh2 include directory
3
+ # LIBSSH2_LIBRARY - the libssh2 library name
4
+
5
+ FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h)
6
+
7
+ FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 libssh2)
8
+
9
+ INCLUDE(FindPackageHandleStandardArgs)
10
+ find_package_handle_standard_args(LibSSH2
11
+ REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR)
12
+
13
+ MARK_AS_ADVANCED(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
@@ -0,0 +1,14 @@
1
+ INCLUDE(EnableWarnings)
2
+
3
+ IF (APPLE)
4
+ # We cannot simply CHECK_FUNCTION_EXISTS on macOS because
5
+ # MACOSX_DEPLOYMENT_TARGET may be set to a version in the past
6
+ # that doesn't have futimens. Instead we need to enable warnings
7
+ # as errors, then check for the symbol existing in `sys/stat.h`,
8
+ # then reset warnings as errors.
9
+ ENABLE_WARNINGS(error)
10
+ CHECK_SYMBOL_EXISTS(futimens sys/stat.h HAVE_FUTIMENS)
11
+ DISABLE_WARNINGS(error)
12
+ ELSE ()
13
+ CHECK_FUNCTION_EXISTS(futimens HAVE_FUTIMENS)
14
+ ENDIF ()
@@ -1,35 +1,27 @@
1
- # Select the backend to use
2
-
3
- # We try to find any packages our backends might use
4
-
5
1
  INCLUDE(SanitizeBool)
6
2
 
3
+ # We try to find any packages our backends might use
7
4
  FIND_PACKAGE(GSSAPI)
8
5
  IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
9
6
  INCLUDE(FindGSSFramework)
10
7
  ENDIF()
11
8
 
12
- # Auto-select GSS backend
13
- SanitizeBool(USE_GSSAPI)
14
- IF (USE_GSSAPI STREQUAL ON)
15
- IF (GSSFRAMEWORK_FOUND)
16
- SET(GSS_BACKEND "GSS.framework")
17
- ELSEIF(GSSAPI_FOUND)
18
- SET(GSS_BACKEND "gssapi")
19
- ELSE()
20
- MESSAGE(FATAL_ERROR "Unable to autodetect a usable GSS backend."
21
- "Please pass the backend name explicitly (-DUSE_GSS=backend)")
9
+ IF(USE_GSSAPI)
10
+ # Auto-select GSS backend
11
+ SanitizeBool(USE_GSSAPI)
12
+ IF (USE_GSSAPI STREQUAL ON)
13
+ IF (GSSFRAMEWORK_FOUND)
14
+ SET(USE_GSSAPI "GSS.framework")
15
+ ELSEIF(GSSAPI_FOUND)
16
+ SET(USE_GSSAPI "gssapi")
17
+ ELSE()
18
+ MESSAGE(FATAL_ERROR "Unable to autodetect a usable GSS backend."
19
+ "Please pass the backend name explicitly (-DUSE_GSS=backend)")
20
+ ENDIF()
22
21
  ENDIF()
23
- ELSEIF(USE_GSSAPI)
24
- # Backend was explicitly set
25
- SET(GSS_BACKEND ${USE_GSSAPI})
26
- ELSE()
27
- SET(GSS_BACKEND NO)
28
- ENDIF()
29
22
 
30
- IF(GSS_BACKEND)
31
23
  # Check that we can find what's required for the selected backend
32
- IF (GSS_BACKEND STREQUAL "GSS.framework")
24
+ IF (USE_GSSAPI STREQUAL "GSS.framework")
33
25
  IF (NOT GSSFRAMEWORK_FOUND)
34
26
  MESSAGE(FATAL_ERROR "Asked for GSS.framework backend, but it wasn't found")
35
27
  ENDIF()
@@ -37,8 +29,8 @@ IF(GSS_BACKEND)
37
29
  LIST(APPEND LIBGIT2_LIBS ${GSSFRAMEWORK_LIBRARIES})
38
30
 
39
31
  SET(GIT_GSSFRAMEWORK 1)
40
- ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${GSS_BACKEND})")
41
- ELSEIF (GSS_BACKEND STREQUAL "gssapi")
32
+ ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${USE_GSSAPI})")
33
+ ELSEIF (USE_GSSAPI STREQUAL "gssapi")
42
34
  IF (NOT GSSAPI_FOUND)
43
35
  MESSAGE(FATAL_ERROR "Asked for gssapi GSS backend, but it wasn't found")
44
36
  ENDIF()
@@ -46,9 +38,9 @@ IF(GSS_BACKEND)
46
38
  LIST(APPEND LIBGIT2_LIBS ${GSSAPI_LIBRARIES})
47
39
 
48
40
  SET(GIT_GSSAPI 1)
49
- ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${GSS_BACKEND})")
41
+ ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${USE_GSSAPI})")
50
42
  ELSE()
51
- MESSAGE(FATAL_ERROR "Asked for backend ${GSS_BACKEND} but it wasn't found")
43
+ MESSAGE(FATAL_ERROR "Asked for backend ${USE_GSSAPI} but it wasn't found")
52
44
  ENDIF()
53
45
  ELSE()
54
46
  SET(GIT_GSSAPI 0)