Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/tag-list-multiple-patterns' into maint
[gitweb.git]
/
refs.c
diff --git
a/refs.c
b/refs.c
index b10419a69815ef1c005915f3606c992659e60c77..3a8789d3857d17a3a0a94ba2750e9f22857b8667 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-1826,6
+1826,12
@@
int update_ref(const char *action, const char *refname,
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)