Skip to content

Commit 0d4f473

Browse files
committed
Merge branch 'jc/how-to-document-api'
Doc update. * jc/how-to-document-api: CodingGuidelines: document the API in *.h files
2 parents d152a74 + d9f079a commit 0d4f473

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/CodingGuidelines

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ For C programs:
376376
string_list for sorted string lists, a hash map (mapping struct
377377
objects) named "struct decorate", amongst other things.
378378

379-
- When you come up with an API, document it.
379+
- When you come up with an API, document its functions and structures
380+
in the header file that exposes the API to its callers. Use what is
381+
in "strbuf.h" as a model for the appropriate tone and level of
382+
detail.
380383

381384
- The first #include in C files, except in platform specific compat/
382385
implementations, must be either "git-compat-util.h", "cache.h" or

0 commit comments

Comments
 (0)