Skip to content
  • Jeff King's avatar
    git: read local config in --list-cmds · 83b0ecf3
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Normally code that is checking config before we've decided to do
    setup_git_directory() would use read_early_config(), which uses
    discover_git_directory() to tentatively see if we're in a repo,
    and if so to add it to the config sequence.
    
    But list_cmds() uses the caching configset mechanism which
    rightly does not use read_early_config(), because it has no
    idea if it's being called early.
    
    Call setup_git_directory_gently() so we can pick up repo-level
    config (like completion.commands).
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    83b0ecf3