Signed-off-by: Ronnie Sahlberg <sahlb...@google.com>
---
 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 9aa88ef..e58a7e1 100644
--- a/refs-be-files.c
+++ b/refs-be-files.c
@@ -1635,21 +1635,6 @@ int for_each_replace_ref(each_ref_fn fn, void *cb_data)
        return do_for_each_ref(&ref_cache, "refs/replace/", fn, 13, 0, cb_data);
 }
 
-int head_ref_namespaced(each_ref_fn fn, void *cb_data)
-{
-       struct strbuf buf = STRBUF_INIT;
-       int ret = 0;
-       unsigned char sha1[20];
-       int flag;
-
-       strbuf_addf(&buf, "%sHEAD", get_git_namespace());
-       if (!read_ref_full(buf.buf, sha1, RESOLVE_REF_READING, &flag))
-               ret = fn(buf.buf, sha1, 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 964a513..6b434ad 100644
--- a/refs.c
+++ b/refs.c
@@ -786,3 +786,18 @@ int for_each_glob_ref(each_ref_fn fn, const char *pattern, 
void *cb_data)
 {
        return for_each_glob_ref_in(fn, pattern, NULL, cb_data);
 }
+
+int head_ref_namespaced(each_ref_fn fn, void *cb_data)
+{
+       struct strbuf buf = STRBUF_INIT;
+       int ret = 0;
+       unsigned char sha1[20];
+       int flag;
+
+       strbuf_addf(&buf, "%sHEAD", get_git_namespace());
+       if (!read_ref_full(buf.buf, sha1, RESOLVE_REF_READING, &flag))
+               ret = fn(buf.buf, sha1, flag, cb_data);
+       strbuf_release(&buf);
+
+       return ret;
+}
-- 
2.0.1.552.g1af257a

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to