tree-walk: lose base_offset that is never used in tree_entry_interesting

The tree_entry_interesting() function takes base_offset, allowing
its callers to potentially pass a non-zero number to skip the early
part of the path string.

The feature is never exercised and we do not even know what bugs are
lurking there, as all callers pass 0 to the parameter.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2023-07-07 15:21:15 -07:00
parent fb7d80edca
commit 0ad927e9e0
6 changed files with 8 additions and 7 deletions

View File

@ -316,7 +316,7 @@ static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
while (t->size) {
match = tree_entry_interesting(opt->repo->index, &t->entry,
base, 0, &opt->pathspec);
base, &opt->pathspec);
if (match) {
if (match == all_entries_not_interesting)
t->size = 0;