Merge branch 'jc/how-to-document-api' into maint

Doc update.

* jc/how-to-document-api:
  CodingGuidelines: document the API in *.h files
This commit is contained in:
Junio C Hamano 2018-11-21 22:58:03 +09:00
Родитель 368ba6b7ac d9f079ad1a
Коммит 6b57374d3e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -358,7 +358,10 @@ For C programs:
string_list for sorted string lists, a hash map (mapping struct string_list for sorted string lists, a hash map (mapping struct
objects) named "struct decorate", amongst other things. 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/ - The first #include in C files, except in platform specific compat/
implementations, must be either "git-compat-util.h", "cache.h" or implementations, must be either "git-compat-util.h", "cache.h" or