All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tree-walk.h: fix incorrect API comment
@ 2025-04-29 15:45 Elijah Newren via GitGitGadget
  2025-04-29 17:01 ` Junio C Hamano
  2025-05-02 19:19 ` [PATCH v2] " Elijah Newren via GitGitGadget
  0 siblings, 2 replies; 3+ messages in thread
From: Elijah Newren via GitGitGadget @ 2025-04-29 15:45 UTC (permalink / raw)
  To: git; +Cc: Elijah Newren, Elijah Newren

From: Elijah Newren <newren@gmail.com>

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 strike the comment.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
    tree-walk.h: fix incorrect API comment

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1912%2Fnewren%2Ffix-tree-walk-api-comment-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1912/newren/fix-tree-walk-api-comment-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1912

 tree-walk.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tree-walk.h b/tree-walk.h
index aaea689f9ae..226b535f085 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -177,10 +177,11 @@ struct traverse_info {
 
 /**
  * Find an entry in a tree given a pathname and the sha1 of a tree to
- * search. Returns 0 if the entry is found and -1 otherwise. The third
- * and fourth parameters are set to the entry's sha1 and mode respectively.
+ * search. Returns 0 if the entry is found and -1 otherwise.
  */
-int get_tree_entry(struct repository *, const struct object_id *, const char *, struct object_id *, unsigned short *);
+int get_tree_entry(struct repository *repo, const struct object_id *tree_oid,
+		   const char *name, struct object_id *oid,
+		   unsigned short *mode);
 
 /**
  * Generate the full pathname of a tree entry based from the root of the

base-commit: f65182a99e545d2f2bc22e6c1c2da192133b16a3
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-02 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 15:45 [PATCH] tree-walk.h: fix incorrect API comment Elijah Newren via GitGitGadget
2025-04-29 17:01 ` Junio C Hamano
2025-05-02 19:19 ` [PATCH v2] " Elijah Newren via GitGitGadget

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.