summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2007-09-11 03:02:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-19 10:22:30 (GMT)
commitcf818348f1ab577d2ecb5d11a00a1d4122435ece (patch)
tree3ae3e6be1bf441f106ee6e525051b13127319fdd /remote.h
parent0012ba2108aa42947dedf19f3db2de73a67cc4f5 (diff)
downloadgit-cf818348f1ab577d2ecb5d11a00a1d4122435ece.zip
git-cf818348f1ab577d2ecb5d11a00a1d4122435ece.tar.gz
git-cf818348f1ab577d2ecb5d11a00a1d4122435ece.tar.bz2
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 72c9153..f21b6a6 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