summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorErick Mattos <erick.mattos@gmail.com>2010-05-21 21:28:36 -0300
committerJunio C Hamano <gitster@pobox.com>2010-06-02 11:17:46 -0700
commit859c30175f7d8f64f61968cb3ece7aca9218b314 (patch)
tree09c38d76cb9cd4593987353c528ac4168cec66d0 /refs.h
parentfeb98d134289527eeb9d1fd11d8c284819a0aa1d (diff)
downloadgit-859c30175f7d8f64f61968cb3ece7aca9218b314.tar.gz
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 <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h3
1 files changed, 3 insertions, 0 deletions
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);