From 859c30175f7d8f64f61968cb3ece7aca9218b314 Mon Sep 17 00:00:00 2001 From: Erick Mattos Date: Fri, 21 May 2010 21:28:36 -0300 Subject: refs: split log_ref_write logic into log_ref_setup Separation of the logic for testing and preparing the reflogs from function log_ref_write to a new non static new function: log_ref_setup. This allows to be performed from outside the first all reasonable checks and procedures for writing reflogs. Signed-off-by: Erick Mattos Signed-off-by: Junio C Hamano --- refs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 4a18b083f5..594c9d97fd 100644 --- a/refs.h +++ b/refs.h @@ -68,6 +68,9 @@ extern void unlock_ref(struct ref_lock *lock); /** Writes sha1 into the ref specified by the lock. **/ extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg); +/** Setup reflog before using. **/ +int log_ref_setup(const char *ref_name, char **log_file); + /** Reads log for the value of ref during at_time. **/ extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *sha1, char **msg, unsigned long *cutoff_time, int *cutoff_tz, int *cutoff_cnt); -- cgit v1.2.3