b4: introduce configuration for the Git project

We're about to extend our documentation to recommend b4 for sending
patch series to the mailing list. Prepare for this by introducing a b4
configuration so that the tool knows to honor our preferences. For now,
this configuration does two things:

  - It configures "send-same-thread = shallow", which tells b4 to always
    send subsequent versions of the same patch series as a reply to the
    cover letter of the first version.

  - It configures "prep-cover-template", which tells b4 to use a custom
    template for the cover letter. The most important change compared to
    the default template is that our custom template also includes a
    range-diff.

There's potentially more things that we may want to configure going
forward, like for example auto-configuration of folks to Cc on certain
patches. But these two tweaks feel like a good place to start.

Note that these values only serve as defaults, and users may want to
tweak those defaults based on their own preference. Luckily, users can
do that without having to touch `.b4-config` at all, as b4 allows them
to override values via Git configuration:

    ```
    $ git config set b4.prep-cover-template /does/not/exist
    $ b4 send --dry-run
    ERROR: prep-cover-template says to use x, but it does not exist
    ```

So this gives users an easy way to override our defaults without having
to touch ".b4-config", which would dirty the tree.

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

Those wishing to help with error message, usage and informational message string translations (localization l10) should see po/README.md (a po file is a Portable Object file that holds the translations).

To subscribe to the list, send an email to git+subscribe@vger.kernel.org (see https://subspace.kernel.org/subscribing.html for details). The mailing list archives are available at https://lore.kernel.org/git/, https://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