summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-21 13:58:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-21 13:58:03 (GMT)
commit6b57374d3e618c856fd69795919aa7ea191ec0c9 (patch)
tree0d32f8fd6eb94d3ef9eadd44ae11c65e9b450ae8 /Documentation
parent368ba6b7ac9eab63777e44c4efec72f5c85ee38e (diff)
parentd9f079ad1a866151fea01f7f977dfbd1ba4d97f7 (diff)
downloadgit-6b57374d3e618c856fd69795919aa7ea191ec0c9.zip
git-6b57374d3e618c856fd69795919aa7ea191ec0c9.tar.gz
git-6b57374d3e618c856fd69795919aa7ea191ec0c9.tar.bz2
Merge branch 'jc/how-to-document-api' into maint
Doc update. * jc/how-to-document-api: CodingGuidelines: document the API in *.h files
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 48aa4ed..8dddb50 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -358,7 +358,10 @@ For C programs:
string_list for sorted string lists, a hash map (mapping struct
objects) named "struct decorate", amongst other things.
- - When you come up with an API, document it.
+ - When you come up with an API, document its functions and structures
+ in the header file that exposes the API to its callers. Use what is
+ in "strbuf.h" as a model for the appropriate tone and level of
+ detail.
- The first #include in C files, except in platform specific compat/
implementations, must be either "git-compat-util.h", "cache.h" or