summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-19 22:18:29 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-19 22:18:29 -0800
commit101d15e09712a0183db99d228d975c62970654cf (patch)
tree794021ad7ade07c4835ec9c356930c637da26df7 /refs.h
parent39765e5941d36f74cec4764d315da0ba5743547c (diff)
downloadgit-101d15e09712a0183db99d228d975c62970654cf.tar.gz
Introduce for_each_recent_reflog_ent().
This can be used to scan only the last few kilobytes of a reflog, as a cheap optimization when the data you are looking for is likely to be found near the end of it. The caller is expected to fall back to the full scan if that is not the case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 06ad260556..3bb529d387 100644
--- a/refs.h
+++ b/refs.h
@@ -60,6 +60,7 @@ extern int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned
/* iterate over reflog entries */
typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, const char *, unsigned long, int, const char *, void *);
int for_each_reflog_ent(const char *ref, each_reflog_ent_fn fn, void *cb_data);
+int for_each_recent_reflog_ent(const char *ref, each_reflog_ent_fn fn, long, void *cb_data);
/*
* Calls the specified function for each reflog file until it returns nonzero,