Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/attr.h
diff options
context:
space:
mode:
authorJohn Cai <johncai86@gmail.com>2023-01-27 00:21:47 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-27 01:16:48 +0300
commit06cc6f6a41668a9290fb53a142f21c1a49527ed0 (patch)
tree2fc2b0098ac4f5a691865c57da8b1fae30471e67 /attr.h
parent5dec958dcf965fc75e0f459f8e8ccf9c9f495b15 (diff)
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 7a400a2c (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, 3a1b3415 (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 <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.h')
-rw-r--r--attr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/attr.h b/attr.h
index 58a2bc1344..9884ea2bc6 100644
--- a/attr.h
+++ b/attr.h
@@ -45,7 +45,7 @@
* const char *path;
*
* setup_check();
- * git_check_attr(path, check);
+ * git_check_attr(&the_index, tree_oid, path, check);
* ------------
*
* - Act on `.value` member of the result, left in `check->items[]`: