Git fork

tree-walk.h: fix incorrect API comment

When commit 50ddb089ff68 (tree-walk.c: remove the_repo from
get_tree_entry(), 2019-06-27) added an extra parameter to
get_tree_entry(), it did not fix the ordering comment about the meaning
of the parameters. Rather than just changing "third"->"fourth" and
"fourth"->"fifth", give the paramemters meaningful names (or actually,
just take the existing names from the get_tree_entry() definition in the
tree-walk.c file) and while at it, tweak the rest of the description to
incorporate the other parameter names as well.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
f62977b9 d50a5e89

+7 -4
+7 -4
tree-walk.h
··· 176 176 }; 177 177 178 178 /** 179 - * Find an entry in a tree given a pathname and the sha1 of a tree to 180 - * search. Returns 0 if the entry is found and -1 otherwise. The third 181 - * and fourth parameters are set to the entry's sha1 and mode respectively. 179 + * Walk trees starting with "tree_oid" to find the entry for "name", and 180 + * return the the object name and the mode of the found entry via the 181 + * "oid" and "mode" parameters. Return 0 if the entry is found, and -1 182 + * otherwise. 182 183 */ 183 - int get_tree_entry(struct repository *, const struct object_id *, const char *, struct object_id *, unsigned short *); 184 + int get_tree_entry(struct repository *repo, const struct object_id *tree_oid, 185 + const char *name, struct object_id *oid, 186 + unsigned short *mode); 184 187 185 188 /** 186 189 * Generate the full pathname of a tree entry based from the root of the