Skip to content

Commit 52182e3

Browse files
committed
Merge branch 'ab/remote-write-config-in-camel-case'
Update C code that sets a few configuration variables when a remote is configured so that it spells configuration variable names in the canonical camelCase. * ab/remote-write-config-in-camel-case: remote: write camel-cased *.pushRemote on rename remote: add camel-cased *.tagOpt key, like clone
2 parents 2435fea + 0f1da60 commit 52182e3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

builtin/remote.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int add(int argc, const char **argv)
221221

222222
if (fetch_tags != TAGS_DEFAULT) {
223223
strbuf_reset(&buf);
224-
strbuf_addf(&buf, "remote.%s.tagopt", name);
224+
strbuf_addf(&buf, "remote.%s.tagOpt", name);
225225
git_config_set(buf.buf,
226226
fetch_tags == TAGS_SET ? "--tags" : "--no-tags");
227227
}
@@ -746,7 +746,7 @@ static int mv(int argc, const char **argv)
746746
}
747747
if (info->push_remote_name && !strcmp(info->push_remote_name, rename.old_name)) {
748748
strbuf_reset(&buf);
749-
strbuf_addf(&buf, "branch.%s.pushremote", item->string);
749+
strbuf_addf(&buf, "branch.%s.pushRemote", item->string);
750750
git_config_set(buf.buf, rename.new_name);
751751
}
752752
}

t/t5505-remote.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ test_expect_success 'add --no-tags' '
594594
cd add-no-tags &&
595595
git init &&
596596
git remote add -f --no-tags origin ../one &&
597+
grep tagOpt .git/config &&
597598
git tag -l some-tag >../test/output &&
598599
git tag -l foobar-tag >../test/output &&
599600
git config remote.origin.tagopt >>../test/output
@@ -756,6 +757,7 @@ test_expect_success 'rename a remote' '
756757
cd four &&
757758
git config branch.main.pushRemote origin &&
758759
git remote rename origin upstream &&
760+
grep "pushRemote" .git/config &&
759761
test -z "$(git for-each-ref refs/remotes/origin)" &&
760762
test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/main" &&
761763
test "$(git rev-parse upstream/main)" = "$(git rev-parse main)" &&
@@ -772,6 +774,7 @@ test_expect_success 'rename a remote renames repo remote.pushDefault' '
772774
cd four.1 &&
773775
git config remote.pushDefault origin &&
774776
git remote rename origin upstream &&
777+
grep pushDefault .git/config &&
775778
test "$(git config --local remote.pushDefault)" = "upstream"
776779
)
777780
'

t/t5612-clone-refspec.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ test_expect_success 'by default no tags will be kept updated' '
9797
test_expect_success 'clone with --no-tags' '
9898
(
9999
cd dir_all_no_tags &&
100+
grep tagOpt .git/config &&
100101
git fetch &&
101102
git for-each-ref refs/tags >../actual
102103
) &&

0 commit comments

Comments
 (0)