multi-pack-index: write pack names in chunk

The multi-pack-index needs to track which packfiles it indexes. Store
these in our first required chunk. Since filenames are not well
structured, add padding to keep good alignment in later chunks.

Modify the 'git multi-pack-index read' subcommand to output the
existence of the pack-file name chunk. Modify t5319-multi-pack-index.sh
to reflect this new output and the new expected number of chunks.

Defense in depth: A pattern we are using in the multi-pack-index feature
is to verify the data as we write it. We want to ensure we never write
invalid data to the multi-pack-index. There are many checks that verify
that the values we are writing fit the format definitions. This mainly
helps developers while working on the feature, but it can also identify
issues that only appear when dealing with very large data sets. These
large sets are hard to encode into test cases.

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

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