diff options
| author | Jonatan Holmgren <jonatan@jontes.page> | 2026-02-26 21:53:27 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-26 13:06:49 -0800 |
| commit | 65892943750b0c66017389f0233ba5a6a7205165 (patch) | |
| tree | 5cbcc313cbc2e27c0a9feee6fc25810da013a936 /contrib/persistent-https | |
| parent | 2e3a987f3b968573e499bb353734430df39a64a5 (diff) | |
| download | git-65892943750b0c66017389f0233ba5a6a7205165.tar.gz git-65892943750b0c66017389f0233ba5a6a7205165.zip | |
alias: treat empty subsection [alias ""] as plain [alias]
When git-config stores a key of the form alias..name, it records
it under an empty subsection ([alias ""]). The new subsection-aware
alias lookup would see a non-NULL but zero-length subsection and
fall into the subsection code path, where it required a "command"
key and thus silently ignored the entry.
Normalize an empty subsection to NULL before any further processing
so that entries stored this way continue to work as plain
case-insensitive aliases, matching the pre-subsection behaviour.
Users who relied on alias..name to create an alias literally named
".name" may want to migrate to subsection syntax, which looks less confusing:
[alias ".name"]
command = <value>
Add tests covering both the empty-subsection compatibility case and
the leading-dot alias via the new syntax.
Signed-off-by: Jonatan Holmgren <jonatan@jontes.page>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
