diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-02-25 02:21:17 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-25 04:03:00 +0100 |
commit | 0f1da600e6864e8b4fe97aea72a3b68c227a709c (patch) | |
tree | ccd9d67c0a97f4fb6b1b5350dd8c8e7186656c86 /builtin/remote.c | |
parent | remote: add camel-cased *.tagOpt key, like clone (diff) | |
download | git-0f1da600e6864e8b4fe97aea72a3b68c227a709c.tar.xz git-0f1da600e6864e8b4fe97aea72a3b68c227a709c.zip |
remote: write camel-cased *.pushRemote on rename
When a remote is renamed don't change the canonical "*.pushRemote"
form to "*.pushremote". Fixes and tests for a minor bug in
923d4a5ca4f (remote rename/remove: handle branch.<name>.pushRemote
config values, 2020-01-27). See the preceding commit for why this does
& doesn't matter.
While we're at it let's also test that we handle the "*.pushDefault"
key correctly. The code to handle that was added in
b3fd6cbf294 (remote rename/remove: gently handle remote.pushDefault
config, 2020-02-01) and does the right thing, but nothing tested that
we wrote out the canonical camel-cased form.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index f286ae9753..717b662d45 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -746,7 +746,7 @@ static int mv(int argc, const char **argv) } if (info->push_remote_name && !strcmp(info->push_remote_name, rename.old_name)) { strbuf_reset(&buf); - strbuf_addf(&buf, "branch.%s.pushremote", item->string); + strbuf_addf(&buf, "branch.%s.pushRemote", item->string); git_config_set(buf.buf, rename.new_name); } } |