aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 13:34:05 +0900
committerJunio C Hamano <gitster@pobox.com>2018-10-19 13:34:05 +0900
commit0d4f473a985e5b5f15ae88fd8dda695a694b9955 (patch)
treeadafde44c1aff202ef8d153378112ff74690ffdb /Documentation/CodingGuidelines
parentd152a74e2584dd0e235c9bcc97ef6a9ed239994a (diff)
parentd9f079ad1a866151fea01f7f977dfbd1ba4d97f7 (diff)
downloadgit-0d4f473a985e5b5f15ae88fd8dda695a694b9955.tar.gz
Merge branch 'jc/how-to-document-api'
Doc update. * jc/how-to-document-api: CodingGuidelines: document the API in *.h files
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 72967deb78..8579530710 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -376,7 +376,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