From f1da24ca5eeecf8931ffc08b4c8251c689c94a47 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Sat, 16 Oct 2021 11:39:27 +0200 Subject: refs API: post-migration API renaming [2/2] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename the transitory refs_werrres_ref_unsafe() function to refs_resolve_ref_unsafe(), now that all callers of the old function have learned to pass in a "failure_errno" parameter. The coccinelle semantic patch added in the preceding commit works, but I couldn't figure out how to get spatch(1) to re-flow these argument lists (and sometimes make lines way too long), so this rename was done with: perl -pi -e 's/refs_werrres_ref_unsafe/refs_resolve_ref_unsafe/g' \ $(git grep -l refs_werrres_ref_unsafe -- '*.c') But after that "make contrib/coccinelle/refs.cocci.patch" comes up empty, so the result would have been the same. Let's remove that transitory semantic patch file, we won't need to retain it for any other in-flight changes, refs_werrres_ref_unsafe() only existed within this patch series. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- worktree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worktree.c') diff --git a/worktree.c b/worktree.c index 7d7cf05815..2c155b1015 100644 --- a/worktree.c +++ b/worktree.c @@ -30,7 +30,7 @@ static void add_head_info(struct worktree *wt) const char *target; int ignore_errno; - target = refs_werrres_ref_unsafe(get_worktree_ref_store(wt), + target = refs_resolve_ref_unsafe(get_worktree_ref_store(wt), "HEAD", 0, &wt->head_oid, &flags, @@ -437,7 +437,7 @@ const struct worktree *find_shared_symref(const char *symref, } refs = get_worktree_ref_store(wt); - symref_target = refs_werrres_ref_unsafe(refs, symref, 0, + symref_target = refs_resolve_ref_unsafe(refs, symref, 0, NULL, &flags, &ignore_errno); if ((flags & REF_ISSYMREF) && @@ -574,7 +574,7 @@ int other_head_refs(each_ref_fn fn, void *cb_data) strbuf_reset(&refname); strbuf_worktree_ref(wt, &refname, "HEAD"); - if (refs_werrres_ref_unsafe(get_main_ref_store(the_repository), + if (refs_resolve_ref_unsafe(get_main_ref_store(the_repository), refname.buf, RESOLVE_REF_READING, &oid, &flag, &ignore_errno)) -- cgit v1.3