Don't dereference a strdup-returned NULL
[git/kirr.git] / remote.h
blob01dbcef67048d2fe068a2ab348013cc3055b5195
1 #ifndef REMOTE_H
2 #define REMOTE_H
4 struct remote {
5 const char *name;
7 const char **uri;
8 int uri_nr;
10 const char **push_refspec;
11 struct refspec *push;
12 int push_refspec_nr;
14 const char **fetch_refspec;
15 struct refspec *fetch;
16 int fetch_refspec_nr;
18 const char *receivepack;
21 struct remote *remote_get(const char *name);
23 int remote_has_uri(struct remote *remote, const char *uri);
25 struct refspec {
26 unsigned force : 1;
27 unsigned pattern : 1;
29 const char *src;
30 char *dst;
33 int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
34 int nr_refspec, char **refspec, int all);
37 * For the given remote, reads the refspec's src and sets the other fields.
39 int remote_find_tracking(struct remote *remote, struct refspec *refspec);
41 #endif