refs: remove dead for_each_*_submodule()
These are used in revision.c. After the last patch they are replaced with the refs_ version. Delete them. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2e2d4040bd
commit
419221c106
@ -32,11 +32,8 @@ Iteration functions
|
||||
|
||||
* `for_each_glob_ref_in()` the previous and `for_each_ref_in()` combined.
|
||||
|
||||
* `head_ref_submodule()`, `for_each_ref_submodule()`,
|
||||
`for_each_ref_in_submodule()`, `for_each_tag_ref_submodule()`,
|
||||
`for_each_branch_ref_submodule()`, `for_each_remote_ref_submodule()`
|
||||
do the same as the functions described above but for a specified
|
||||
submodule.
|
||||
* Use `refs_` API for accessing submodules. The submodule ref store could
|
||||
be obtained with `get_submodule_ref_store()`.
|
||||
|
||||
* `for_each_rawref()` can be used to learn about broken ref and symref.
|
||||
|
||||
|
33
refs.c
33
refs.c
@ -336,12 +336,6 @@ int for_each_tag_ref(each_ref_fn fn, void *cb_data)
|
||||
return refs_for_each_tag_ref(get_main_ref_store(), fn, cb_data);
|
||||
}
|
||||
|
||||
int for_each_tag_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_tag_ref(get_submodule_ref_store(submodule),
|
||||
fn, cb_data);
|
||||
}
|
||||
|
||||
int refs_for_each_branch_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_ref_in(refs, "refs/heads/", fn, cb_data);
|
||||
@ -352,12 +346,6 @@ int for_each_branch_ref(each_ref_fn fn, void *cb_data)
|
||||
return refs_for_each_branch_ref(get_main_ref_store(), fn, cb_data);
|
||||
}
|
||||
|
||||
int for_each_branch_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_branch_ref(get_submodule_ref_store(submodule),
|
||||
fn, cb_data);
|
||||
}
|
||||
|
||||
int refs_for_each_remote_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_ref_in(refs, "refs/remotes/", fn, cb_data);
|
||||
@ -1254,15 +1242,6 @@ int refs_head_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
struct ref_store *refs = get_submodule_ref_store(submodule);
|
||||
|
||||
if (!refs)
|
||||
return -1;
|
||||
return refs_head_ref(refs, fn, cb_data);
|
||||
}
|
||||
|
||||
int head_ref(each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_head_ref(get_main_ref_store(), fn, cb_data);
|
||||
@ -1323,11 +1302,6 @@ int for_each_ref(each_ref_fn fn, void *cb_data)
|
||||
return refs_for_each_ref(get_main_ref_store(), fn, cb_data);
|
||||
}
|
||||
|
||||
int for_each_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_ref(get_submodule_ref_store(submodule), fn, cb_data);
|
||||
}
|
||||
|
||||
int refs_for_each_ref_in(struct ref_store *refs, const char *prefix,
|
||||
each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
@ -1349,13 +1323,6 @@ int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data, unsig
|
||||
prefix, fn, 0, flag, cb_data);
|
||||
}
|
||||
|
||||
int for_each_ref_in_submodule(const char *submodule, const char *prefix,
|
||||
each_ref_fn fn, void *cb_data)
|
||||
{
|
||||
return refs_for_each_ref_in(get_submodule_ref_store(submodule),
|
||||
prefix, fn, cb_data);
|
||||
}
|
||||
|
||||
int refs_for_each_fullref_in(struct ref_store *refs, const char *prefix,
|
||||
each_ref_fn fn, void *cb_data,
|
||||
unsigned int broken)
|
||||
|
10
refs.h
10
refs.h
@ -304,16 +304,6 @@ int for_each_glob_ref(each_ref_fn fn, const char *pattern, void *cb_data);
|
||||
int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
|
||||
const char *prefix, void *cb_data);
|
||||
|
||||
int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
|
||||
int for_each_ref_submodule(const char *submodule,
|
||||
each_ref_fn fn, void *cb_data);
|
||||
int for_each_ref_in_submodule(const char *submodule, const char *prefix,
|
||||
each_ref_fn fn, void *cb_data);
|
||||
int for_each_tag_ref_submodule(const char *submodule,
|
||||
each_ref_fn fn, void *cb_data);
|
||||
int for_each_branch_ref_submodule(const char *submodule,
|
||||
each_ref_fn fn, void *cb_data);
|
||||
|
||||
int head_ref_namespaced(each_ref_fn fn, void *cb_data);
|
||||
int for_each_namespaced_ref(each_ref_fn fn, void *cb_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user