Skip to content

Commit 06cc6f6

Browse files
john-caigitster
authored andcommitted
attr: fix instructions on how to check attrs
The instructions in attr.h describing what functions to call to check attributes is missing the index as the first argument to git_check_attr(), as well as tree_oid as the second argument. When 7a400a2 (attr: remove an implicit dependency on the_index, 2018-08-13) started passing an index_state instance to git_check_attr(), it forgot to update the API documentation in Documentation/technical/api-gitattributes.txt. Later, 3a1b341 (attr: move doc to attr.h, 2019-11-17) moved the API documentation to attr.h as a comment, but still left out the index_state as an argument. In 47cfc9b (attr: add flag `--source` to work with tree-ish 2023-01-14) added tree_oid as an optional parameter but was not added to the docs in attr.h Fix this to make the documentation in the comment consistent with the actual function signature. Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5dec958 commit 06cc6f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

attr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* const char *path;
4646
*
4747
* setup_check();
48-
* git_check_attr(path, check);
48+
* git_check_attr(&the_index, tree_oid, path, check);
4949
* ------------
5050
*
5151
* - Act on `.value` member of the result, left in `check->items[]`:

0 commit comments

Comments
 (0)