From: Junio C Hamano Date: Tue, 4 Apr 2023 15:25:52 +0000 (-0700) Subject: Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-cache-h X-Git-Tag: v2.41.0-rc0~61^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7dca80692dec7f0717d9ad6d978d0ceab90cf6a;p=thirdparty%2Fgit.git Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-cache-h * 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" --- e7dca80692dec7f0717d9ad6d978d0ceab90cf6a diff --cc cache.h index c43051d792,555354e196..82d7b112b4 --- a/cache.h +++ b/cache.h @@@ -710,10 -1211,30 +710,8 @@@ extern int quote_path_fully * reentrant, as it calls into other non-reentrant git code. */ const char *repo_find_unique_abbrev(struct repository *r, const struct object_id *oid, int len); - #define find_unique_abbrev(oid, len) repo_find_unique_abbrev(the_repository, oid, len) int repo_find_unique_abbrev_r(struct repository *r, char *hex, const struct object_id *oid, int len); - #define find_unique_abbrev_r(hex, oid, len) repo_find_unique_abbrev_r(the_repository, hex, oid, len) -/* set default permissions by passing mode arguments to open(2) */ -int git_mkstemps_mode(char *pattern, int suffix_len, int mode); -int git_mkstemp_mode(char *pattern, int mode); - -/* - * NOTE NOTE NOTE!! - * - * PERM_UMASK, OLD_PERM_GROUP and OLD_PERM_EVERYBODY enumerations must - * not be changed. Old repositories have core.sharedrepository written in - * numeric format, and therefore these values are preserved for compatibility - * reasons. - */ -enum sharedrepo { - PERM_UMASK = 0, - OLD_PERM_GROUP = 1, - OLD_PERM_EVERYBODY = 2, - PERM_GROUP = 0660, - PERM_EVERYBODY = 0664 -}; -int git_config_perm(const char *var, const char *value); -int adjust_shared_perm(const char *path); - /* * Create the directory containing the named path, using care to be * somewhat safe against races. Return one of the scld_error values to @@@ -911,9 -1597,9 +900,7 @@@ int repo_interpret_branch_name(struct r const char *str, int len, struct strbuf *buf, const struct interpret_branch_name_options *options); - #define interpret_branch_name(str, len, buf, options) \ - repo_interpret_branch_name(the_repository, str, len, buf, options) -int validate_headref(const char *ref); - int base_name_compare(const char *name1, size_t len1, int mode1, const char *name2, size_t len2, int mode2); int df_name_compare(const char *name1, size_t len1, int mode1, @@@ -930,9 -1616,25 +917,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,