X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=refs.h;h=26255967013c7fa4086681bba7636efb4b0157ec;hb=567ffeb7722eefab3991cb894c96548b92b57cc2;hp=60cf48086f61c9206a343425ba9fdae3dce62937;hpb=5569bf9bbedd63a00780fc5c110e0cfab3aa97b9;p=git.git diff --git a/refs.h b/refs.h index 60cf4808..26255967 100644 --- a/refs.h +++ b/refs.h @@ -1,6 +1,13 @@ #ifndef REFS_H #define REFS_H +/* + * Calls the specified function for each ref file until it returns nonzero, + * and returns the value + */ +extern int head_ref(int (*fn)(const char *path, const unsigned char *sha1)); +extern int for_each_ref(int (*fn)(const char *path, const unsigned char *sha1)); + /** Reads the refs file specified into sha1 **/ extern int get_ref_sha1(const char *ref, unsigned char *sha1);