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 d04a9d2..18c849c 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 c7778d1..61d71d5 100644 --- a/refs.c +++ b/refs.c @@ -826,3 +826,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.658.g6d8523e-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