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 --- reset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reset.c') diff --git a/reset.c b/reset.c index 5ded23611f..3a9c6dfdd0 100644 --- a/reset.c +++ b/reset.c @@ -38,7 +38,7 @@ static int update_refs(const struct reset_head_opts *opts, prefix_len = msg.len; if (update_orig_head) { - if (!get_oid("ORIG_HEAD", &oid_old_orig)) + if (!repo_get_oid(the_repository, "ORIG_HEAD", &oid_old_orig)) old_orig = &oid_old_orig; if (head) { if (!reflog_orig_head) { @@ -106,7 +106,7 @@ int reset_head(struct repository *r, const struct reset_head_opts *opts) goto leave_reset_head; } - if (!get_oid("HEAD", &head_oid)) { + if (!repo_get_oid(the_repository, "HEAD", &head_oid)) { head = &head_oid; } else if (!oid || !reset_hard) { ret = error(_("could not determine HEAD revision")); -- cgit v1.2.3