Thread (21 messages) 21 messages, 2 authors, 2021-03-31
STALE2008d

[PATCH v5 14/18] tree-walk.h API doc: improve documentation of get_tree_entry()

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-31 19:10:57
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Change a mention of sha1 to OID and change the comment to a listing of
functions discussed below, right now there's only one function, but
subsequent commits will add more.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 tree-walk.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tree-walk.h b/tree-walk.h
index 09e40d9221d..cd8da84f56c 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -166,11 +166,13 @@ struct traverse_info {
 };
 
 /**
- * Find an entry in a tree given a pathname and the sha1 of a tree to
+ * Find an entry in a tree given a pathname and the OID 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.
+ * You always need a pointer to an appropriate variable to fill in
+ * (NULL won't do!). That variable is:
+ *
+ * get_tree_entry(): unsigned short mode
  */
 int get_tree_entry(struct repository *, const struct object_id *, const char *,
 		   struct object_id *,
-- 
2.31.1.474.g72d45d12706
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help