From cf818348f1ab577d2ecb5d11a00a1d4122435ece Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Mon, 10 Sep 2007 23:02:56 -0400 Subject: Report information on branches from remote.h This adds full parsing for branch. sections and functions to interpret the results usefully. It incidentally corrects the fetch configuration information for legacy branches/* files with '#' characters in the URLs. Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- remote.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'remote.h') diff --git a/remote.h b/remote.h index 72c9153783..f21b6a6da1 100644 --- a/remote.h +++ b/remote.h @@ -49,4 +49,22 @@ int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail, */ int remote_find_tracking(struct remote *remote, struct refspec *refspec); +struct branch { + const char *name; + const char *refname; + + const char *remote_name; + struct remote *remote; + + const char **merge_name; + struct refspec **merge; + int merge_nr; +}; + +struct branch *branch_get(const char *name); + +int branch_has_merge_config(struct branch *branch); + +int branch_merges(struct branch *branch, const char *refname); + #endif -- cgit v1.3