Code

Merge branch 'jc/advise-i18n' into maint-1.7.8
[git.git] / remote.h
index 99706a89bc6011c01fcd661d8bad4b26f59b0ca7..b3955983ba5caea698a78868abcbb54451b6daa8 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -11,10 +11,16 @@ struct remote {
        const char *name;
        int origin;
 
+       const char *foreign_vcs;
+
        const char **url;
        int url_nr;
        int url_alloc;
 
+       const char **pushurl;
+       int pushurl_nr;
+       int pushurl_alloc;
+
        const char **push_refspec;
        struct refspec *push;
        int push_refspec_nr;
@@ -64,7 +70,7 @@ struct refspec {
 extern const struct refspec *tag_refspec;
 
 struct ref *alloc_ref(const char *name);
-
+struct ref *copy_ref(const struct ref *ref);
 struct ref *copy_ref_list(const struct ref *ref);
 
 int check_ref_type(const struct ref *ref, int flags);
@@ -85,8 +91,15 @@ void ref_remove_duplicates(struct ref *ref_map);
 int valid_fetch_refspec(const char *refspec);
 struct refspec *parse_fetch_refspec(int nr_refspec, const char **refspec);
 
-int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
-              int nr_refspec, const char **refspec, int all);
+void free_refspec(int nr_refspec, struct refspec *refspec);
+
+char *apply_refspecs(struct refspec *refspecs, int nr_refspec,
+                    const char *name);
+
+int match_push_refs(struct ref *src, struct ref **dst,
+                   int nr_refspec, const char **refspec, int all);
+void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
+       int force_update);
 
 /*
  * Given a list of the remote refs and the specification of things to
@@ -132,7 +145,7 @@ int branch_merge_matches(struct branch *, int n, const char *);
 enum match_refs_flags {
        MATCH_REFS_NONE         = 0,
        MATCH_REFS_ALL          = (1 << 0),
-       MATCH_REFS_MIRROR       = (1 << 1),
+       MATCH_REFS_MIRROR       = (1 << 1)
 };
 
 /* Reporting of tracking info */
@@ -150,4 +163,7 @@ struct ref *guess_remote_head(const struct ref *head,
                              const struct ref *refs,
                              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);
+
 #endif