tree.h API: simplify read_tree_recursive() signature
Simplify the signature of read_tree_recursive() to omit the "base",
"baselen" and "stage" arguments. No callers of it use these parameters
for anything anymore.
The last function to call read_tree_recursive() with a non-"" path was
read_tree_recursive() itself, but that was changed in
ffd31f661d
(Reimplement read_tree_recursive() using
tree_entry_interesting(), 2011-03-25).
The last user of the "stage" parameter went away in the last commit,
and even that use was mere boilerplate.
So let's remove those and rename the read_tree_recursive() function to
just read_tree(). We had another read_tree() function that I've
refactored away in preceding commits, since all in-tree users read
trees recursively with a callback we can change the name to signify
that this is the norm.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6c9fc42e9f
commit
47957485b3
@ -453,7 +453,7 @@ static void unpack_trees_finish(struct merge_options *opt)
|
||||
|
||||
static int save_files_dirs(const struct object_id *oid,
|
||||
struct strbuf *base, const char *path,
|
||||
unsigned int mode, int stage, void *context)
|
||||
unsigned int mode, void *context)
|
||||
{
|
||||
struct path_hashmap_entry *entry;
|
||||
int baselen = base->len;
|
||||
@ -473,8 +473,8 @@ static void get_files_dirs(struct merge_options *opt, struct tree *tree)
|
||||
{
|
||||
struct pathspec match_all;
|
||||
memset(&match_all, 0, sizeof(match_all));
|
||||
read_tree_recursive(opt->repo, tree, "", 0, 0,
|
||||
&match_all, save_files_dirs, opt);
|
||||
read_tree(opt->repo, tree,
|
||||
&match_all, save_files_dirs, opt);
|
||||
}
|
||||
|
||||
static int get_tree_entry_if_blob(struct repository *r,
|
||||
|
Reference in New Issue
Block a user