#include "parse-options.h"
#include "hashmap.h"
+#include "refspec.h"
enum {
REMOTE_UNCONFIGURED = 0,
int pushurl_nr;
int pushurl_alloc;
- const char **push_refspec;
- struct refspec *push;
- int push_refspec_nr;
- int push_refspec_alloc;
+ struct refspec push;
- const char **fetch_refspec;
- struct refspec *fetch;
- int fetch_refspec_nr;
- int fetch_refspec_alloc;
+ struct refspec fetch;
/*
* -1 to never fetch tags
*/
struct ref *ref_remove_duplicates(struct ref *ref_map);
-extern int query_refspecs(struct refspec *specs, int nr, struct refspec *query);
-char *apply_refspecs(struct refspec *refspecs, int nr_refspec,
+extern int query_refspecs(struct refspec_item *specs, int nr, struct refspec_item *query);
+char *apply_refspecs(struct refspec_item *refspecs, int nr_refspec,
const char *name);
int check_push_refs(struct ref *src, int nr_refspec, const char **refspec);
* missing_ok is usually false, but when we are adding branch.$name.merge
* it is Ok if the branch is not at the remote anymore.
*/
-int get_fetch_map(const struct ref *remote_refs, const struct refspec *refspec,
+int get_fetch_map(const struct ref *remote_refs, const struct refspec_item *refspec,
struct ref ***tail, int missing_ok);
struct ref *get_remote_ref(const struct ref *remote_refs, const char *name);
/*
* For the given remote, reads the refspec's src and sets the other fields.
*/
-int remote_find_tracking(struct remote *remote, struct refspec *refspec);
+int remote_find_tracking(struct remote *remote, struct refspec_item *refspec);
struct branch {
const char *name;
const char *pushremote_name;
const char **merge_name;
- struct refspec **merge;
+ struct refspec_item **merge;
int merge_nr;
int merge_alloc;
int all);
/* Return refs which no longer exist on remote */
-struct ref *get_stale_heads(struct refspec *refs, int ref_count, struct ref *fetch_map);
+struct ref *get_stale_heads(struct refspec_item *refs, int ref_count, struct ref *fetch_map);
/*
* Compare-and-swap
extern int is_empty_cas(const struct push_cas_option *);
void apply_push_cas(struct push_cas_option *, struct remote *, struct ref *);
-void add_prune_tags_to_fetch_refspec(struct remote *remote);
-
#endif