• Patrick Steinhardt's avatar
    gitaly: Allow passing gitconfig as separate section, subsection and key · d5d04066
    Patrick Steinhardt 创作于
    Right now, it's only possible for admins to specify the Gitaly gitconfig
    as a single key and value pair. While this works just fine in theory
    when you only consider this in the context of the `[[git.config]]`
    stanzas. We'll also migrate the global gitconfig from its current
    location in `omnibus_gitconfig['system']` to a new key though, and it
    would be great if we could use the same configuration format for both.
    But we'd have to continue to do laborious string manipulation if we
    wanted to use the key-value format for that new configuration as we
    don't write `[[git.config]]` stanzas there, but gitconfig files.
    
    Instead, introduce the ability to explicitly specify the Git config as a
    touple of sections (`http`), subsections (`"http://example.com"`) and
    keys (`insteadOf`) that together would form the complete key
    `http."http://example.com".insteadOf`. Like this, we have sufficient
    information to write both file formats without having to do any string
    conversations at all.
    
    In order to not break backwards compatibility with the just-introduced
    `gitaly['gitconfig']`, we retain the ability to just specify a key.
    
    Changelog: fixed
    d5d04066