summaryrefslogtreecommitdiffstats
path: root/remote.h
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2007-09-11 05:02:56 +0200
committerJunio C Hamano <gitster@pobox.com>2007-09-19 12:22:30 +0200
commitcf818348f1ab577d2ecb5d11a00a1d4122435ece (patch)
tree3ae3e6be1bf441f106ee6e525051b13127319fdd /remote.h
parentAdd uploadpack configuration info to remote. (diff)
downloadgit-cf818348f1ab577d2ecb5d11a00a1d4122435ece.tar.xz
git-cf818348f1ab577d2ecb5d11a00a1d4122435ece.zip
Report information on branches from remote.h
This adds full parsing for branch.<name> 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 <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h18
1 files changed, 18 insertions, 0 deletions
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