refs: new public ref function: safe_create_reflog
[gitweb.git] / refs.h
diff --git a/refs.h b/refs.h
index cf642e6ddc438be77d64797a4dbcf790262a9fed..de68a452b7dba10b301518843ece54d2cee88020 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -67,7 +67,7 @@ struct ref_transaction;
  * 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);
 
 /*
  * The following functions invoke the specified callback function for
@@ -189,9 +189,9 @@ extern int peel_ref(const char *refname, unsigned char *sha1);
 #define REF_NODEREF    0x01
 
 /*
- * Setup reflog before using. Set errno to something meaningful on failure.
+ * Setup reflog before using. Fill in err and return -1 on failure.
  */
-int log_ref_setup(const char *refname, char *logfile, int bufsize);
+int safe_create_reflog(const char *refname, int force_create, struct strbuf *err);
 
 /** Reads log for the value of ref during at_time. **/
 extern int read_ref_at(const char *refname, unsigned int flags,