Skip to content

Commit 0a0c953

Browse files
mhaggergitster
authored andcommitted
each_ref_fn_adapter(): remove adapter
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 <[email protected]> Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c38cd1c commit 0a0c953

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

refs.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,14 +2176,6 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
21762176
DO_FOR_EACH_INCLUDE_BROKEN, cb_data);
21772177
}
21782178

2179-
int each_ref_fn_adapter(const char *refname,
2180-
const struct object_id *oid, int flags, void *cb_data)
2181-
{
2182-
struct each_ref_fn_sha1_adapter *cb = cb_data;
2183-
2184-
return cb->original_fn(refname, oid->hash, flags, cb->original_cb_data);
2185-
}
2186-
21872179
const char *prettify_refname(const char *name)
21882180
{
21892181
return name + (

refs.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,6 @@ struct ref_transaction;
6969
typedef int each_ref_fn(const char *refname,
7070
const struct object_id *oid, int flags, void *cb_data);
7171

72-
typedef int each_ref_sha1_fn(const char *refname,
73-
const unsigned char *sha1, int flags, void *cb_data);
74-
75-
struct each_ref_fn_sha1_adapter {
76-
each_ref_sha1_fn *original_fn;
77-
void *original_cb_data;
78-
};
79-
80-
extern int each_ref_fn_adapter(const char *refname,
81-
const struct object_id *oid, int flags, void *cb_data);
82-
8372
/*
8473
* The following functions invoke the specified callback function for
8574
* each reference indicated. If the function ever returns a nonzero

0 commit comments

Comments
 (0)