Skip to content
  • Karsten Blees's avatar
    dir.c: make 'git-status --ignored' work within leading directories · be8a84c5
    Karsten Blees authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    'git-status --ignored path/' doesn't list ignored files and directories
    within 'path' if some component of 'path' is classified as untracked.
    
    Disable the DIR_SHOW_OTHER_DIRECTORIES flag while traversing leading
    directories. This prevents treat_leading_path() with DIR_SHOW_IGNORED flag
    from aborting at the top level untracked directory.
    
    As a side effect, this also eliminates a recursive directory scan per
    leading directory level, as treat_directory() can no longer call
    read_directory_recursive() when called from treat_leading_path().
    
    Signed-off-by: default avatarKarsten Blees <blees@dcon.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    be8a84c5