summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-05-05 14:33:29 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-06 12:56:04 +0900
commit0d9af06e36d2e88e5e370c23e876a835fcf8b7ce (patch)
tree40c3e7b9cb542d3ef1c35d38142c92f6032ffa94 /git.c
parentstreaming.c: avoid forward declarations (diff)
downloadtgif-0d9af06e36d2e88e5e370c23e876a835fcf8b7ce.tar.xz
streaming.c: remove enum/function/vtbl indirection
Remove the indirection of discovering a function pointer to use via an enum and virtual table. This refactors code added in 46bf043807c (streaming: a new API to read from the object store, 2011-05-11). We can instead simply return an "open_istream_fn" for use from the "istream_source()" selector function directly. This allows us to get rid of the "incore", "loose" and "pack_non_delta" enum variables. We'll return the functions instead. The "stream_error" variable in that enum can likewise go in favor of returning NULL, which is what the open_istream() was doing when it got that value anyway. We can thus remove the entire enum, and the "open_istream_tbl" virtual table that (indirectly) referenced it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions