Skip to contentSkip to conversation

refs: reduce the visibility of do_for_each_ref()

PATCH In review Ramsay Jones 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 refs: reduce the visibility of do_for_each_ref()

---

Hi David,

Again, If you need to re-roll your 'dt/refs-backend-lmdb' branch ...

Thanks!

ATB,
Ramsay Jones

 refs.c               | 16 ++++++++--------
 refs/refs-internal.h |  6 ------
 2 files changed, 8 insertions(+), 14 deletions(-)
refs.c +8 -8
index 337f110..bf70876 100644
@@ -1236,6 +1236,14 @@ static int get_affected_refnames(struct ref_transaction *transaction,
 	return 0;
 }
 
+static int do_for_each_ref(const char *submodule, const char *base,
+			   each_ref_fn fn, int trim, int flags,
+			   void *cb_data)
+{
+	return the_refs_backend->do_for_each_ref(submodule, base, fn, trim,
+						 flags, cb_data);
+}
+
 int for_each_ref(each_ref_fn fn, void *cb_data)
 {
 	return do_for_each_ref(NULL, "", fn, 0, 0, cb_data);
@@ -1501,14 +1509,6 @@ int resolve_gitlink_ref(const char *path, const char *refname,
 	return the_refs_backend->resolve_gitlink_ref(path, refname, sha1);
 }
 
-int do_for_each_ref(const char *submodule, const char *base,
-		    each_ref_fn fn, int trim, int flags,
-		    void *cb_data)
-{
-	return the_refs_backend->do_for_each_ref(submodule, base, fn, trim,
-						 flags, cb_data);
-}
-
 int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn,
 				void *cb_data)
 {
refs/refs-internal.h +0 -6
index ced6af4..4922e25 100644
@@ -227,12 +227,6 @@ int do_for_each_per_worktree_ref(const char *submodule, const char *base,
 				 each_ref_fn fn, int trim, int flags,
 				 void *cb_data);
 
-/*
- * The common backend for the for_each_*ref* functions
- */
-int do_for_each_ref(const char *submodule, const char *base,
-		    each_ref_fn fn, int trim, int flags, void *cb_data);
-
 /* refs backends */
 typedef int ref_init_db_fn(int shared, struct strbuf *err);
 typedef int ref_transaction_commit_fn(struct ref_transaction *transaction,
Signature · 1 line
2.7.0
#1 lore raw

Got it, thanks.

Quoted 77 lines · Ramsay Jones

---

Hi David,

Again, If you need to re-roll your 'dt/refs-backend-lmdb' branch ...

Thanks!

ATB,
Ramsay Jones

 refs.c               | 16 ++++++++--------
 refs/refs-internal.h |  6 ------
 2 files changed, 8 insertions(+), 14 deletions(-)
refs.c +8 -0
index 337f110..bf70876 100644
@@ -1236,6 +1236,14 @@ static int get_affected_refnames(struct
 ref_transaction *transaction,
 	return 0;
 }
 
+static int do_for_each_ref(const char *submodule, const char *base,
+			   each_ref_fn fn, int trim, int flags,
+			   void *cb_data)
+{
+	return the_refs_backend->do_for_each_ref(submodule, base,
 fn, trim,
+						 flags, cb_data);
+}
+
 int for_each_ref(each_ref_fn fn, void *cb_data)

{

refs.c +0 -8
 	return do_for_each_ref(NULL, "", fn, 0, 0, cb_data);
@@ -1501,14 +1509,6 @@ int resolve_gitlink_ref(const char *path,
 const char *refname,
 	return the_refs_backend->resolve_gitlink_ref(path, refname,
 sha1);
 }
 
-int do_for_each_ref(const char *submodule, const char *base,
-		    each_ref_fn fn, int trim, int flags,
-		    void *cb_data)
-{
-	return the_refs_backend->do_for_each_ref(submodule, base,
 fn, trim,
-						 flags, cb_data);
-}
-

int for_each_reflog_ent_reverse(const char *refname,
each_reflog_ent_fn fn,

refs.c +0 -0
 				void *cb_data)
 {
refs/refs-internal.h +0 -6
index ced6af4..4922e25 100644
@@ -227,12 +227,6 @@ int do_for_each_per_worktree_ref(const char
 *submodule, const char *base,
 				 each_ref_fn fn, int trim, int
 flags,
 				 void *cb_data);
 
-/*
- * The common backend for the for_each_*ref* functions
- */
-int do_for_each_ref(const char *submodule, const char *base,
-		    each_ref_fn fn, int trim, int flags, void
 *cb_data);
-

/* refs backends */
typedef int ref_init_db_fn(int shared, struct strbuf *err); typedef int ref_transaction_commit_fn(struct ref_transaction
*transaction,