[PATCH v3 54/56] each_ref_fn_adapter(): remove adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Haggerty <mhagger@xxxxxxxxxxxx>

All of the callers of the for_each_ref family of functions have now
been rewritten to work with object_ids, so this adapter is no longer
needed.

Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx>
Signed-off-by: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx>
---
 refs.c |  8 --------
 refs.h | 11 -----------
 2 files changed, 19 deletions(-)

diff --git a/refs.c b/refs.c
index 43dce01..162760c 100644
--- a/refs.c
+++ b/refs.c
@@ -2176,14 +2176,6 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
 			       DO_FOR_EACH_INCLUDE_BROKEN, cb_data);
 }
 
-int each_ref_fn_adapter(const char *refname,
-			const struct object_id *oid, int flags, void *cb_data)
-{
-	struct each_ref_fn_sha1_adapter *cb = cb_data;
-
-	return cb->original_fn(refname, oid->hash, flags, cb->original_cb_data);
-}
-
 const char *prettify_refname(const char *name)
 {
 	return name + (
diff --git a/refs.h b/refs.h
index 4042109..8c3d433 100644
--- a/refs.h
+++ b/refs.h
@@ -69,17 +69,6 @@ struct ref_transaction;
 typedef int each_ref_fn(const char *refname,
 			const struct object_id *oid, int flags, void *cb_data);
 
-typedef int each_ref_sha1_fn(const char *refname,
-			     const unsigned char *sha1, int flags, void *cb_data);
-
-struct each_ref_fn_sha1_adapter {
-	each_ref_sha1_fn *original_fn;
-	void *original_cb_data;
-};
-
-extern int each_ref_fn_adapter(const char *refname,
-			       const struct object_id *oid, int flags, void *cb_data);
-
 /*
  * The following functions invoke the specified callback function for
  * each reference indicated.  If the function ever returns a nonzero
-- 
2.4.0

--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]