Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
make "find_ref_by_name" a public function
[gitweb.git]
/
refs.c
diff --git
a/refs.c
b/refs.c
index aff02cd09d4e40b04f6764a6f6ab43240b736a08..387c588c743704665756379d7ac1f0610752c0fb 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-1445,3
+1445,11
@@
int update_ref(const char *action, const char *refname,
}
return 0;
}
+
+struct ref *find_ref_by_name(struct ref *list, const char *name)
+{
+ for ( ; list; list = list->next)
+ if (!strcmp(list->name, name))
+ return list;
+ return NULL;
+}