Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-30 23:20:34 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 23:20:34 +0300
commitc2796ac1c2807a46d1db90e47c892ba96bfdb276 (patch)
tree0226f00f741c76e85bc4157945c8fa7e4ce084a5 /remote-curl.c
parentbe537062afe8be38631ee7b09ef09d06f03ab1ca (diff)
parentcd85b447bfc09ddfab660048883de6a07d893097 (diff)
Merge branch 'bc/push-cas-cquoted-refname' into master
Pushing a ref whose name contains non-ASCII character with the "--force-with-lease" option did not work over smart HTTP protocol, which has been corrected. * bc/push-cas-cquoted-refname: remote-curl: make --force-with-lease work with non-ASCII ref names
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 5cbc6e5002..c9921c552c 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -121,7 +121,11 @@ static int set_option(const char *name, const char *value)
}
else if (!strcmp(name, "cas")) {
struct strbuf val = STRBUF_INIT;
- strbuf_addf(&val, "--" CAS_OPT_NAME "=%s", value);
+ strbuf_addstr(&val, "--force-with-lease=");
+ if (*value != '"')
+ strbuf_addstr(&val, value);
+ else if (unquote_c_style(&val, value, NULL))
+ return -1;
string_list_append(&cas_options, val.buf);
strbuf_release(&val);
return 0;