Skip to content

Commit 6375bc7

Browse files
committed
tree-walk.h: fix incorrect API comment
When commit 50ddb08 (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 strike the comment. Signed-off-by: Elijah Newren <[email protected]>
1 parent f65182a commit 6375bc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tree-walk.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ struct traverse_info {
177177

178178
/**
179179
* 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.
180+
* search. Returns 0 if the entry is found and -1 otherwise.
182181
*/
183-
int get_tree_entry(struct repository *, const struct object_id *, const char *, struct object_id *, unsigned short *);
182+
int get_tree_entry(struct repository *repo, const struct object_id *tree_oid,
183+
const char *name, struct object_id *oid,
184+
unsigned short *mode);
184185

185186
/**
186187
* Generate the full pathname of a tree entry based from the root of the

0 commit comments

Comments
 (0)