diff options
author | Erick Mattos <erick.mattos@gmail.com> | 2010-05-21 21:28:36 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-02 11:17:46 -0700 |
commit | 859c30175f7d8f64f61968cb3ece7aca9218b314 (patch) | |
tree | 09c38d76cb9cd4593987353c528ac4168cec66d0 /refs.h | |
parent | feb98d134289527eeb9d1fd11d8c284819a0aa1d (diff) | |
download | git-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |