X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote.h;h=a46a5be131caf1d1d71f97cab3c3ba2cebb6386c;hb=763481787174adfcc247d6044bea330edcb2cc24;hp=8eed87ba5ab78eb4635632c21843590467d0d864;hpb=afce435000030e3ad076ef1dd413e0fa314cdcbb;p=git.git diff --git a/remote.h b/remote.h index 8eed87ba5..a46a5be13 100644 --- a/remote.h +++ b/remote.h @@ -1,8 +1,15 @@ #ifndef REMOTE_H #define REMOTE_H +enum { + REMOTE_CONFIG, + REMOTE_REMOTES, + REMOTE_BRANCHES +}; + struct remote { const char *name; + int origin; const char **url; int url_nr; @@ -55,9 +62,7 @@ struct refspec { extern const struct refspec *tag_refspec; -struct ref *alloc_ref(unsigned namelen); - -struct ref *alloc_ref_from_str(const char* str); +struct ref *alloc_ref(const char *name); struct ref *copy_ref_list(const struct ref *ref); @@ -77,7 +82,6 @@ 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); -struct refspec *parse_push_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); @@ -129,4 +133,8 @@ enum match_refs_flags { MATCH_REFS_MIRROR = (1 << 1), }; +/* Reporting of tracking info */ +int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs); +int format_tracking_info(struct branch *branch, struct strbuf *sb); + #endif