cocci: apply the "object-store.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to
"object-store.h".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
Ævar Arnfjörð Bjarmason2 years agocommitted byJunio C Hamano
@ -1628,14 +1629,14 @@ static int delete_remote_branch(const char *pattern, int force)
@@ -1628,14 +1629,14 @@ static int delete_remote_branch(const char *pattern, int force)
return error("Remote HEAD symrefs too deep");
if (is_null_oid(&head_oid))
return error("Unable to resolve remote HEAD");
if (!has_object_file(&head_oid))
if (!repo_has_object_file(the_repository, &head_oid))
return error("Remote HEAD resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", oid_to_hex(&head_oid));
/* Remote branch must resolve to a known object */
if (is_null_oid(&remote_ref->old_oid))
return error("Unable to resolve remote branch %s",
remote_ref->name);
if (!has_object_file(&remote_ref->old_oid))
if (!repo_has_object_file(the_repository, &remote_ref->old_oid))
return error("Remote branch %s resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", remote_ref->name, oid_to_hex(&remote_ref->old_oid));
/* Remote branch must be an ancestor of remote HEAD */
@ -1855,7 +1856,7 @@ int cmd_main(int argc, const char **argv)
@@ -1855,7 +1856,7 @@ int cmd_main(int argc, const char **argv)
if (!force_all &&
!is_null_oid(&ref->old_oid) &&
!ref->force) {
if (!has_object_file(&ref->old_oid) ||
if (!repo_has_object_file(the_repository, &ref->old_oid) ||
@ -129,7 +129,8 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)
@@ -129,7 +129,8 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)