summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 6918668dc2..b5ebe01800 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -6,6 +6,7 @@
#include "exec_cmd.h"
#include "run-command.h"
#include "pkt-line.h"
+#include "string-list.h"
#include "sideband.h"
#include "argv-array.h"
@@ -22,6 +23,7 @@ struct options {
thin : 1;
};
static struct options options;
+static struct string_list cas_options = STRING_LIST_INIT_DUP;
static int set_option(const char *name, const char *value)
{
@@ -77,6 +79,13 @@ static int set_option(const char *name, const char *value)
return -1;
return 0;
}
+ else if (!strcmp(name, "cas")) {
+ struct strbuf val = STRBUF_INIT;
+ strbuf_addf(&val, "--" CAS_OPT_NAME "=%s", value);
+ string_list_append(&cas_options, val.buf);
+ strbuf_release(&val);
+ return 0;
+ }
else {
return 1 /* unsupported */;
}
@@ -802,6 +811,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
struct rpc_state rpc;
int i, err;
struct argv_array args;
+ struct string_list_item *cas_option;
argv_array_init(&args);
argv_array_pushl(&args, "send-pack", "--stateless-rpc", "--helper-status",
@@ -816,6 +826,8 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
else if (options.verbosity > 1)
argv_array_push(&args, "--verbose");
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);
argv_array_push(&args, url);
for (i = 0; i < nr_spec; i++)
argv_array_push(&args, specs[i]);