aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 60cf48086..7565decb0 100644
--- a/refs.h
+++ b/refs.h
@@ -1,6 +1,12 @@
#ifndef REFS_H
#define REFS_H
+/*
+ * Calls the specified function for each ref file until it returns nonzero,
+ * and returns the value
+ */
+extern int for_each_ref(int (*fn)(const char *path, unsigned char *sha1));
+
/** Reads the refs file specified into sha1 **/
extern int get_ref_sha1(const char *ref, unsigned char *sha1);