author | Elijah Newren <newren@gmail.com> | |
Fri, 17 Dec 2010 13:26:47 +0000 (20:26 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 17 Dec 2010 23:19:12 +0000 (15:19 -0800) | ||
commit | fe4dc36a7ec9f0c95f7e927e1732e047f7e04bac | |
tree | 8c7705c1fb1d9666a2bc3356471c87f77cb22008 | tree | snapshot |
parent | ee47d9326448d290432ddedcc09e1058ef2893c8 | commit | diff |
Make rev-list --objects work together with pathspecs
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: Elijah Newren <newren@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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: Elijah Newren <newren@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
list-objects.c | diff | blob | history |