Signed-off-by: Ronnie Sahlberg <[email protected]>
---
refs-be-files.c | 7 +++++--
refs.c | 10 ++++++++++
refs.h | 5 +++++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/refs-be-files.c b/refs-be-files.c
index b09f0fc..910663b 100644
--- a/refs-be-files.c
+++ b/refs-be-files.c
@@ -1603,12 +1603,13 @@ static int do_head_ref(const char *submodule,
each_ref_fn fn, void *cb_data)
return 0;
}
-int head_ref(each_ref_fn fn, void *cb_data)
+static int files_head_ref(each_ref_fn fn, void *cb_data)
{
return do_head_ref(NULL, fn, cb_data);
}
-int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
+static int files_head_ref_submodule(const char *submodule, each_ref_fn fn,
+ void *cb_data)
{
return do_head_ref(submodule, fn, cb_data);
}
@@ -3315,6 +3316,8 @@ struct ref_be refs_files = {
files_peel_ref,
files_create_symref,
files_resolve_gitlink_ref,
+ files_head_ref,
+ files_head_ref_submodule,
};
struct ref_be *refs = &refs_files;
diff --git a/refs.c b/refs.c
index 60b6241..841d905 100644
--- a/refs.c
+++ b/refs.c
@@ -921,3 +921,13 @@ int resolve_gitlink_ref(const char *path, const char
*refname,
{
return refs->resolve_gitlink_ref(path, refname, sha1);
}
+
+int head_ref(each_ref_fn fn, void *cb_data)
+{
+ return refs->head_ref(fn, cb_data);
+}
+
+int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
+{
+ return refs->head_ref_submodule(submodule, fn, cb_data);
+}
diff --git a/refs.h b/refs.h
index 5257437..92f8f44 100644
--- a/refs.h
+++ b/refs.h
@@ -394,6 +394,9 @@ typedef int (*create_symref_fn)(const char *ref_target,
const char *logmsg);
typedef int (*resolve_gitlink_ref_fn)(const char *path, const char *refname,
unsigned char *sha1);
+typedef int (*head_ref_fn)(each_ref_fn fn, void *cb_data);
+typedef int (*head_ref_submodule_fn)(const char *submodule, each_ref_fn fn,
+ void *cb_data);
struct ref_be {
transaction_begin_fn transaction_begin;
@@ -415,6 +418,8 @@ struct ref_be {
peel_ref_fn peel_ref;
create_symref_fn create_symref;
resolve_gitlink_ref_fn resolve_gitlink_ref;
+ head_ref_fn head_ref;
+ head_ref_submodule_fn head_ref_submodule;
};
extern struct ref_be *refs;
--
2.0.1.552.g1af257a
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html