• J
    attr: make sure we have an xdg path before using it · f0c1c15c
    Jeff King 提交于
    If we don't have a core.attributesfile configured, we fall
    back to checking XDG config, which is usually
    $HOME/.config/git/attributes.
    
    However, if $HOME is unset, then home_config_paths will return
    NULL, and we end up calling fopen(NULL).
    
    Depending on your system, this may or may not cause the
    accompanying test to fail (e.g., on Linux and glibc, the
    address will go straight to open, which will return EFAULT).
    However, valgrind will reliably notice the error.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    f0c1c15c
attr.c 19.0 KB