summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f8a15c)
raw | patch | inline | side by side (parent: 9f8a15c)
author | Jeff King <peff@peff.net> | |
Sun, 18 Nov 2007 07:13:10 +0000 (02:13 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Nov 2007 10:34:34 +0000 (02:34 -0800) |
This was a static in remote.c, but is generally useful.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | patch | blob | history | |
refs.c | patch | blob | history | |
remote.c | patch | blob | history |
index 6ccb76422961d900094792f418d6309ffd9bc4e8..8d601dd6f79d75b8c3b8ac65a56f73cf9b20cedf 100644 (file)
--- a/cache.h
+++ b/cache.h
#define REF_HEADS (1u << 1)
#define REF_TAGS (1u << 2)
+extern struct ref *find_ref_by_name(struct ref *list, const char *name);
+
#define CONNECT_VERBOSE (1u << 0)
extern struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
extern int finish_connect(struct child_process *conn);
index aff02cd09d4e40b04f6764a6f6ab43240b736a08..387c588c743704665756379d7ac1f0610752c0fb 100644 (file)
--- a/refs.c
+++ b/refs.c
}
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;
+}
diff --git a/remote.c b/remote.c
index 09b7aad525e5916ea46d35b6ea253f716b2a2d85..bb010590837fd6ea188e64c5263bb1fe12ab93f4 100644 (file)
--- a/remote.c
+++ b/remote.c
return -errs;
}
-static 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;
-}
-
static const struct refspec *check_pattern_match(const struct refspec *rs,
int rs_nr,
const struct ref *src)