index b10419a69815ef1c005915f3606c992659e60c77..3a8789d3857d17a3a0a94ba2750e9f22857b8667 100644 (file)
--- a/refs.c
+++ b/refs.c
return 0;
}
return 0;
}
+int ref_exists(char *refname)
+{
+ unsigned char sha1[20];
+ return !!resolve_ref(refname, sha1, 1, NULL);
+}
+
struct ref *find_ref_by_name(const struct ref *list, const char *name)
{
for ( ; list; list = list->next)
struct ref *find_ref_by_name(const struct ref *list, const char *name)
{
for ( ; list; list = list->next)