mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
refs API: post-migration API renaming [2/2]
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
25a33b3342
commit
f1da24ca5e
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user