]> git.ipfire.org Git - thirdparty/git.git/commit - object-store.h
object-store: prepare read_object_file to deal with any repo
authorStefan Beller <sbeller@google.com>
Wed, 14 Nov 2018 00:12:47 +0000 (16:12 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2018 08:22:40 +0000 (17:22 +0900)
commitafd69dcc21972d766211ac253af2c18384e93056
tree7ead2fbeba246f9c50a191d1797dcad11ca33eb4
parenta3b72c89bdd10f8b22d7dae382f0ce9833e5d179
object-store: prepare read_object_file to deal with any repo

As read_object_file is a widely used function (which is also regularly used
in new code in flight between master..pu), changing its signature is painful
is hard, as other series in flight rely on the original signature. It would
burden the maintainer if we'd just change the signature.

Introduce repo_read_object_file which takes the repository argument, and
hide the original read_object_file as a macro behind
NO_THE_REPOSITORY_COMPATIBILITY_MACROS, similar to
e675765235 (diff.c: remove implicit dependency on the_index, 2018-09-21)

Add a coccinelle patch to convert existing callers, but do not apply
the resulting patch to keep the diff of this patch small.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/the_repository.pending.cocci [new file with mode: 0644]
object-store.h