Drop extra_http_headers from git_remote
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 40adca0..444fe52 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -230,9 +230,6 @@ GIT_EXTERN(size_t) git_remote_refspec_count(const git_remote *remote);
*/
GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote, size_t n);
-GIT_EXTERN(int) git_remote_extra_http_headers(const git_remote *remote, git_strarray *extra_http_headers);
-GIT_EXTERN(int) git_remote_set_extra_http_headers(git_remote *remote, const git_strarray extra_http_headers);
-
/**
* Open a connection to a remote
*
diff --git a/src/netops.h b/src/netops.h
index ea10725..b7170a0 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -70,7 +70,6 @@ typedef struct gitno_connection_data {
char *user;
char *pass;
bool use_ssl;
- git_strarray *extra_headers;
} gitno_connection_data;
/*
diff --git a/src/remote.c b/src/remote.c
index b7d82e7..7404bf4 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1643,8 +1643,6 @@ void git_remote_free(git_remote *remote)
free_refspecs(&remote->passive_refspecs);
git_vector_free(&remote->passive_refspecs);
- git_strarray_free(&remote->extra_http_headers);
-
git_push_free(remote->push);
git__free(remote->url);
git__free(remote->pushurl);
@@ -2154,16 +2152,6 @@ size_t git_remote_refspec_count(const git_remote *remote)
return remote->refspecs.length;
}
-int git_remote_extra_http_headers(const git_remote *remote, git_strarray *extra_http_headers)
-{
- return git_strarray_copy(extra_http_headers, &remote->extra_http_headers);
-}
-
-int git_remote_set_extra_http_headers(git_remote *remote, const git_strarray extra_http_headers)
-{
- return git_strarray_copy(&remote->extra_http_headers, &extra_http_headers);
-}
-
const git_refspec *git_remote_get_refspec(const git_remote *remote, size_t n)
{
return git_vector_get(&remote->refspecs, n);
diff --git a/src/remote.h b/src/remote.h
index 3a15288..e696997 100644
--- a/src/remote.h
+++ b/src/remote.h
@@ -32,7 +32,6 @@ struct git_remote {
git_remote_autotag_option_t download_tags;
int prune_refs;
int passed_refspecs;
- git_strarray extra_http_headers;
};
const char* git_remote__urlfordirection(struct git_remote *remote, int direction);
diff --git a/src/transports/http.c b/src/transports/http.c
index 3cd5632..d348310 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -974,7 +974,6 @@ static int http_action(
if ((!t->connection_data.host || !t->connection_data.port || !t->connection_data.path) &&
(ret = gitno_connection_data_from_url(&t->connection_data, url, NULL)) < 0)
return ret;
- t->connection_data.extra_headers = &t->owner->owner->extra_http_headers;
if ((ret = http_connect(t)) < 0)
return ret;