10 const char **push_refspec
;
14 const char **fetch_refspec
;
15 struct refspec
*fetch
;
19 * -1 to never fetch tags
20 * 0 to auto-follow tags on heuristic (default)
21 * 1 to always auto-follow tags
22 * 2 to always fetch tags
26 const char *receivepack
;
27 const char *uploadpack
;
30 * for curl remotes only
35 struct remote
*remote_get(const char *name
);
37 typedef int each_remote_fn(struct remote
*remote
, void *priv
);
38 int for_each_remote(each_remote_fn fn
, void *priv
);
40 int remote_has_url(struct remote
*remote
, const char *url
);
50 struct ref
*alloc_ref(unsigned namelen
);
52 struct ref
*copy_ref_list(const struct ref
*ref
);
54 int check_ref_type(const struct ref
*ref
, int flags
);
57 * Frees the entire list and peers of elements.
59 void free_refs(struct ref
*ref
);
62 * Removes and frees any duplicate refs in the map.
64 void ref_remove_duplicates(struct ref
*ref_map
);
66 struct refspec
*parse_ref_spec(int nr_refspec
, const char **refspec
);
68 int match_refs(struct ref
*src
, struct ref
*dst
, struct ref
***dst_tail
,
69 int nr_refspec
, const char **refspec
, int all
);
72 * Given a list of the remote refs and the specification of things to
73 * fetch, makes a (separate) list of the refs to fetch and the local
76 * *tail is the pointer to the tail pointer of the list of results
77 * beforehand, and will be set to the tail pointer of the list of
80 * missing_ok is usually false, but when we are adding branch.$name.merge
81 * it is Ok if the branch is not at the remote anymore.
83 int get_fetch_map(const struct ref
*remote_refs
, const struct refspec
*refspec
,
84 struct ref
***tail
, int missing_ok
);
86 struct ref
*get_remote_ref(const struct ref
*remote_refs
, const char *name
);
89 * For the given remote, reads the refspec's src and sets the other fields.
91 int remote_find_tracking(struct remote
*remote
, struct refspec
*refspec
);
97 const char *remote_name
;
98 struct remote
*remote
;
100 const char **merge_name
;
101 struct refspec
**merge
;
105 struct branch
*branch_get(const char *name
);
107 int branch_has_merge_config(struct branch
*branch
);
108 int branch_merge_matches(struct branch
*, int n
, const char *);
110 /* Flags to match_refs. */
111 enum match_refs_flags
{
113 MATCH_REFS_ALL
= (1 << 0),
114 MATCH_REFS_MIRROR
= (1 << 1),