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"
This commit is contained in:
22
commit.h
22
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;
|
||||
@ -135,27 +130,21 @@ 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 *,
|
||||
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.
|
||||
* 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,
|
||||
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 *);
|
||||
|
||||
/*
|
||||
@ -205,16 +193,10 @@ void free_commit_list(struct commit_list *list);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user