make credential helpers builtins

There's no real reason for credential helpers to be separate binaries. I
did them this way originally under the notion that helper don't _need_
to be part of Git, and so can be built totally separately (and indeed,
the ones in contrib/credential are). But the ones in our main Makefile
build on libgit.a, and the resulting binaries are reasonably large.

We can slim down our total disk footprint by just making them builtins.
This reduces the size of:

  make strip install

from 29MB to 24MB on my Debian system.

Note that credential-cache can't operate without support for Unix
sockets. Currently we just don't build it at all when NO_UNIX_SOCKETS is
set. We could continue that with conditionals in the Makefile and our
list of builtins. But instead, let's build a dummy implementation that
dies with an informative message. That has two advantages:

  - it's simpler, because the conditional bits are all kept inside
    the credential-cache source

  - a user who is expecting it to exist will be told _why_ they can't
    use it, rather than getting the "credential-cache is not a git
    command" error which makes it look like the Git install is broken.

Note that our dummy implementation does still respond to "-h" in order
to appease t0012 (and this may be a little friendlier for users, as
well).

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