From 12cb1c10a64170a5d600dd1c6c8abfeec105fb6b 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:54 +0200 Subject: cocci: apply the "refs.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 "refs.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- archive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archive.c') diff --git a/archive.c b/archive.c index d43687a5c4..716a18567b 100644 --- a/archive.c +++ b/archive.c @@ -456,10 +456,11 @@ static void parse_treeish_arg(const char **argv, const char *colon = strchrnul(name, ':'); int refnamelen = colon - name; - if (!dwim_ref(name, refnamelen, &oid, &ref, 0)) + if (!repo_dwim_ref(the_repository, name, refnamelen, &oid, &ref, 0)) die(_("no such ref: %.*s"), refnamelen, name); } else { - dwim_ref(name, strlen(name), &oid, &ref, 0); + repo_dwim_ref(the_repository, name, strlen(name), &oid, &ref, + 0); } if (repo_get_oid(the_repository, name, &oid)) -- cgit v1.2.3