cocci: apply the "commit.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
cb338c23d6
commit
ecb5091fd4
12
revision.c
12
revision.c
@ -778,8 +778,8 @@ static int check_maybe_different_in_bloom_filter(struct rev_info *revs,
|
||||
static int rev_compare_tree(struct rev_info *revs,
|
||||
struct commit *parent, struct commit *commit, int nth_parent)
|
||||
{
|
||||
struct tree *t1 = get_commit_tree(parent);
|
||||
struct tree *t2 = get_commit_tree(commit);
|
||||
struct tree *t1 = repo_get_commit_tree(the_repository, parent);
|
||||
struct tree *t2 = repo_get_commit_tree(the_repository, commit);
|
||||
int bloom_ret = 1;
|
||||
|
||||
if (!t1)
|
||||
@ -825,7 +825,7 @@ static int rev_compare_tree(struct rev_info *revs,
|
||||
|
||||
static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit)
|
||||
{
|
||||
struct tree *t1 = get_commit_tree(commit);
|
||||
struct tree *t1 = repo_get_commit_tree(the_repository, commit);
|
||||
|
||||
if (!t1)
|
||||
return 0;
|
||||
@ -963,7 +963,7 @@ static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit)
|
||||
if (!revs->prune)
|
||||
return;
|
||||
|
||||
if (!get_commit_tree(commit))
|
||||
if (!repo_get_commit_tree(the_repository, commit))
|
||||
return;
|
||||
|
||||
if (!commit->parents) {
|
||||
@ -3878,7 +3878,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt)
|
||||
* in it.
|
||||
*/
|
||||
encoding = get_log_output_encoding();
|
||||
message = logmsg_reencode(commit, NULL, encoding);
|
||||
message = repo_logmsg_reencode(the_repository, commit, NULL, encoding);
|
||||
|
||||
/* Copy the commit to temporary if we are using "fake" headers */
|
||||
if (buf.len)
|
||||
@ -3914,7 +3914,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt)
|
||||
retval = grep_buffer(&opt->grep_filter,
|
||||
(char *)message, strlen(message));
|
||||
strbuf_release(&buf);
|
||||
unuse_commit_buffer(commit, message);
|
||||
repo_unuse_commit_buffer(the_repository, commit, message);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user