diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-12-08 15:11:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-08 15:11:19 -0800 |
commit | a10e7842abf8ec62dcd513cf74207cf2401aa2f2 (patch) | |
tree | 8f9aa39f7428df4b99985db2b132f6b43b25f291 /builtin/remote.c | |
parent | Merge branch 'tb/idx-midx-race-fix' (diff) | |
parent | config doc: value-pattern is not necessarily a regexp (diff) | |
download | tgif-a10e7842abf8ec62dcd513cf74207cf2401aa2f2.tar.xz |
Merge branch 'ds/config-literal-value'
Various subcommands of "git config" that takes value_regex
learn the "--literal-value" option to take the value_regex option
as a literal string.
* ds/config-literal-value:
config doc: value-pattern is not necessarily a regexp
config: implement --fixed-value with --get*
config: plumb --fixed-value into config API
config: add --fixed-value option, un-implemented
t1300: add test for --replace-all with value-pattern
t1300: test "set all" mode with value-pattern
config: replace 'value_regex' with 'value_pattern'
config: convert multi_replace to flags
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index c1b211b272..d11a5589e4 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -712,7 +712,7 @@ static int mv(int argc, const char **argv) strbuf_reset(&buf); strbuf_addf(&buf, "remote.%s.fetch", rename.new_name); - git_config_set_multivar(buf.buf, NULL, NULL, 1); + git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE); strbuf_addf(&old_remote_context, ":refs/remotes/%s/", rename.old_name); for (i = 0; i < oldremote->fetch.raw_nr; i++) { char *ptr; @@ -1491,7 +1491,8 @@ static int update(int argc, const char **argv) static int remove_all_fetch_refspecs(const char *key) { - return git_config_set_multivar_gently(key, NULL, NULL, 1); + return git_config_set_multivar_gently(key, NULL, NULL, + CONFIG_FLAGS_MULTI_REPLACE); } static void add_branches(struct remote *remote, const char **branches, @@ -1686,7 +1687,8 @@ static int set_url(int argc, const char **argv) if (!delete_mode) git_config_set_multivar(name_buf.buf, newurl, oldurl, 0); else - git_config_set_multivar(name_buf.buf, NULL, oldurl, 1); + git_config_set_multivar(name_buf.buf, NULL, oldurl, + CONFIG_FLAGS_MULTI_REPLACE); out: strbuf_release(&name_buf); return 0; |