Skip to content
  • Devin Lehmacher's avatar
    credential-cache: use XDG_CACHE_HOME for socket · 60759baa
    Devin Lehmacher authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Make git-credential-cache follow the XDG base path specification by
    default. This increases consistency with other applications and helps
    keep clutter out of users' home directories.
    
    Check the old socket location, ~/.git-credential-cache/, and use
    ~/.git-credential-cache/socket if that directory exists rather than
    forcing users who have used `git credential-cache` before to migrate to
    the new XDG compliant location.
    Otherwise use the socket $XDG_CACHE_HOME/git/credential/socket following
    XDG base path specification. Use the subdirectory credential/ in case
    other files are cached under $XDG_CACHE_HOME/git/ in the future and to
    make the socket's purpose clear.
    
    Signed-off-by: default avatarDevin Lehmacher <lehmacdj@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    60759baa