diff options
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -20,9 +20,25 @@ struct ref_lock { typedef int each_ref_fn(const char *refname, const unsigned char *sha1, int flags, void *cb_data); extern int head_ref(each_ref_fn, void *); extern int for_each_ref(each_ref_fn, void *); +extern int for_each_ref_in(const char *, each_ref_fn, void *); extern int for_each_tag_ref(each_ref_fn, void *); extern int for_each_branch_ref(each_ref_fn, void *); extern int for_each_remote_ref(each_ref_fn, void *); +extern int for_each_replace_ref(each_ref_fn, void *); + +/* can be used to learn about broken ref and symref */ +extern int for_each_rawref(each_ref_fn, void *); + +extern void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname); + +/* + * Extra refs will be listed by for_each_ref() before any actual refs + * for the duration of this process or until clear_extra_refs() is + * called. Only extra refs added before for_each_ref() is called will + * be listed on a given call of for_each_ref(). + */ +extern void add_extra_ref(const char *refname, const unsigned char *sha1, int flags); +extern void clear_extra_refs(void); extern int peel_ref(const char *, unsigned char *); @@ -51,6 +67,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, @@ -64,6 +81,9 @@ extern int for_each_reflog(each_ref_fn, void *); #define CHECK_REF_FORMAT_WILDCARD (-3) extern int check_ref_format(const char *target); +extern const char *prettify_refname(const char *refname); +extern char *shorten_unambiguous_ref(const char *ref, int strict); + /** rename ref, return 0 on success **/ extern int rename_ref(const char *oldref, const char *newref, const char *logmsg); |