Commit cc5fa2f
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>1 parent f577b92 commit cc5fa2f
1 file changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
88 | 110 | | |
89 | 111 | | |
90 | 112 | | |
91 | | - | |
| 113 | + | |
92 | 114 | | |
93 | 115 | | |
94 | 116 | | |
| |||
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
| 122 | + | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
| |||
146 | 169 | | |
147 | 170 | | |
148 | 171 | | |
| 172 | + | |
149 | 173 | | |
| 174 | + | |
150 | 175 | | |
151 | 176 | | |
152 | 177 | | |
| |||
164 | 189 | | |
165 | 190 | | |
166 | 191 | | |
167 | | - | |
| 192 | + | |
168 | 193 | | |
169 | 194 | | |
170 | 195 | | |
| |||
181 | 206 | | |
182 | 207 | | |
183 | 208 | | |
| 209 | + | |
184 | 210 | | |
0 commit comments