tests: mark tests relying on the current default for `init.defaultBranch`

In addition to the manual adjustment to let the `linux-gcc` CI job run
the test suite with `master` and then with `main`, this patch makes sure
that GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME is set in all test scripts
that currently rely on the initial branch name being `master by default.

To determine which test scripts to mark up, the first step was to
force-set the default branch name to `master` in

- all test scripts that contain the keyword `master`,

- t4211, which expects `t/t4211/history.export` with a hard-coded ref to
  initialize the default branch,

- t5560 because it sources `t/t556x_common` which uses `master`,

- t8002 and t8012 because both source `t/annotate-tests.sh` which also
  uses `master`)

This trick was performed by this command:

	$ sed -i '/^ *\. \.\/\(test-lib\|lib-\(bash\|cvs\|git-svn\)\|gitweb-lib\)\.sh$/i\
	GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\
	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\
	' $(git grep -l master t/t[0-9]*.sh) \
	t/t4211*.sh t/t5560*.sh t/t8002*.sh t/t8012*.sh

After that, careful, manual inspection revealed that some of the test
scripts containing the needle `master` do not actually rely on a
specific default branch name: either they mention `master` only in a
comment, or they initialize that branch specificially, or they do not
actually refer to the current default branch. Therefore, the
aforementioned modification was undone in those test scripts thusly:

	$ git checkout HEAD -- \
		t/t0027-auto-crlf.sh t/t0060-path-utils.sh \
		t/t1011-read-tree-sparse-checkout.sh \
		t/t1305-config-include.sh t/t1309-early-config.sh \
		t/t1402-check-ref-format.sh t/t1450-fsck.sh \
		t/t2024-checkout-dwim.sh \
		t/t2106-update-index-assume-unchanged.sh \
		t/t3040-subprojects-basic.sh t/t3301-notes.sh \
		t/t3308-notes-merge.sh t/t3423-rebase-reword.sh \
		t/t3436-rebase-more-options.sh \
		t/t4015-diff-whitespace.sh t/t4257-am-interactive.sh \
		t/t5323-pack-redundant.sh t/t5401-update-hooks.sh \
		t/t5511-refspec.sh t/t5526-fetch-submodules.sh \
		t/t5529-push-errors.sh t/t5530-upload-pack-error.sh \
		t/t5548-push-porcelain.sh \
		t/t5552-skipping-fetch-negotiator.sh \
		t/t5572-pull-submodule.sh t/t5608-clone-2gb.sh \
		t/t5614-clone-submodules-shallow.sh \
		t/t7508-status.sh t/t7606-merge-custom.sh \
		t/t9302-fast-import-unpack-limit.sh

We excluded one set of test scripts in these commands, though: the range
of `git p4` tests. The reason? `git p4` stores the (foreign) remote
branch in the branch called `p4/master`, which is obviously not the
default branch. Manual analysis revealed that only five of these tests
actually require a specific default branch name to pass; They were
modified thusly:

	$ sed -i '/^ *\. \.\/lib-git-p4\.sh$/i\
	GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master\
	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\
	' t/t980[0167]*.sh t/t9811*.sh

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
325 files changed
tree: b6a7ffac1950815fc9c50bc040a7e90eca4ece18
  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. builtin.h
  66. bulk-checkin.c
  67. bulk-checkin.h
  68. bundle.c
  69. bundle.h
  70. cache-tree.c
  71. cache-tree.h
  72. cache.h
  73. chdir-notify.c
  74. chdir-notify.h
  75. check-builtins.sh
  76. check_bindir
  77. checkout.c
  78. checkout.h
  79. CODE_OF_CONDUCT.md
  80. color.c
  81. color.h
  82. column.c
  83. column.h
  84. combine-diff.c
  85. command-list.txt
  86. commit-graph.c
  87. commit-graph.h
  88. commit-reach.c
  89. commit-reach.h
  90. commit-slab-decl.h
  91. commit-slab-impl.h
  92. commit-slab.h
  93. commit.c
  94. commit.h
  95. common-main.c
  96. config.c
  97. config.h
  98. config.mak.dev
  99. config.mak.in
  100. config.mak.uname
  101. configure.ac
  102. connect.c
  103. connect.h
  104. connected.c
  105. connected.h
  106. convert.c
  107. convert.h
  108. copy.c
  109. COPYING
  110. credential.c
  111. credential.h
  112. csum-file.c
  113. csum-file.h
  114. ctype.c
  115. daemon.c
  116. date.c
  117. decorate.c
  118. decorate.h
  119. delta-islands.c
  120. delta-islands.h
  121. delta.h
  122. detect-compiler
  123. diff-delta.c
  124. diff-lib.c
  125. diff-no-index.c
  126. diff.c
  127. diff.h
  128. diffcore-break.c
  129. diffcore-delta.c
  130. diffcore-order.c
  131. diffcore-pickaxe.c
  132. diffcore-rename.c
  133. diffcore.h
  134. dir-iterator.c
  135. dir-iterator.h
  136. dir.c
  137. dir.h
  138. editor.c
  139. entry.c
  140. environment.c
  141. exec-cmd.c
  142. exec-cmd.h
  143. fetch-negotiator.c
  144. fetch-negotiator.h
  145. fetch-pack.c
  146. fetch-pack.h
  147. fmt-merge-msg.c
  148. fmt-merge-msg.h
  149. fsck.c
  150. fsck.h
  151. fsmonitor.c
  152. fsmonitor.h
  153. fuzz-commit-graph.c
  154. fuzz-pack-headers.c
  155. fuzz-pack-idx.c
  156. generate-cmdlist.sh
  157. generate-configlist.sh
  158. gettext.c
  159. gettext.h
  160. git-add--interactive.perl
  161. git-archimport.perl
  162. git-bisect.sh
  163. git-compat-util.h
  164. git-cvsexportcommit.perl
  165. git-cvsimport.perl
  166. git-cvsserver.perl
  167. git-difftool--helper.sh
  168. git-filter-branch.sh
  169. git-instaweb.sh
  170. git-merge-octopus.sh
  171. git-merge-one-file.sh
  172. git-merge-resolve.sh
  173. git-mergetool--lib.sh
  174. git-mergetool.sh
  175. git-p4.py
  176. git-parse-remote.sh
  177. git-quiltimport.sh
  178. git-rebase--preserve-merges.sh
  179. git-request-pull.sh
  180. git-send-email.perl
  181. git-sh-i18n.sh
  182. git-sh-setup.sh
  183. git-submodule.sh
  184. git-svn.perl
  185. GIT-VERSION-GEN
  186. git-web--browse.sh
  187. git.c
  188. git.rc
  189. gpg-interface.c
  190. gpg-interface.h
  191. graph.c
  192. graph.h
  193. grep.c
  194. grep.h
  195. hash.h
  196. hashmap.c
  197. hashmap.h
  198. help.c
  199. help.h
  200. hex.c
  201. http-backend.c
  202. http-fetch.c
  203. http-push.c
  204. http-walker.c
  205. http.c
  206. http.h
  207. ident.c
  208. imap-send.c
  209. INSTALL
  210. iterator.h
  211. json-writer.c
  212. json-writer.h
  213. khash.h
  214. kwset.c
  215. kwset.h
  216. levenshtein.c
  217. levenshtein.h
  218. LGPL-2.1
  219. line-log.c
  220. line-log.h
  221. line-range.c
  222. line-range.h
  223. linear-assignment.c
  224. linear-assignment.h
  225. list-objects-filter-options.c
  226. list-objects-filter-options.h
  227. list-objects-filter.c
  228. list-objects-filter.h
  229. list-objects.c
  230. list-objects.h
  231. list.h
  232. ll-merge.c
  233. ll-merge.h
  234. lockfile.c
  235. lockfile.h
  236. log-tree.c
  237. log-tree.h
  238. ls-refs.c
  239. ls-refs.h
  240. mailinfo.c
  241. mailinfo.h
  242. mailmap.c
  243. mailmap.h
  244. Makefile
  245. match-trees.c
  246. mem-pool.c
  247. mem-pool.h
  248. merge-blobs.c
  249. merge-blobs.h
  250. merge-ort-wrappers.c
  251. merge-ort-wrappers.h
  252. merge-ort.c
  253. merge-ort.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.c
  341. remote.h
  342. replace-object.c
  343. replace-object.h
  344. repo-settings.c
  345. repository.c
  346. repository.h
  347. rerere.c
  348. rerere.h
  349. reset.c
  350. reset.h
  351. resolve-undo.c
  352. resolve-undo.h
  353. revision.c
  354. revision.h
  355. run-command.c
  356. run-command.h
  357. send-pack.c
  358. send-pack.h
  359. sequencer.c
  360. sequencer.h
  361. serve.c
  362. serve.h
  363. server-info.c
  364. setup.c
  365. sh-i18n--envsubst.c
  366. sha1-file.c
  367. sha1-lookup.c
  368. sha1-lookup.h
  369. sha1-name.c
  370. sha1dc_git.c
  371. sha1dc_git.h
  372. shallow.c
  373. shallow.h
  374. shell.c
  375. shortlog.h
  376. sideband.c
  377. sideband.h
  378. sigchain.c
  379. sigchain.h
  380. split-index.c
  381. split-index.h
  382. stable-qsort.c
  383. strbuf.c
  384. strbuf.h
  385. streaming.c
  386. streaming.h
  387. string-list.c
  388. string-list.h
  389. strvec.c
  390. strvec.h
  391. sub-process.c
  392. sub-process.h
  393. submodule-config.c
  394. submodule-config.h
  395. submodule.c
  396. submodule.h
  397. symlinks.c
  398. tag.c
  399. tag.h
  400. tar.h
  401. tempfile.c
  402. tempfile.h
  403. thread-utils.c
  404. thread-utils.h
  405. tmp-objdir.c
  406. tmp-objdir.h
  407. trace.c
  408. trace.h
  409. trace2.c
  410. trace2.h
  411. trailer.c
  412. trailer.h
  413. transport-helper.c
  414. transport-internal.h
  415. transport.c
  416. transport.h
  417. tree-diff.c
  418. tree-walk.c
  419. tree-walk.h
  420. tree.c
  421. tree.h
  422. unicode-width.h
  423. unimplemented.sh
  424. unix-socket.c
  425. unix-socket.h
  426. unpack-trees.c
  427. unpack-trees.h
  428. upload-pack.c
  429. upload-pack.h
  430. url.c
  431. url.h
  432. urlmatch.c
  433. urlmatch.h
  434. usage.c
  435. userdiff.c
  436. userdiff.h
  437. utf8.c
  438. utf8.h
  439. varint.c
  440. varint.h
  441. version.c
  442. version.h
  443. versioncmp.c
  444. walker.c
  445. walker.h
  446. wildmatch.c
  447. wildmatch.h
  448. worktree.c
  449. worktree.h
  450. wrap-for-bin.sh
  451. wrapper.c
  452. write-or-die.c
  453. ws.c
  454. wt-status.c
  455. wt-status.h
  456. xdiff-interface.c
  457. xdiff-interface.h
  458. 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