tree-walk.h: fix incorrect API comment#1912
tree-walk.h: fix incorrect API comment#1912newren wants to merge 1 commit intogitgitgadget:masterfrom
Conversation
|
/submit |
|
Submitted as pull.1912.git.1745941503913.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
|
On the Git mailing list, Junio C Hamano wrote (reply to this): "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 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.
Please drop "and strike the comment" part. The "oid" and "mode"
being out-parameters is significant for callers.
> /**
> * 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
Find an entry with the "name" in a tree object "tree_oid",
and return the the object name and the mode of the found
entry via the "oid" and the "mode" parameters. Return 0 if
the entry is found, and -1 otherwise.
or something, perhaps.
Thanks. |
6375bc7 to
9929b3e
Compare
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 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>
9929b3e to
a47aceb
Compare
|
/submit |
|
Submitted as pull.1912.v2.git.1746213551473.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
|
This patch series was integrated into seen via git@a5925c3. |
|
This branch is now known as |
|
This patch series was integrated into seen via git@fee3f08. |
|
There was a status update in the "Cooking" section about the branch Doc update. Will merge to 'next'. source: <pull.1912.v2.git.1746213551473.gitgitgadget@gmail.com> |
|
This patch series was integrated into seen via git@02bfcaa. |
|
This patch series was integrated into next via git@cddf407. |
|
There was a status update in the "Cooking" section about the branch Doc update. Will merge to 'master'. source: <pull.1912.v2.git.1746213551473.gitgitgadget@gmail.com> |
|
This patch series was integrated into seen via git@e81ed1e. |
|
This patch series was integrated into seen via git@0c29a73. |
|
This patch series was integrated into seen via git@8930a7b. |
|
This patch series was integrated into seen via git@e60db14. |
|
There was a status update in the "Cooking" section about the branch Doc update. Will merge to 'master'. source: <pull.1912.v2.git.1746213551473.gitgitgadget@gmail.com> |
|
This patch series was integrated into seen via git@f2cc60c. |
|
This patch series was integrated into master via git@f2cc60c. |
|
This patch series was integrated into next via git@f2cc60c. |
|
Closed via f2cc60c. |
…lint-plugin-jsdoc-50.7.1 build(deps-dev): bump eslint-plugin-jsdoc from 50.6.17 to 50.7.1
Changes since v1: