Pull extra_http_headers from the git_remote

This commit is contained in:
Matt Burke 2015-09-04 09:20:45 -04:00
parent 6af6e69009
commit ac9b512789
3 changed files with 4 additions and 0 deletions

View File

@ -1643,6 +1643,8 @@ void git_remote_free(git_remote *remote)
free_refspecs(&remote->passive_refspecs); free_refspecs(&remote->passive_refspecs);
git_vector_free(&remote->passive_refspecs); git_vector_free(&remote->passive_refspecs);
git__free(remote->extra_http_headers);
git_push_free(remote->push); git_push_free(remote->push);
git__free(remote->url); git__free(remote->url);
git__free(remote->pushurl); git__free(remote->pushurl);

View File

@ -32,6 +32,7 @@ struct git_remote {
git_remote_autotag_option_t download_tags; git_remote_autotag_option_t download_tags;
int prune_refs; int prune_refs;
int passed_refspecs; int passed_refspecs;
git_strarray *extra_http_headers;
}; };
const char* git_remote__urlfordirection(struct git_remote *remote, int direction); const char* git_remote__urlfordirection(struct git_remote *remote, int direction);

View File

@ -974,6 +974,7 @@ static int http_action(
if ((!t->connection_data.host || !t->connection_data.port || !t->connection_data.path) && 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) (ret = gitno_connection_data_from_url(&t->connection_data, url, NULL)) < 0)
return ret; return ret;
t->connection_data.extra_headers = t->owner->owner->extra_http_headers;
if ((ret = http_connect(t)) < 0) if ((ret = http_connect(t)) < 0)
return ret; return ret;