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
@ -640,7 +640,7 @@ static void describe_detached_head(const char *msg, struct commit *commit)
|
||||
{
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
|
||||
if (!parse_commit(commit))
|
||||
if (!repo_parse_commit(the_repository, commit))
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &sb);
|
||||
if (print_sha1_ellipsis()) {
|
||||
fprintf(stderr, "%s %s... %s\n", msg,
|
||||
@ -755,7 +755,8 @@ static int merge_working_tree(const struct checkout_opts *opts,
|
||||
BUG("'switch --orphan' should never accept a commit as starting point");
|
||||
new_tree = parse_tree_indirect(the_hash_algo->empty_tree);
|
||||
} else
|
||||
new_tree = get_commit_tree(new_branch_info->commit);
|
||||
new_tree = repo_get_commit_tree(the_repository,
|
||||
new_branch_info->commit);
|
||||
if (opts->discard_changes) {
|
||||
ret = reset_tree(new_tree, opts, 1, writeout_error, new_branch_info);
|
||||
if (ret)
|
||||
@ -817,7 +818,8 @@ static int merge_working_tree(const struct checkout_opts *opts,
|
||||
*/
|
||||
if (!old_branch_info->commit)
|
||||
return 1;
|
||||
old_tree = get_commit_tree(old_branch_info->commit);
|
||||
old_tree = repo_get_commit_tree(the_repository,
|
||||
old_branch_info->commit);
|
||||
|
||||
if (repo_index_has_changes(the_repository, old_tree, &sb))
|
||||
die(_("cannot continue with staged changes in "
|
||||
@ -1006,7 +1008,7 @@ static void describe_one_orphan(struct strbuf *sb, struct commit *commit)
|
||||
strbuf_addstr(sb, " ");
|
||||
strbuf_add_unique_abbrev(sb, &commit->object.oid, DEFAULT_ABBREV);
|
||||
strbuf_addch(sb, ' ');
|
||||
if (!parse_commit(commit))
|
||||
if (!repo_parse_commit(the_repository, commit))
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, sb);
|
||||
strbuf_addch(sb, '\n');
|
||||
}
|
||||
@ -1206,7 +1208,8 @@ static void setup_new_branch_info_and_source_tree(
|
||||
*source_tree = parse_tree_indirect(rev);
|
||||
} else {
|
||||
parse_commit_or_die(new_branch_info->commit);
|
||||
*source_tree = get_commit_tree(new_branch_info->commit);
|
||||
*source_tree = repo_get_commit_tree(the_repository,
|
||||
new_branch_info->commit);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user