From ecb5091fd4301ac647db0bd2504112b38f7ee06d 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:48 +0200 Subject: cocci: apply the "commit.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 "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- commit.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'commit.h') diff --git a/commit.h b/commit.h index cc2c5da7bd..e98ee6e698 100644 --- a/commit.h +++ b/commit.h @@ -109,11 +109,6 @@ static inline int repo_parse_commit_no_graph(struct repository *r, return repo_parse_commit_internal(r, commit, 0, 0); } -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define parse_commit_internal(item, quiet, use) repo_parse_commit_internal(the_repository, item, quiet, use) -#define parse_commit(item) repo_parse_commit(the_repository, item) -#endif - void parse_commit_or_die(struct commit *item); struct buffer_slab; @@ -140,9 +135,6 @@ const void *get_cached_commit_buffer(struct repository *, const struct commit *, const void *repo_get_commit_buffer(struct repository *r, const struct commit *, unsigned long *size); -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define get_commit_buffer(c, s) repo_get_commit_buffer(the_repository, c, s) -#endif /* * Tell the commit subsystem that we are done with a particular commit buffer. @@ -153,9 +145,6 @@ const void *repo_get_commit_buffer(struct repository *r, void repo_unuse_commit_buffer(struct repository *r, const struct commit *, const void *buffer); -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define unuse_commit_buffer(c, b) repo_unuse_commit_buffer(the_repository, c, b) -#endif /* * Free any cached object buffer associated with the commit. @@ -163,7 +152,6 @@ void repo_unuse_commit_buffer(struct repository *r, void free_commit_buffer(struct parsed_object_pool *pool, struct commit *); struct tree *repo_get_commit_tree(struct repository *, const struct commit *); -#define get_commit_tree(c) repo_get_commit_tree(the_repository, c) struct object_id *get_commit_tree_oid(const struct commit *); /* @@ -206,16 +194,10 @@ void free_commit_list(struct commit_list *list); struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */ int has_non_ascii(const char *text); -const char *logmsg_reencode(const struct commit *commit, - char **commit_encoding, - const char *output_encoding); const char *repo_logmsg_reencode(struct repository *r, const struct commit *commit, char **commit_encoding, const char *output_encoding); -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define logmsg_reencode(c, enc, out) repo_logmsg_reencode(the_repository, c, enc, out) -#endif const char *skip_blank_lines(const char *msg); -- 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 --- commit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commit.h') diff --git a/commit.h b/commit.h index e98ee6e698..d4adf11101 100644 --- a/commit.h +++ b/commit.h @@ -130,7 +130,7 @@ const void *get_cached_commit_buffer(struct repository *, const struct commit *, /* * Get the commit's object contents, either from cache or by reading the object * from disk. The resulting memory should not be modified, and must be given - * to unuse_commit_buffer when the caller is done. + * to repo_unuse_commit_buffer when the caller is done. */ const void *repo_get_commit_buffer(struct repository *r, const struct commit *, @@ -139,7 +139,7 @@ const void *repo_get_commit_buffer(struct repository *r, /* * Tell the commit subsystem that we are done with a particular commit buffer. * The commit and buffer should be the input and return value, respectively, - * from an earlier call to get_commit_buffer. The buffer may or may not be + * from an earlier call to repo_get_commit_buffer. The buffer may or may not be * freed by this call; callers should not access the memory afterwards. */ void repo_unuse_commit_buffer(struct repository *r, -- cgit v1.2.3