git/t/helper
Patrick Steinhardt 31f898397b refs: drop unused params from the reflog iterator callback
The ref and reflog iterators share much of the same underlying code to
iterate over the corresponding entries. This results in some weird code
because the reflog iterator also exposes an object ID as well as a flag
to the callback function. Neither of these fields do refer to the reflog
though -- they refer to the corresponding ref with the same name. This
is quite misleading. In practice at least the object ID cannot really be
implemented in any other way as a reflog does not have a specific object
ID in the first place. This is further stressed by the fact that none of
the callbacks except for our test helper make use of these fields.

Split up the infrastucture so that ref and reflog iterators use separate
callback signatures. This allows us to drop the nonsensical fields from
the reflog iterator.

Note that internally, the backends still use the same shared infra to
iterate over both types. As the backends should never end up being
called directly anyway, this is not much of a problem and thus kept
as-is for simplicity's sake.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-21 09:58:06 -08:00
..
.gitignore
test-advise.c
test-bitmap.c
test-bloom.c test-bloom: stop setting up Git directory twice 2023-11-07 08:51:40 +09:00
test-bundle-uri.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
test-cache-tree.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-chmtime.c
test-config.c config: pass kvi to die_bad_number() 2023-06-28 14:06:40 -07:00
test-crontab.c
test-csprng.c
test-date.c Merge branch 'en/header-split-cache-h' 2023-04-25 13:56:20 -07:00
test-delta.c treewide: remove unnecessary includes for wrapper.h 2023-07-05 11:41:59 -07:00
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-dump-fsmonitor.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-dump-split-index.c t/helper: mark unused callback void data parameters 2023-07-13 17:24:00 -07:00
test-dump-untracked-cache.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-env-helper.c parse: separate out parsing functions from config.h 2023-09-29 15:14:57 -07:00
test-example-decorate.c decorate: add clear_decoration() function 2023-10-05 14:54:55 -07:00
test-fake-ssh.c
test-find-pack.c t/helper: add 'find-pack' test-tool 2023-10-02 14:54:29 -07:00
test-fsmonitor-client.c treewide: remove unnecessary includes for wrapper.h 2023-07-05 11:41:59 -07:00
test-genrandom.c
test-genzeros.c
test-getcwd.c
test-hash-speed.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-hash.c
test-hashmap.c t/helper/test-hashmap.c: avoid using `strtok()` 2023-04-24 16:01:28 -07:00
test-hexdump.c
test-json-writer.c t/helper/test-json-writer.c: avoid using `strtok()` 2023-04-24 16:01:28 -07:00
test-lazy-init-name-hash.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-match-trees.c Merge branch 'en/header-split-cache-h-part-2' 2023-05-09 16:45:46 -07:00
test-mergesort.c treewide: remove cache.h inclusion due to previous changes 2023-04-24 12:47:33 -07:00
test-mktemp.c
test-oid-array.c t/helper: mark unused callback void data parameters 2023-07-13 17:24:00 -07:00
test-oidmap.c Merge branch 'en/header-split-cache-h-part-2' 2023-05-09 16:45:46 -07:00
test-oidtree.c Merge branch 'en/header-split-cache-h-part-2' 2023-05-09 16:45:46 -07:00
test-online-cpus.c
test-pack-mtimes.c object-store-ll.h: split this header out of object-store.h 2023-06-21 13:39:54 -07:00
test-parse-options.c parse-options: make CMDMODE errors more precise 2023-10-29 09:15:18 +09:00
test-parse-pathspec-file.c
test-partial-clone.c object-store-ll.h: split this header out of object-store.h 2023-06-21 13:39:54 -07:00
test-path-utils.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-pcre2-config.c
test-pkt-line.c Merge branch 'jx/sideband-chomp-newline-fix' 2024-01-12 16:09:56 -08:00
test-proc-receive.c
test-progress.c
test-reach.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
test-read-cache.c treewide: remove unnecessary includes for wrapper.h 2023-07-05 11:41:59 -07:00
test-read-graph.c object-store-ll.h: split this header out of object-store.h 2023-06-21 13:39:54 -07:00
test-read-midx.c midx: implement `midx_preferred_pack()` 2023-12-14 14:38:08 -08:00
test-ref-store.c refs: drop unused params from the reflog iterator callback 2024-02-21 09:58:06 -08:00
test-reftable.c reftable: ensure git-compat-util.h is the first (indirect) include 2023-04-24 12:47:33 -07:00
test-regex.c doc: switch links to https 2023-11-26 10:07:05 +09:00
test-repository.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:33 -08:00
test-revision-walking.c diff.h: remove unnecessary include of oidset.h 2023-06-21 13:39:53 -07:00
test-rot13-filter.c
test-run-command.c
test-scrap-cache-tree.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-serve-v2.c
test-sha1.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-sha1.sh
test-sha256.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-sigchain.c
test-simple-ipc.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
test-strcmp-offset.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-string-list.c Merge branch 'en/header-split-cache-h-part-2' 2023-05-09 16:45:46 -07:00
test-submodule-config.c Merge branch 'en/header-split-cache-h-part-2' 2023-05-09 16:45:46 -07:00
test-submodule-nested-repo-config.c hash-ll.h: split out of hash.h to remove dependency on repository.h 2023-04-24 12:47:32 -07:00
test-submodule.c Merge branch 'vd/fsck-submodule-url-test' 2024-01-26 08:54:47 -08:00
test-subprocess.c
test-tool-utils.h
test-tool.c Merge branch 'cp/unit-test-prio-queue' 2024-02-08 13:20:33 -08:00
test-tool.h Merge branch 'cp/unit-test-prio-queue' 2024-02-08 13:20:33 -08:00
test-trace2.c Merge branch 'jh/trace2-redact-auth' 2023-12-18 14:10:13 -08:00
test-truncate.c t: add a test helper to truncate files 2023-10-13 13:33:35 -07:00
test-urlmatch-normalization.c
test-userdiff.c config: add ctx arg to config_fn_t 2023-06-28 14:06:39 -07:00
test-wildmatch.c git-compat-util.h: remove unneccessary include of wildmatch.h 2023-06-21 13:39:54 -07:00
test-windows-named-pipe.c
test-write-cache.c cache.h: remove this no-longer-used header 2023-06-21 13:39:53 -07:00
test-xml-encode.c