• Matheus Tavares's avatar
    dir-iterator: add flags parameter to dir_iterator_begin · fa1da7d2
    Matheus Tavares authored
    Add the possibility of giving flags to dir_iterator_begin to initialize
    a dir-iterator with special options.
    
    Currently possible flags are:
    - DIR_ITERATOR_PEDANTIC, which makes dir_iterator_advance abort
    immediately in the case of an error, instead of keep looking for the
    next valid entry;
    - DIR_ITERATOR_FOLLOW_SYMLINKS, which makes the iterator follow
    symlinks and include linked directories' contents in the iteration.
    
    These new flags will be used in a subsequent patch.
    
    Also add tests for the flags' usage and adjust refs/files-backend.c to
    the new dir_iterator_begin signature.
    Signed-off-by: Matheus Tavares's avatarMatheus Tavares <matheus.bernardino@usp.br>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    fa1da7d2
dir-iterator.c 5.81 KB