git/t/helper
Patrick Steinhardt 8e9a1d0dc2 t/helper: fix segfault in "oid-array" command without repository
The "oid-array" test helper can supposedly work without a Git
repository, but will in fact crash because `the_repository->hash_algo`
is not initialized. This is because `oid_pos()`, which is used by
`oid_array_lookup()`, depends on `the_hash_algo->rawsz`.

Ideally, we'd adapt `oid_pos()` to not depend on `the_hash_algo`
anymore. That is a bigger untertaking though, so instead we fall back to
SHA1 when there is no repository.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-06-14 10:26:34 -07:00
..
.gitignore
test-advise.c
test-bitmap.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-bloom.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-bundle-uri.c
test-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-chmtime.c
test-config.c
test-crontab.c
test-csprng.c
test-date.c date: make DATE_MODE thread-safe 2024-04-05 15:21:14 -07:00
test-delete-gpgsig.c
test-delta.c
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-fsmonitor.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-split-index.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-untracked-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-env-helper.c
test-example-tap.c t0080: turn t-basic unit test into a helper 2024-05-06 14:06:34 -07:00
test-fake-ssh.c
test-find-pack.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-fsmonitor-client.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-genrandom.c
test-genzeros.c
test-getcwd.c
test-hash-speed.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-hash.c
test-hashmap.c
test-hexdump.c
test-json-writer.c
test-lazy-init-name-hash.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-match-trees.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-mergesort.c
test-mktemp.c
test-oid-array.c t/helper: fix segfault in "oid-array" command without repository 2024-06-14 10:26:34 -07:00
test-oidmap.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-online-cpus.c
test-pack-mtimes.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-parse-options.c
test-parse-pathspec-file.c
test-partial-clone.c t/helper: use correct object hash in partial-clone helper 2024-06-14 10:26:34 -07:00
test-path-utils.c Merge branch 'fixes/2.45.1/2.41' into fixes/2.45.1/2.42 2024-05-24 16:57:43 -07:00
test-pcre2-config.c
test-pkt-line.c Merge branch 'jx/sideband-chomp-newline-fix' into maint-2.43 2024-02-08 16:22:11 -08:00
test-proc-receive.c
test-progress.c
test-reach.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-read-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-read-graph.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-read-midx.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-ref-store.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-reftable.c Merge branch 'cp/reftable-unit-test' 2024-06-12 13:37:14 -07:00
test-regex.c
test-repository.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-revision-walking.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-rot13-filter.c
test-run-command.c test-tool run-command testsuite: support unit tests 2024-05-06 14:06:34 -07:00
test-scrap-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-serve-v2.c
test-sha1.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-sha1.sh
test-sha256.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-sigchain.c
test-simple-ipc.c
test-string-list.c
test-submodule-config.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-submodule-nested-repo-config.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-submodule.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-subprocess.c
test-tool-utils.h
test-tool.c Merge branch 'gt/unit-test-oidtree' into ps/use-the-repository 2024-06-13 09:39:46 -07:00
test-tool.h Merge branch 'gt/unit-test-oidtree' into ps/use-the-repository 2024-06-13 09:39:46 -07:00
test-trace2.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-truncate.c
test-urlmatch-normalization.c
test-userdiff.c
test-wildmatch.c
test-windows-named-pipe.c
test-write-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-xml-encode.c