From: Ronnie Sahlberg <sahlberg@xxxxxxxxxx> Signed-off-by: Ronnie Sahlberg <sahlberg@xxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- refs-be-files.c | 15 --------------- refs.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 14319cb..ffc3813 100644 --- a/refs-be-files.c +++ b/refs-be-files.c @@ -1939,21 +1939,6 @@ int for_each_replace_ref(each_ref_fn fn, void *cb_data) strlen(git_replace_ref_base), 0, cb_data); } -int head_ref_namespaced(each_ref_fn fn, void *cb_data) -{ - struct strbuf buf = STRBUF_INIT; - int ret = 0; - struct object_id oid; - int flag; - - strbuf_addf(&buf, "%sHEAD", get_git_namespace()); - if (!read_ref_full(buf.buf, RESOLVE_REF_READING, oid.hash, &flag)) - ret = fn(buf.buf, &oid, flag, cb_data); - strbuf_release(&buf); - - return ret; -} - int for_each_namespaced_ref(each_ref_fn fn, void *cb_data) { struct strbuf buf = STRBUF_INIT; diff --git a/refs.c b/refs.c index f7aa9b3..ae518a2 100644 --- a/refs.c +++ b/refs.c @@ -827,3 +827,18 @@ int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *c { return for_each_ref_in_submodule(submodule, "refs/remotes/", fn, cb_data); } + +int head_ref_namespaced(each_ref_fn fn, void *cb_data) +{ + struct strbuf buf = STRBUF_INIT; + int ret = 0; + struct object_id oid; + int flag; + + strbuf_addf(&buf, "%sHEAD", get_git_namespace()); + if (!read_ref_full(buf.buf, RESOLVE_REF_READING, oid.hash, &flag)) + ret = fn(buf.buf, &oid, flag, cb_data); + strbuf_release(&buf); + + return ret; +} -- 2.4.2.644.g97b850b-twtrsrc -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html