Re: [PATCH 2/2] remote.c: reject 0-length branch names
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2022, 21:21 UTC
- Message-ID
- <xmqqzgiwozam.fsf@gitster.g>
- In-Reply-To
- <kl6lilpke31e.fsf@chooglen-macbookpro.roam.corp.google.com>
Glen Choo <chooglen@google.com> writes:
Show 5 quoted lines
> It truly makes no sense because `branch..remote` fits the schema of > `branch.<name>.remote` where <name> is "", but "" isn't a valid branch > name (and it never has been AFAIK). So such a key would never be useful > to Git, and it would be extremely hacky for a non-Git tool to use such > a key.
Yup, we might want to reserve a bogus key or two that can never be a branch name to allow us express "this configuration is in effect for all branches" (e.g. "branch.*.rebase = never"), but the natural such name would be "*" and does not have to be an empty string.