diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-27 10:59:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-27 10:59:27 -0700 |
commit | 4e87565d2a3e315b7afc39e9e1fe98c5607a1b11 (patch) | |
tree | 6f268f4c98d8c9a06536a5a2fbea5ee9a7df83fc /remote-curl.c | |
parent | 4a2b50a1e3667ee40bf08726fb249b634e9df1b6 (diff) | |
parent | 511155db51ff9870d2b3fd74c6dfdd558b5fa37b (diff) | |
download | git-4e87565d2a3e315b7afc39e9e1fe98c5607a1b11.tar.gz |
Merge branch 'sb/push-options-via-transport'
Recently we started passing the "--push-options" through the
external remote helper interface; now the "smart HTTP" remote
helper understands what to do with the passed information.
* sb/push-options-via-transport:
remote-curl: allow push options
send-pack: send push options correctly in stateless-rpc case
Diffstat (limited to 'remote-curl.c')
-rw-r--r-- | remote-curl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c index 34a97e7328..e953d06f66 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -22,6 +22,7 @@ struct options { unsigned long depth; char *deepen_since; struct string_list deepen_not; + struct string_list push_options; unsigned progress : 1, check_self_contained_and_connected : 1, cloning : 1, @@ -139,6 +140,9 @@ static int set_option(const char *name, const char *value) else return -1; return 0; + } else if (!strcmp(name, "push-option")) { + string_list_append(&options.push_options, value); + return 0; #if LIBCURL_VERSION_NUM >= 0x070a08 } else if (!strcmp(name, "family")) { @@ -943,6 +947,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) argv_array_push(&args, "--quiet"); else if (options.verbosity > 1) argv_array_push(&args, "--verbose"); + for (i = 0; i < options.push_options.nr; i++) + argv_array_pushf(&args, "--push-option=%s", + options.push_options.items[i].string); argv_array_push(&args, options.progress ? "--progress" : "--no-progress"); for_each_string_list_item(cas_option, &cas_options) argv_array_push(&args, cas_option->string); @@ -1028,6 +1035,7 @@ int cmd_main(int argc, const char **argv) options.progress = !!isatty(2); options.thin = 1; string_list_init(&options.deepen_not, 1); + string_list_init(&options.push_options, 1); remote = remote_get(argv[1]); |