• L
    Sanity-check config variable names · b09c53a3
    Libor Pechacek 提交于
    Sanity-check config variable names when adding and retrieving them.  As a side
    effect code duplication between git_config_set_multivar and get_value (in
    builtin/config.c) was removed and the common functionality was placed in
    git_config_parse_key.
    
    This breaks a test in t1300 which used invalid section-less keys in the tests
    for "git -c". However, allowing such names there was useless, since there was
    no way to set them via config file, and no part of git actually tried to use
    section-less keys. This patch updates the test to use more realistic examples
    as well as adding its own test.
    Signed-off-by: NLibor Pechacek <lpechacek@suse.cz>
    Acked-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    b09c53a3
config.c 34.1 KB