Skip to content

Commit

Permalink
Merge branch 'jc/how-to-document-api'
Browse files Browse the repository at this point in the history
Doc update.

* jc/how-to-document-api:
  CodingGuidelines: document the API in *.h files
  • Loading branch information
gitster committed Oct 19, 2018
2 parents d152a74 + d9f079a commit 0d4f473
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d4f473

Please sign in to comment.