Skip to content

Commit 6b57374

Browse files
committed
Merge branch 'jc/how-to-document-api' into maint
Doc update. * jc/how-to-document-api: CodingGuidelines: document the API in *.h files
2 parents 368ba6b + d9f079a commit 6b57374

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
@@ -358,7 +358,10 @@ For C programs:
358358
string_list for sorted string lists, a hash map (mapping struct
359359
objects) named "struct decorate", amongst other things.
360360

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

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

0 commit comments

Comments
 (0)