Skip to content

Commit 084b044

Browse files
dschogitster
authored andcommitted
t1300: demonstrate that CamelCased aliases regressed
It is totally legitimate to add CamelCased aliases, but due to the way config keys are compared, the case does not matter. Except that now it does: the alias name is expected to be all lower-case. This is a regression introduced by a9bcf65 (alias: use the early config machinery to expand aliases, 2017-06-14). Noticed by Alejandro Pauly, diagnosed by Kevin Willford. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a9bcf65 commit 084b044

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t1300-repo-config.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,13 @@ test_expect_success 'git -c works with aliases of builtins' '
10751075
test_cmp expect actual
10761076
'
10771077

1078+
test_expect_failure 'aliases can be CamelCased' '
1079+
test_config alias.CamelCased "rev-parse HEAD" &&
1080+
git CamelCased >out &&
1081+
git rev-parse HEAD >expect &&
1082+
test_cmp expect out
1083+
'
1084+
10781085
test_expect_success 'git -c does not split values on equals' '
10791086
echo "value with = in it" >expect &&
10801087
git -c core.foo="value with = in it" config core.foo >actual &&

0 commit comments

Comments
 (0)