git/t/helper
Derrick Stolee e2df6c3972 test-read-cache: print cache entries with --table
This table is helpful for discovering data in the index to ensure it is
being written correctly, especially as we build and test the
sparse-index. This table includes an output format similar to 'git
ls-tree', but should not be compared to that directly. The biggest
reasons are that 'git ls-tree' includes a tree entry for every
subdirectory, even those that would not appear as a sparse directory in
a sparse-index. Further, 'git ls-tree' does not use a trailing directory
separator for its tree rows.

This does not print the stat() information for the blobs. That will be
added in a future change with another option. The tests that are added
in the next few changes care only about the object types and IDs.
However, this future need for full index information justifies the need
for this test helper over extending a user-facing feature, such as 'git
ls-files'.

To make the option parsing slightly more robust, wrap the string
comparisons in a loop adapted from test-dir-iterator.c.

Care must be taken with the final check for the 'cnt' variable. We
continue the expectation that the numerical value is the final argument.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-30 12:57:46 -07:00
..
.gitignore drop vcs-svn experiment 2020-08-13 11:02:15 -07:00
test-advise.c test-advise: check argument count with argc instead of argv 2020-09-30 12:53:48 -07:00
test-bloom.c Merge branch 'tb/bloom-improvements' 2020-09-29 14:01:20 -07:00
test-chmtime.c
test-config.c config: fix leaks from git_config_get_string_const() 2020-08-14 10:52:04 -07:00
test-crontab.c maintenance: add start/stop subcommands 2020-09-25 10:59:44 -07:00
test-ctype.c
test-date.c
test-delta.c
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c
test-dump-fsmonitor.c fsmonitor: change last update timestamp on the index_state to opaque token 2020-01-13 14:58:43 -08:00
test-dump-split-index.c t/helper/test-dump-split-index: initialize git repository 2020-02-24 09:33:24 -08:00
test-dump-untracked-cache.c
test-example-decorate.c
test-fake-ssh.c
test-fast-rebase.c fast-rebase: demonstrate merge-ort's API via new test-tool command 2020-10-29 14:05:48 -07:00
test-genrandom.c
test-genzeros.c
test-hash-speed.c
test-hash.c
test-hashmap.c Use new HASHMAP_INIT macro to simplify hashmap initialization 2020-11-11 12:55:27 -08:00
test-index-version.c
test-json-writer.c
test-lazy-init-name-hash.c
test-match-trees.c
test-mergesort.c
test-mktemp.c
test-oid-array.c t/helper: initialize the repository for test-sha1-array 2020-06-19 14:04:08 -07:00
test-oidmap.c
test-online-cpus.c
test-parse-options.c parse-options: add testcases for OPT_CMDMODE() 2020-02-20 13:20:40 -08:00
test-parse-pathspec-file.c test-parse-pathspec-file.c: s/0/NULL/ for pointer type 2020-04-27 11:21:12 -07:00
test-path-utils.c real_path: remove unsafe API 2020-03-10 11:41:40 -07:00
test-pcre2-config.c grep/pcre2: better support invalid UTF-8 haystacks 2021-01-24 16:09:17 -08:00
test-pkt-line.c test-pkt-line: drop colon from sideband identity 2020-10-27 11:57:51 -07:00
test-prio-queue.c
test-proc-receive.c receive-pack: use default version 0 for proc-receive 2020-11-11 12:46:56 -08:00
test-progress.c progress.c: silence cgcc suggestion about internal linkage 2020-04-27 11:21:28 -07:00
test-reach.c commit-reach: fix in_merge_bases_many bug 2020-10-02 10:26:31 -07:00
test-read-cache.c test-read-cache: print cache entries with --table 2021-03-30 12:57:46 -07:00
test-read-graph.c commit-graph: implement generation data chunk 2021-01-18 16:21:18 -08:00
test-read-midx.c multi-pack-index: use hash version byte 2020-08-17 16:45:20 -07:00
test-ref-store.c refs: switch peel_ref() to peel_iterated_oid() 2021-01-21 15:51:31 -08:00
test-regex.c t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ) 2020-05-18 13:03:35 -07:00
test-repository.c t/helper: make repository tests hash independent 2020-02-24 09:33:27 -08:00
test-revision-walking.c
test-run-command.c strvec: rename struct fields 2020-07-30 19:18:06 -07:00
test-scrap-cache-tree.c
test-serve-v2.c
test-sha1.c
test-sha1.sh
test-sha256.c
test-sigchain.c
test-strcmp-offset.c
test-string-list.c
test-submodule-config.c
test-submodule-nested-repo-config.c drop unused argc parameters 2020-09-30 12:53:47 -07:00
test-subprocess.c
test-tool.c grep/pcre2: better support invalid UTF-8 haystacks 2021-01-24 16:09:17 -08:00
test-tool.h grep/pcre2: better support invalid UTF-8 haystacks 2021-01-24 16:09:17 -08:00
test-trace2.c usage: trace2 BUG() invocations 2021-02-09 14:14:34 -08:00
test-urlmatch-normalization.c
test-wildmatch.c
test-windows-named-pipe.c use strpbrk(3) to search for characters from a given set 2020-02-24 09:30:31 -08:00
test-write-cache.c
test-xml-encode.c