From bc726bd075929aab6b3e09d4dd5c2b0726fd5350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:50 +0200 Subject: cocci: apply the "object-store.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "object-store.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- object-store.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'object-store.h') diff --git a/object-store.h b/object-store.h index 1a713d89d7..b47849d4e7 100644 --- a/object-store.h +++ b/object-store.h @@ -245,9 +245,6 @@ void *repo_read_object_file(struct repository *r, const struct object_id *oid, enum object_type *type, unsigned long *size); -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define read_object_file(oid, type, size) repo_read_object_file(the_repository, oid, type, size) -#endif /* Read and unpack an object file into memory, write memory to an object file */ int oid_object_info(struct repository *r, const struct object_id *, unsigned long *); @@ -324,10 +321,6 @@ int has_object(struct repository *r, const struct object_id *oid, int repo_has_object_file(struct repository *r, const struct object_id *oid); int repo_has_object_file_with_flags(struct repository *r, const struct object_id *oid, int flags); -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define has_object_file(oid) repo_has_object_file(the_repository, oid) -#define has_object_file_with_flags(oid, flags) repo_has_object_file_with_flags(the_repository, oid, flags) -#endif /* * Return true iff an alternate object database has a loose object -- cgit v1.2.3 From c7c33f50bd1bb168a8c69157a0735ded84084f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:57 +0200 Subject: post-cocci: adjust comments for recent repo_* migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preceding commits we changed many calls to macros that were providing a "the_repository" argument to invoke corresponding repo_*() function instead. Let's follow-up and adjust references to those in comments, which coccinelle didn't (and inherently can't) catch. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- object-store.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object-store.h') diff --git a/object-store.h b/object-store.h index b47849d4e7..9217ae8306 100644 --- a/object-store.h +++ b/object-store.h @@ -216,7 +216,7 @@ struct raw_object_store { /* * A fast, rough count of the number of objects in the repository. * These two fields are not meant for direct access. Use - * approximate_object_count() instead. + * repo_approximate_object_count() instead. */ unsigned long approximate_object_count; unsigned approximate_object_count_valid : 1; @@ -343,7 +343,7 @@ void assert_oid_type(const struct object_id *oid, enum object_type expect); /* * Enabling the object read lock allows multiple threads to safely call the - * following functions in parallel: repo_read_object_file(), read_object_file(), + * following functions in parallel: repo_read_object_file(), * read_object_with_reference(), oid_object_info() and oid_object_info_extended(). * * obj_read_lock() and obj_read_unlock() may also be used to protect other -- cgit v1.2.3