aboutsummaryrefslogtreecommitdiffstats
path: root/remote.h
diff options
context:
space:
mode:
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/remote.h b/remote.h
index 3a7377ff96..b901b56746 100644
--- a/remote.h
+++ b/remote.h
@@ -1,9 +1,10 @@
#ifndef REMOTE_H
#define REMOTE_H
-#include "hash-ll.h"
+#include "hash.h"
#include "hashmap.h"
#include "refspec.h"
+#include "strvec.h"
struct option;
struct transport_ls_refs_options;
@@ -46,7 +47,7 @@ struct remote_state {
struct hashmap branches_hash;
struct branch *current_branch;
- const char *pushremote_name;
+ char *pushremote_name;
struct rewrites rewrites;
struct rewrites rewrites_push;
@@ -65,19 +66,12 @@ struct remote {
int origin, configured_in_repo;
- const char *foreign_vcs;
+ char *foreign_vcs;
/* An array of all of the url_nr URLs configured for the remote */
- const char **url;
-
- int url_nr;
- int url_alloc;
-
+ struct strvec url;
/* An array of all of the pushurl_nr push URLs configured for the remote */
- const char **pushurl;
-
- int pushurl_nr;
- int pushurl_alloc;
+ struct strvec pushurl;
struct refspec push;
@@ -118,6 +112,7 @@ struct remote {
* and configuration.
*/
struct remote *remote_get(const char *name);
+struct remote *remote_get_early(const char *name);
struct remote *pushremote_get(const char *name);
int remote_is_configured(struct remote *remote, int in_repo);
@@ -128,6 +123,7 @@ typedef int each_remote_fn(struct remote *remote, void *priv);
int for_each_remote(each_remote_fn fn, void *priv);
int remote_has_url(struct remote *remote, const char *url);
+struct strvec *push_url_of_remote(struct remote *remote);
struct ref_push_report {
const char *ref_name;
@@ -199,7 +195,7 @@ struct ref {
};
#define REF_NORMAL (1u << 0)
-#define REF_HEADS (1u << 1)
+#define REF_BRANCHES (1u << 1)
#define REF_TAGS (1u << 2)
struct ref *find_ref_by_name(const struct ref *list, const char *name);
@@ -308,9 +304,9 @@ struct branch {
const char *refname;
/* The name of the remote listed in the configuration. */
- const char *remote_name;
+ char *remote_name;
- const char *pushremote_name;
+ char *pushremote_name;
/* An array of the "merge" lines in the configuration. */
const char **merge_name;