Skip to content
  • Elijah Newren's avatar
    Make rev-list --objects work together with pathspecs · cc5fa2fd
    Elijah Newren authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When traversing commits, the selection of commits would heed the list of
    pathspecs passed, but subsequent walking of the trees of those commits
    would not.  This resulted in 'rev-list --objects HEAD -- <paths>'
    displaying objects at unwanted paths.
    
    Have process_tree() call tree_entry_interesting() to determine which paths
    are interesting and should be walked.
    
    Naturally, this change can provide a large speedup when paths are specified
    together with --objects, since many tree entries are now correctly ignored.
    Interestingly, though, this change also gives me a small (~1%) but
    repeatable speedup even when no paths are specified with --objects.
    
    Signed-off-by: default avatarElijah Newren <newren@gmail.com>
    Signed-off-by: default avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    cc5fa2fd