* single callback invocation.
*/
typedef int each_ref_fn(const char *refname,
- const unsigned char *sha1, int flags, void *cb_data);
+ 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
/*
* Setup reflog before using. Set errno to something meaningful on failure.
*/
-int log_ref_setup(const char *refname, char *logfile, int bufsize);
+int log_ref_setup(const char *refname, struct strbuf *logfile);
/** Reads log for the value of ref during at_time. **/
extern int read_ref_at(const char *refname, unsigned int flags,