Skip to content
  • Johannes Schindelin's avatar
    git_config_set: reuse empty sections · c71d8bb3
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    It can happen quite easily that the last setting in a config section is
    removed, and to avoid confusion when there are comments in the config
    about that section, we keep a lone section header, i.e. an empty
    section.
    
    Now that we use the `event_fn` callback, it is easy to add support for
    re-using empty sections, so let's do that.
    
    Note: t5512-ls-remote requires that this change is applied *after* the
    patch "git config --unset: remove empty sections (in the common case)":
    without that patch, there would be empty `transfer` and `uploadpack`
    sections ready for reuse, but in the *wrong* order (and sconsequently,
    t5512's "overrides work between mixed transfer/upload-pack hideRefs"
    would fail).
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c71d8bb3