Re: [PATCH 0/2] Fix regression: CamelCased aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> I think there are basically two mental models that are reasonable:
>
>   1. Uppercase in key names is treated the same as lowercase. Therefore
>      we must allow "alias.Foo" to match "git foo", but "git Foo" can
>      never have a match (in the current schema).
>
>   2. Keys are case-insensitive, and anything that matches them is
>      considered case-insensitive, too. That means "Foo" and "foo" are
>      identical for these purposes, and you can never have two aliases
>      "Foo" and "foo".
>
> In either mental model, "alias.Foo" for "git foo" must work. But the
> reverse only works in (2).
>
> I think either model is fine. These patches push us into (2).

I've always thought that the promise we give our end users is that
these keys are case insensitive, and that the fact that we downcase
the key before calling config callback is merely an implementation
detail.  That is why I never considered the possibility that (1) can
be a valid mental model.

There are other possible implementations of case insensitivity.  We
could have been upcasing instead before calling config callback and
the users wouldn't have noticed.

So I'd consider that pushing us into (2) is a good thing.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux