http: centralize the accounting of libcurl dependencies

As discussed in 644de29e220 (http: drop support for curl < 7.19.4,
2021-07-30) checking against LIBCURL_VERSION_NUM isn't as reliable as
checking specific symbols present in curl, as some distros have been
known to backport features.

However, while some of the curl_easy_setopt() arguments we rely on are
macros, others are enum, and we can't assume that those that are
macros won't change into enums in the future.

So we're still going to have to check LIBCURL_VERSION_NUM, but by
doing that in one central place and using a macro definition of our
own, anyone who's backporting features can define it themselves, and
thus have access to more modern curl features that they backported,
even if they didn't bump the LIBCURL_VERSION_NUM.

More importantly, as shown in a preceding commit doing these version
checks makes for hard to read and possibly buggy code, as shown by the
bug fixed there where we were conflating base 10 for base 16 when
comparing the version.

By doing them all in one place we'll hopefully reduce the chances of
such future mistakes, furthermore it now becomes easier to see at a
glance what the oldest supported version is, which makes it easier to
reason about any future deprecation similar to the recent
e48a623dea0 (Merge branch 'ab/http-drop-old-curl', 2021-08-24).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 files changed
tree: 80578a881f8dd2a6f23a46c401adec989e2a252f
  1. .github/
  2. block-sha1/
  3. builtin/
  4. ci/
  5. compat/
  6. contrib/
  7. Documentation/
  8. ewah/
  9. git-gui/
  10. gitk-git/
  11. gitweb/
  12. mergetools/
  13. negotiator/
  14. perl/
  15. po/
  16. ppc/
  17. refs/
  18. sha1dc/
  19. sha256/
  20. t/
  21. templates/
  22. trace2/
  23. xdiff/
  24. .cirrus.yml
  25. .clang-format
  26. .editorconfig
  27. .gitattributes
  28. .gitignore
  29. .gitmodules
  30. .mailmap
  31. .travis.yml
  32. .tsan-suppressions
  33. abspath.c
  34. aclocal.m4
  35. add-interactive.c
  36. add-interactive.h
  37. add-patch.c
  38. advice.c
  39. advice.h
  40. alias.c
  41. alias.h
  42. alloc.c
  43. alloc.h
  44. apply.c
  45. apply.h
  46. archive-tar.c
  47. archive-zip.c
  48. archive.c
  49. archive.h
  50. attr.c
  51. attr.h
  52. banned.h
  53. base85.c
  54. bisect.c
  55. bisect.h
  56. blame.c
  57. blame.h
  58. blob.c
  59. blob.h
  60. bloom.c
  61. bloom.h
  62. branch.c
  63. branch.h
  64. builtin.h
  65. bulk-checkin.c
  66. bulk-checkin.h
  67. bundle.c
  68. bundle.h
  69. cache-tree.c
  70. cache-tree.h
  71. cache.h
  72. cbtree.c
  73. cbtree.h
  74. chdir-notify.c
  75. chdir-notify.h
  76. check-builtins.sh
  77. check_bindir
  78. checkout.c
  79. checkout.h
  80. chunk-format.c
  81. chunk-format.h
  82. CODE_OF_CONDUCT.md
  83. color.c
  84. color.h
  85. column.c
  86. column.h
  87. combine-diff.c
  88. command-list.txt
  89. commit-graph.c
  90. commit-graph.h
  91. commit-reach.c
  92. commit-reach.h
  93. commit-slab-decl.h
  94. commit-slab-impl.h
  95. commit-slab.h
  96. commit.c
  97. commit.h
  98. common-main.c
  99. config.c
  100. config.h
  101. config.mak.dev
  102. config.mak.in
  103. config.mak.uname
  104. configure.ac
  105. connect.c
  106. connect.h
  107. connected.c
  108. connected.h
  109. convert.c
  110. convert.h
  111. copy.c
  112. COPYING
  113. credential.c
  114. credential.h
  115. csum-file.c
  116. csum-file.h
  117. ctype.c
  118. daemon.c
  119. date.c
  120. decorate.c
  121. decorate.h
  122. delta-islands.c
  123. delta-islands.h
  124. delta.h
  125. detect-compiler
  126. diff-delta.c
  127. diff-lib.c
  128. diff-merges.c
  129. diff-merges.h
  130. diff-no-index.c
  131. diff.c
  132. diff.h
  133. diffcore-break.c
  134. diffcore-delta.c
  135. diffcore-order.c
  136. diffcore-pickaxe.c
  137. diffcore-rename.c
  138. diffcore-rotate.c
  139. diffcore.h
  140. dir-iterator.c
  141. dir-iterator.h
  142. dir.c
  143. dir.h
  144. editor.c
  145. entry.c
  146. entry.h
  147. environment.c
  148. environment.h
  149. exec-cmd.c
  150. exec-cmd.h
  151. fetch-negotiator.c
  152. fetch-negotiator.h
  153. fetch-pack.c
  154. fetch-pack.h
  155. fmt-merge-msg.c
  156. fmt-merge-msg.h
  157. fsck.c
  158. fsck.h
  159. fsmonitor.c
  160. fsmonitor.h
  161. fuzz-commit-graph.c
  162. fuzz-pack-headers.c
  163. fuzz-pack-idx.c
  164. generate-cmdlist.sh
  165. generate-configlist.sh
  166. gettext.c
  167. gettext.h
  168. git-add--interactive.perl
  169. git-archimport.perl
  170. git-bisect.sh
  171. git-compat-util.h
  172. git-curl-compat.h
  173. git-cvsexportcommit.perl
  174. git-cvsimport.perl
  175. git-cvsserver.perl
  176. git-difftool--helper.sh
  177. git-filter-branch.sh
  178. git-instaweb.sh
  179. git-merge-octopus.sh
  180. git-merge-one-file.sh
  181. git-merge-resolve.sh
  182. git-mergetool--lib.sh
  183. git-mergetool.sh
  184. git-p4.py
  185. git-quiltimport.sh
  186. git-rebase--preserve-merges.sh
  187. git-request-pull.sh
  188. git-send-email.perl
  189. git-sh-i18n.sh
  190. git-sh-setup.sh
  191. git-submodule.sh
  192. git-svn.perl
  193. GIT-VERSION-GEN
  194. git-web--browse.sh
  195. git.c
  196. git.rc
  197. gpg-interface.c
  198. gpg-interface.h
  199. graph.c
  200. graph.h
  201. grep.c
  202. grep.h
  203. hash-lookup.c
  204. hash-lookup.h
  205. hash.h
  206. hashmap.c
  207. hashmap.h
  208. help.c
  209. help.h
  210. hex.c
  211. http-backend.c
  212. http-fetch.c
  213. http-push.c
  214. http-walker.c
  215. http.c
  216. http.h
  217. ident.c
  218. imap-send.c
  219. INSTALL
  220. iterator.h
  221. json-writer.c
  222. json-writer.h
  223. khash.h
  224. kwset.c
  225. kwset.h
  226. levenshtein.c
  227. levenshtein.h
  228. LGPL-2.1
  229. line-log.c
  230. line-log.h
  231. line-range.c
  232. line-range.h
  233. linear-assignment.c
  234. linear-assignment.h
  235. list-objects-filter-options.c
  236. list-objects-filter-options.h
  237. list-objects-filter.c
  238. list-objects-filter.h
  239. list-objects.c
  240. list-objects.h
  241. list.h
  242. ll-merge.c
  243. ll-merge.h
  244. lockfile.c
  245. lockfile.h
  246. log-tree.c
  247. log-tree.h
  248. ls-refs.c
  249. ls-refs.h
  250. mailinfo.c
  251. mailinfo.h
  252. mailmap.c
  253. mailmap.h
  254. Makefile
  255. match-trees.c
  256. mem-pool.c
  257. mem-pool.h
  258. merge-blobs.c
  259. merge-blobs.h
  260. merge-ort-wrappers.c
  261. merge-ort-wrappers.h
  262. merge-ort.c
  263. merge-ort.h
  264. merge-recursive.c
  265. merge-recursive.h
  266. merge.c
  267. mergesort.c
  268. mergesort.h
  269. midx.c
  270. midx.h
  271. name-hash.c
  272. notes-cache.c
  273. notes-cache.h
  274. notes-merge.c
  275. notes-merge.h
  276. notes-utils.c
  277. notes-utils.h
  278. notes.c
  279. notes.h
  280. object-file.c
  281. object-name.c
  282. object-store.h
  283. object.c
  284. object.h
  285. oid-array.c
  286. oid-array.h
  287. oidmap.c
  288. oidmap.h
  289. oidset.c
  290. oidset.h
  291. oidtree.c
  292. oidtree.h
  293. pack-bitmap-write.c
  294. pack-bitmap.c
  295. pack-bitmap.h
  296. pack-check.c
  297. pack-objects.c
  298. pack-objects.h
  299. pack-revindex.c
  300. pack-revindex.h
  301. pack-write.c
  302. pack.h
  303. packfile.c
  304. packfile.h
  305. pager.c
  306. parallel-checkout.c
  307. parallel-checkout.h
  308. parse-options-cb.c
  309. parse-options.c
  310. parse-options.h
  311. patch-delta.c
  312. patch-ids.c
  313. patch-ids.h
  314. path.c
  315. path.h
  316. pathspec.c
  317. pathspec.h
  318. pkt-line.c
  319. pkt-line.h
  320. preload-index.c
  321. pretty.c
  322. pretty.h
  323. prio-queue.c
  324. prio-queue.h
  325. progress.c
  326. progress.h
  327. promisor-remote.c
  328. promisor-remote.h
  329. prompt.c
  330. prompt.h
  331. protocol-caps.c
  332. protocol-caps.h
  333. protocol.c
  334. protocol.h
  335. prune-packed.c
  336. prune-packed.h
  337. quote.c
  338. quote.h
  339. range-diff.c
  340. range-diff.h
  341. reachable.c
  342. reachable.h
  343. read-cache.c
  344. README.md
  345. rebase-interactive.c
  346. rebase-interactive.h
  347. rebase.c
  348. rebase.h
  349. ref-filter.c
  350. ref-filter.h
  351. reflog-walk.c
  352. reflog-walk.h
  353. refs.c
  354. refs.h
  355. refspec.c
  356. refspec.h
  357. remote-curl.c
  358. remote.c
  359. remote.h
  360. replace-object.c
  361. replace-object.h
  362. repo-settings.c
  363. repository.c
  364. repository.h
  365. rerere.c
  366. rerere.h
  367. reset.c
  368. reset.h
  369. resolve-undo.c
  370. resolve-undo.h
  371. revision.c
  372. revision.h
  373. run-command.c
  374. run-command.h
  375. SECURITY.md
  376. send-pack.c
  377. send-pack.h
  378. sequencer.c
  379. sequencer.h
  380. serve.c
  381. serve.h
  382. server-info.c
  383. setup.c
  384. sh-i18n--envsubst.c
  385. sha1dc_git.c
  386. sha1dc_git.h
  387. shallow.c
  388. shallow.h
  389. shell.c
  390. shortlog.h
  391. sideband.c
  392. sideband.h
  393. sigchain.c
  394. sigchain.h
  395. simple-ipc.h
  396. sparse-index.c
  397. sparse-index.h
  398. split-index.c
  399. split-index.h
  400. stable-qsort.c
  401. strbuf.c
  402. strbuf.h
  403. streaming.c
  404. streaming.h
  405. string-list.c
  406. string-list.h
  407. strmap.c
  408. strmap.h
  409. strvec.c
  410. strvec.h
  411. sub-process.c
  412. sub-process.h
  413. submodule-config.c
  414. submodule-config.h
  415. submodule.c
  416. submodule.h
  417. symlinks.c
  418. tag.c
  419. tag.h
  420. tar.h
  421. tempfile.c
  422. tempfile.h
  423. thread-utils.c
  424. thread-utils.h
  425. tmp-objdir.c
  426. tmp-objdir.h
  427. trace.c
  428. trace.h
  429. trace2.c
  430. trace2.h
  431. trailer.c
  432. trailer.h
  433. transport-helper.c
  434. transport-internal.h
  435. transport.c
  436. transport.h
  437. tree-diff.c
  438. tree-walk.c
  439. tree-walk.h
  440. tree.c
  441. tree.h
  442. unicode-width.h
  443. unimplemented.sh
  444. unix-socket.c
  445. unix-socket.h
  446. unix-stream-server.c
  447. unix-stream-server.h
  448. unpack-trees.c
  449. unpack-trees.h
  450. upload-pack.c
  451. upload-pack.h
  452. url.c
  453. url.h
  454. urlmatch.c
  455. urlmatch.h
  456. usage.c
  457. userdiff.c
  458. userdiff.h
  459. utf8.c
  460. utf8.h
  461. varint.c
  462. varint.h
  463. version.c
  464. version.h
  465. versioncmp.c
  466. walker.c
  467. walker.h
  468. wildmatch.c
  469. wildmatch.h
  470. worktree.c
  471. worktree.h
  472. wrap-for-bin.sh
  473. wrapper.c
  474. write-or-die.c
  475. ws.c
  476. wt-status.c
  477. wt-status.h
  478. xdiff-interface.c
  479. xdiff-interface.h
  480. zlib.c
README.md

Build status

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-<commandname>.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just “subscribe git” in the body to majordomo@vger.kernel.org. The mailing list archives are available at https://lore.kernel.org/git/, http://marc.info/?l=git and other archival sites.

Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.

The maintainer frequently sends the “What's cooking” reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name “git” was given by Linus Torvalds when he wrote the very first version. He described the tool as “the stupid content tracker” and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of “get” may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • “global information tracker”: you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • “goddamn idiotic truckload of sh*t”: when it breaks