git/t/helper
Jeff King 479ab76c9f packfile: use object_id in find_pack_entry_one()
The main function we use to search a pack index for an object is
find_pack_entry_one(). That function still takes a bare pointer to the
hash, despite the fact that its underlying bsearch_pack() function needs
an object_id struct. And so we end up making an extra copy of the hash
into the struct just to do a lookup.

As it turns out, all callers but one already have such an object_id. So
we can just take a pointer to that struct and use it directly. This
avoids the extra copy and provides a more type-safe interface.

The one exception is get_delta_base() in packfile.c, when we are chasing
a REF_DELTA from inside the pack (and thus we have a pointer directly to
the mmap'd pack memory, not a struct). We can just bump the hashcpy()
from inside find_pack_entry_one() to this one caller that needs it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2024-10-25 17:35:46 -04:00
..
.gitignore
test-advise.c
test-bitmap.c
test-bloom.c
test-bundle-uri.c
test-cache-tree.c
test-chmtime.c
test-config.c
test-crontab.c
test-csprng.c
test-date.c
test-delete-gpgsig.c
test-delta.c
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c
test-dump-fsmonitor.c
test-dump-split-index.c
test-dump-untracked-cache.c
test-env-helper.c
test-example-tap.c
test-fake-ssh.c
test-find-pack.c packfile: use object_id in find_pack_entry_one() 2024-10-25 17:35:46 -04:00
test-fsmonitor-client.c
test-genrandom.c
test-genzeros.c
test-getcwd.c
test-hash-speed.c
test-hash.c
test-hashmap.c
test-hexdump.c
test-json-writer.c
test-lazy-init-name-hash.c
test-match-trees.c
test-mergesort.c
test-mktemp.c
test-online-cpus.c
test-pack-mtimes.c
test-parse-options.c
test-parse-pathspec-file.c
test-partial-clone.c t/helper: fix leaking repository in partial-clone helper 2024-09-30 11:23:05 -07:00
test-path-utils.c
test-pcre2-config.c
test-pkt-line.c
test-proc-receive.c t/helper: fix leaks in proc-receive helper 2024-09-30 11:23:08 -07:00
test-progress.c
test-reach.c
test-read-cache.c
test-read-graph.c
test-read-midx.c
test-ref-store.c
test-reftable.c reftable/merged: handle allocation failures in merged_table_init_iter() 2024-10-02 07:53:53 -07:00
test-regex.c
test-repository.c
test-revision-walking.c
test-rot13-filter.c t/helper: fix a typo 2024-10-10 13:31:13 -07:00
test-run-command.c
test-scrap-cache-tree.c
test-serve-v2.c
test-sha1.c
test-sha1.sh
test-sha256.c
test-sigchain.c
test-simple-ipc.c
test-string-list.c
test-submodule-config.c
test-submodule-nested-repo-config.c
test-submodule.c
test-subprocess.c
test-tool-utils.h
test-tool.c
test-tool.h
test-trace2.c
test-truncate.c
test-userdiff.c
test-wildmatch.c
test-windows-named-pipe.c
test-write-cache.c
test-xml-encode.c