From: Junio C Hamano Date: Thu, 6 Apr 2023 20:38:30 +0000 (-0700) Subject: Merge branch 'ab/remove-implicit-use-of-the-repository' X-Git-Tag: v2.41.0-rc0~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72871b198f50962a555685726e42f435cdd4efa1;p=thirdparty%2Fgit.git Merge branch 'ab/remove-implicit-use-of-the-repository' Code clean-up around the use of the_repository. * ab/remove-implicit-use-of-the-repository: libs: use "struct repository *" argument, not "the_repository" post-cocci: adjust comments for recent repo_* migration cocci: apply the "revision.h" part of "the_repository.pending" cocci: apply the "rerere.h" part of "the_repository.pending" cocci: apply the "refs.h" part of "the_repository.pending" cocci: apply the "promisor-remote.h" part of "the_repository.pending" cocci: apply the "packfile.h" part of "the_repository.pending" cocci: apply the "pretty.h" part of "the_repository.pending" cocci: apply the "object-store.h" part of "the_repository.pending" cocci: apply the "diff.h" part of "the_repository.pending" cocci: apply the "commit.h" part of "the_repository.pending" cocci: apply the "commit-reach.h" part of "the_repository.pending" cocci: apply the "cache.h" part of "the_repository.pending" cocci: add missing "the_repository" macros to "pending" cocci: sort "the_repository" rules by header cocci: fix incorrect & verbose "the_repository" rules cocci: remove dead rule from "the_repository.pending.cocci" --- 72871b198f50962a555685726e42f435cdd4efa1 diff --cc cache.h index 5a736a2b7e,555354e196..0ede885656 --- a/cache.h +++ b/cache.h @@@ -1409,9 -1616,25 +1396,7 @@@ void *read_object_with_reference(struc struct object *repo_peel_to_type(struct repository *r, const char *name, int namelen, struct object *o, enum object_type); - #define peel_to_type(name, namelen, obj, type) \ - repo_peel_to_type(the_repository, name, namelen, obj, type) -#define IDENT_STRICT 1 -#define IDENT_NO_DATE 2 -#define IDENT_NO_NAME 4 - -enum want_ident { - WANT_BLANK_IDENT, - WANT_AUTHOR_IDENT, - WANT_COMMITTER_IDENT -}; - -const char *git_author_info(int); -const char *git_committer_info(int); -const char *fmt_ident(const char *name, const char *email, - enum want_ident whose_ident, - const char *date_str, int); -const char *fmt_name(enum want_ident); -const char *ident_default_name(void); -const char *ident_default_email(void); const char *git_editor(void); const char *git_sequence_editor(void); const char *git_pager(int stdout_is_tty); diff --cc commit.h index 06657b4c6e,d4adf11101..69b2f376e9 --- a/commit.h +++ b/commit.h @@@ -205,9 -193,7 +193,6 @@@ void free_commit_list(struct commit_lis struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */ - const char *logmsg_reencode(const struct commit *commit, - char **commit_encoding, - const char *output_encoding); -int has_non_ascii(const char *text); const char *repo_logmsg_reencode(struct repository *r, const struct commit *commit, char **commit_encoding, diff --cc http-walker.c index 93a4a98a3d,da1b6b6421..e5dadae377 --- a/http-walker.c +++ b/http-walker.c @@@ -135,10 -135,10 +135,10 @@@ static int fill_active_slot(void *data list_for_each_safe(pos, tmp, head) { obj_req = list_entry(pos, struct object_request, node); if (obj_req->state == WAITING) { - if (has_object_file(&obj_req->oid)) + if (repo_has_object_file(the_repository, &obj_req->oid)) obj_req->state = COMPLETE; else { - start_object_request(walker, obj_req); + start_object_request(obj_req); return 1; } }