From d850b7a545fcfbd97460a921c7f7c59d933eb0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:46 +0200 Subject: cocci: apply the "cache.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "cache.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- parse-options-cb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parse-options-cb.c') diff --git a/parse-options-cb.c b/parse-options-cb.c index d346dbe210..0f7b40d0c0 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -91,7 +91,7 @@ int parse_opt_commits(const struct option *opt, const char *arg, int unset) if (!arg) return -1; - if (get_oid(arg, &oid)) + if (repo_get_oid(the_repository, arg, &oid)) return error("malformed object name %s", arg); commit = lookup_commit_reference(the_repository, &oid); if (!commit) @@ -110,7 +110,7 @@ int parse_opt_commit(const struct option *opt, const char *arg, int unset) if (!arg) return -1; - if (get_oid(arg, &oid)) + if (repo_get_oid(the_repository, arg, &oid)) return error("malformed object name %s", arg); commit = lookup_commit_reference(the_repository, &oid); if (!commit) @@ -129,7 +129,7 @@ int parse_opt_object_name(const struct option *opt, const char *arg, int unset) } if (!arg) return -1; - if (get_oid(arg, &oid)) + if (repo_get_oid(the_repository, arg, &oid)) return error(_("malformed object name '%s'"), arg); oid_array_append(opt->value, &oid); return 0; @@ -146,7 +146,7 @@ int parse_opt_object_id(const struct option *opt, const char *arg, int unset) } if (!arg) return -1; - if (get_oid(arg, &oid)) + if (repo_get_oid(the_repository, arg, &oid)) return error(_("malformed object name '%s'"), arg); *target = oid; return 0; -- cgit v1.2.3