cache.h: move remote/connect API out of it
[gitweb.git] / remote.c
index 6f57830b6401ead50011fda8362a4f85e87fcab4..b1ff7a208ff96a7ec634f48d9e51e35fb08d2174 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1302,6 +1302,14 @@ static void add_missing_tags(struct ref *src, struct ref **dst, struct ref ***ds
        free(sent_tips.tip);
 }
 
+struct ref *find_ref_by_name(const struct ref *list, const char *name)
+{
+       for ( ; list; list = list->next)
+               if (!strcmp(list->name, name))
+                       return (struct ref *)list;
+       return NULL;
+}
+
 /*
  * Given the set of refs the local repository has, the set of refs the
  * remote repository has, and the refspec used for push, determine