remote-curl: don't request v2 when pushing

In order to be able to ship protocol v2 with only supporting fetch, we
need clients to not issue a request to use protocol v2 when pushing
(since the client currently doesn't know how to push using protocol v2).
This allows a client to have protocol v2 configured in
`protocol.version` and take advantage of using v2 for fetch and falling
back to using v0 when pushing while v2 for push is being designed.

We could run into issues if we didn't fall back to protocol v2 when
pushing right now.  This is because currently a server will ignore a request to
use v2 when contacting the 'receive-pack' endpoint and fall back to
using v0, but when push v2 is rolled out to servers, the 'receive-pack'
endpoint will start responding using v2.  So we don't want to get into a
state where a client is requesting to push with v2 before they actually
know how to push using v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 files changed
tree: cc2dadefa0e704d7c6650a3294721d586eb715dc
  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. perl/
  14. po/
  15. ppc/
  16. refs/
  17. sha1dc/
  18. t/
  19. templates/
  20. vcs-svn/
  21. xdiff/
  22. .clang-format
  23. .gitattributes
  24. .gitignore
  25. .gitmodules
  26. .mailmap
  27. .travis.yml
  28. .tsan-suppressions
  29. abspath.c
  30. aclocal.m4
  31. advice.c
  32. advice.h
  33. alias.c
  34. alloc.c
  35. apply.c
  36. apply.h
  37. archive-tar.c
  38. archive-zip.c
  39. archive.c
  40. archive.h
  41. argv-array.c
  42. argv-array.h
  43. attr.c
  44. attr.h
  45. base85.c
  46. bisect.c
  47. bisect.h
  48. blame.c
  49. blame.h
  50. blob.c
  51. blob.h
  52. branch.c
  53. branch.h
  54. builtin.h
  55. bulk-checkin.c
  56. bulk-checkin.h
  57. bundle.c
  58. bundle.h
  59. cache-tree.c
  60. cache-tree.h
  61. cache.h
  62. check-builtins.sh
  63. check-racy.c
  64. check_bindir
  65. checkout.c
  66. checkout.h
  67. color.c
  68. color.h
  69. column.c
  70. column.h
  71. combine-diff.c
  72. command-list.txt
  73. commit-slab.h
  74. commit.c
  75. commit.h
  76. common-main.c
  77. config.c
  78. config.h
  79. config.mak.in
  80. config.mak.uname
  81. configure.ac
  82. connect.c
  83. connect.h
  84. connected.c
  85. connected.h
  86. convert.c
  87. convert.h
  88. copy.c
  89. COPYING
  90. credential-cache--daemon.c
  91. credential-cache.c
  92. credential-store.c
  93. credential.c
  94. credential.h
  95. csum-file.c
  96. csum-file.h
  97. ctype.c
  98. daemon.c
  99. date.c
  100. decorate.c
  101. decorate.h
  102. delta.h
  103. diff-delta.c
  104. diff-lib.c
  105. diff-no-index.c
  106. diff.c
  107. diff.h
  108. diffcore-break.c
  109. diffcore-delta.c
  110. diffcore-order.c
  111. diffcore-pickaxe.c
  112. diffcore-rename.c
  113. diffcore.h
  114. dir-iterator.c
  115. dir-iterator.h
  116. dir.c
  117. dir.h
  118. editor.c
  119. entry.c
  120. environment.c
  121. exec_cmd.c
  122. exec_cmd.h
  123. fast-import.c
  124. fetch-pack.c
  125. fetch-pack.h
  126. fmt-merge-msg.h
  127. fsck.c
  128. fsck.h
  129. fsmonitor.c
  130. fsmonitor.h
  131. generate-cmdlist.sh
  132. gettext.c
  133. gettext.h
  134. git-add--interactive.perl
  135. git-archimport.perl
  136. git-bisect.sh
  137. git-compat-util.h
  138. git-cvsexportcommit.perl
  139. git-cvsimport.perl
  140. git-cvsserver.perl
  141. git-difftool--helper.sh
  142. git-filter-branch.sh
  143. git-instaweb.sh
  144. git-merge-octopus.sh
  145. git-merge-one-file.sh
  146. git-merge-resolve.sh
  147. git-mergetool--lib.sh
  148. git-mergetool.sh
  149. git-p4.py
  150. git-parse-remote.sh
  151. git-quiltimport.sh
  152. git-rebase--am.sh
  153. git-rebase--interactive.sh
  154. git-rebase--merge.sh
  155. git-rebase.sh
  156. git-remote-testgit.sh
  157. git-request-pull.sh
  158. git-send-email.perl
  159. git-sh-i18n.sh
  160. git-sh-setup.sh
  161. git-stash.sh
  162. git-submodule.sh
  163. git-svn.perl
  164. GIT-VERSION-GEN
  165. git-web--browse.sh
  166. git.c
  167. git.rc
  168. gpg-interface.c
  169. gpg-interface.h
  170. graph.c
  171. graph.h
  172. grep.c
  173. grep.h
  174. hash.h
  175. hashmap.c
  176. hashmap.h
  177. help.c
  178. help.h
  179. hex.c
  180. http-backend.c
  181. http-fetch.c
  182. http-push.c
  183. http-walker.c
  184. http.c
  185. http.h
  186. ident.c
  187. imap-send.c
  188. INSTALL
  189. iterator.h
  190. khash.h
  191. kwset.c
  192. kwset.h
  193. levenshtein.c
  194. levenshtein.h
  195. LGPL-2.1
  196. line-log.c
  197. line-log.h
  198. line-range.c
  199. line-range.h
  200. list-objects-filter-options.c
  201. list-objects-filter-options.h
  202. list-objects-filter.c
  203. list-objects-filter.h
  204. list-objects.c
  205. list-objects.h
  206. list.h
  207. ll-merge.c
  208. ll-merge.h
  209. lockfile.c
  210. lockfile.h
  211. log-tree.c
  212. log-tree.h
  213. ls-refs.c
  214. ls-refs.h
  215. mailinfo.c
  216. mailinfo.h
  217. mailmap.c
  218. mailmap.h
  219. Makefile
  220. match-trees.c
  221. merge-blobs.c
  222. merge-blobs.h
  223. merge-recursive.c
  224. merge-recursive.h
  225. merge.c
  226. mergesort.c
  227. mergesort.h
  228. mru.c
  229. mru.h
  230. name-hash.c
  231. notes-cache.c
  232. notes-cache.h
  233. notes-merge.c
  234. notes-merge.h
  235. notes-utils.c
  236. notes-utils.h
  237. notes.c
  238. notes.h
  239. object.c
  240. object.h
  241. oidmap.c
  242. oidmap.h
  243. oidset.c
  244. oidset.h
  245. pack-bitmap-write.c
  246. pack-bitmap.c
  247. pack-bitmap.h
  248. pack-check.c
  249. pack-objects.c
  250. pack-objects.h
  251. pack-revindex.c
  252. pack-revindex.h
  253. pack-write.c
  254. pack.h
  255. packfile.c
  256. packfile.h
  257. pager.c
  258. parse-options-cb.c
  259. parse-options.c
  260. parse-options.h
  261. patch-delta.c
  262. patch-ids.c
  263. patch-ids.h
  264. path.c
  265. path.h
  266. pathspec.c
  267. pathspec.h
  268. pkt-line.c
  269. pkt-line.h
  270. preload-index.c
  271. pretty.c
  272. pretty.h
  273. prio-queue.c
  274. prio-queue.h
  275. progress.c
  276. progress.h
  277. prompt.c
  278. prompt.h
  279. protocol.c
  280. protocol.h
  281. quote.c
  282. quote.h
  283. reachable.c
  284. reachable.h
  285. read-cache.c
  286. README.md
  287. ref-filter.c
  288. ref-filter.h
  289. reflog-walk.c
  290. reflog-walk.h
  291. refs.c
  292. refs.h
  293. remote-curl.c
  294. remote-testsvn.c
  295. remote.c
  296. remote.h
  297. replace_object.c
  298. repository.c
  299. repository.h
  300. rerere.c
  301. rerere.h
  302. resolve-undo.c
  303. resolve-undo.h
  304. revision.c
  305. revision.h
  306. run-command.c
  307. run-command.h
  308. send-pack.c
  309. send-pack.h
  310. sequencer.c
  311. sequencer.h
  312. serve.c
  313. serve.h
  314. server-info.c
  315. setup.c
  316. sh-i18n--envsubst.c
  317. sha1-array.c
  318. sha1-array.h
  319. sha1-lookup.c
  320. sha1-lookup.h
  321. sha1_file.c
  322. sha1_name.c
  323. sha1dc_git.c
  324. sha1dc_git.h
  325. shallow.c
  326. shell.c
  327. shortlog.h
  328. show-index.c
  329. sideband.c
  330. sideband.h
  331. sigchain.c
  332. sigchain.h
  333. split-index.c
  334. split-index.h
  335. strbuf.c
  336. strbuf.h
  337. streaming.c
  338. streaming.h
  339. string-list.c
  340. string-list.h
  341. sub-process.c
  342. sub-process.h
  343. submodule-config.c
  344. submodule-config.h
  345. submodule.c
  346. submodule.h
  347. symlinks.c
  348. tag.c
  349. tag.h
  350. tar.h
  351. tempfile.c
  352. tempfile.h
  353. thread-utils.c
  354. thread-utils.h
  355. tmp-objdir.c
  356. tmp-objdir.h
  357. trace.c
  358. trace.h
  359. trailer.c
  360. trailer.h
  361. transport-helper.c
  362. transport-internal.h
  363. transport.c
  364. transport.h
  365. tree-diff.c
  366. tree-walk.c
  367. tree-walk.h
  368. tree.c
  369. tree.h
  370. unicode_width.h
  371. unimplemented.sh
  372. unix-socket.c
  373. unix-socket.h
  374. unpack-trees.c
  375. unpack-trees.h
  376. upload-pack.c
  377. upload-pack.h
  378. url.c
  379. url.h
  380. urlmatch.c
  381. urlmatch.h
  382. usage.c
  383. userdiff.c
  384. userdiff.h
  385. utf8.c
  386. utf8.h
  387. varint.c
  388. varint.h
  389. version.c
  390. version.h
  391. versioncmp.c
  392. walker.c
  393. walker.h
  394. wildmatch.c
  395. wildmatch.h
  396. worktree.c
  397. worktree.h
  398. wrap-for-bin.sh
  399. wrapper.c
  400. write_or_die.c
  401. ws.c
  402. wt-status.c
  403. wt-status.h
  404. xdiff-interface.c
  405. xdiff-interface.h
  406. zlib.c
README.md

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-.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://public-inbox.org/git/, http://marc.info/?l=git and other archival sites.

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