path: root/refs.h
diff options
authorThomas Rast <>2010-06-10 12:54:03 (GMT)
committerJunio C Hamano <>2010-06-12 16:34:17 (GMT)
commit157aaea5fff7dbf2fc39829d827b35df647562a4 (patch)
tree71edb7de89dc8740a4e00ad1d758a4abb9b6a1e3 /refs.h
parent86e8e7a566c5546e58f56566d0181a08d60f919f (diff)
log_ref_setup: don't return stack-allocated array
859c301 (refs: split log_ref_write logic into log_ref_setup, 2010-05-21) refactors the stack allocation of the log_file array into the new log_ref_setup() function, but passes it back to the caller. Since the original intent seems to have been to split the work between log_ref_setup and log_ref_write, make it the caller's responsibility to allocate the buffer. Signed-off-by: Thomas Rast <> Reported-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 594c9d9..762ce50 100644
--- a/refs.h
+++ b/refs.h
@@ -69,7 +69,7 @@ extern void unlock_ref(struct ref_lock *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);
+int log_ref_setup(const char *ref_name, char *logfile, int bufsize);
/** 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);